diff --git a/.github/workflows/deploy-wiki.yaml b/.github/workflows/deploy-wiki.yaml index 05014f16ba..1c2e5854e9 100644 --- a/.github/workflows/deploy-wiki.yaml +++ b/.github/workflows/deploy-wiki.yaml @@ -11,7 +11,7 @@ jobs: deploy-wiki: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 with: submodules: true - name: Install rsync diff --git a/.github/workflows/e2e-master.yaml b/.github/workflows/e2e-master.yaml index e6e42b9761..da2735c143 100644 --- a/.github/workflows/e2e-master.yaml +++ b/.github/workflows/e2e-master.yaml @@ -13,13 +13,13 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.7, 3.8, 3.9] + python-version: ["3.8", "3.9", "3.10"] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 with: submodules: true - name: Create Kind Cluster - uses: helm/kind-action@v1.10.0 + uses: helm/kind-action@v1.14.0 with: cluster_name: kubernetes-python-e2e-master-${{ matrix.python-version }} # The kind version to be used to spin the cluster up @@ -30,7 +30,7 @@ jobs: # as we sync with Kubernetes upstream config: .github/workflows/kind-configs/cluster-1.25.yaml - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} - name: Install dependencies diff --git a/.github/workflows/e2e-release-11.0.yaml b/.github/workflows/e2e-release-11.0.yaml index 095aba08b2..ab9cd3295f 100644 --- a/.github/workflows/e2e-release-11.0.yaml +++ b/.github/workflows/e2e-release-11.0.yaml @@ -15,11 +15,11 @@ jobs: matrix: python-version: [2.7, 3.5, 3.6, 3.7, 3.8] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 with: submodules: true - name: Create Kind Cluster - uses: helm/kind-action@v1.10.0 + uses: helm/kind-action@v1.14.0 with: cluster_name: kubernetes-python-e2e-release-11.0-${{ matrix.python-version }} # The kind version to be used to spin the cluster up @@ -30,7 +30,7 @@ jobs: # as we sync with Kubernetes upstream config: .github/workflows/kind-configs/cluster-1.15.yaml - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} - name: Install dependencies diff --git a/.github/workflows/e2e-release-12.0.yaml b/.github/workflows/e2e-release-12.0.yaml index c3c4d4f93c..7ffd1e1bdd 100644 --- a/.github/workflows/e2e-release-12.0.yaml +++ b/.github/workflows/e2e-release-12.0.yaml @@ -15,11 +15,11 @@ jobs: matrix: python-version: [2.7, 3.5, 3.6, 3.7, 3.8] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 with: submodules: true - name: Create Kind Cluster - uses: helm/kind-action@v1.10.0 + uses: helm/kind-action@v1.14.0 with: cluster_name: kubernetes-python-e2e-release-12.0-${{ matrix.python-version }} # The kind version to be used to spin the cluster up @@ -30,7 +30,7 @@ jobs: # as we sync with Kubernetes upstream config: .github/workflows/kind-configs/cluster-1.16.yaml - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} - name: Install dependencies diff --git a/.github/workflows/e2e-release-17.0.yaml b/.github/workflows/e2e-release-17.0.yaml index d394e99f8d..ec2e19a2b6 100644 --- a/.github/workflows/e2e-release-17.0.yaml +++ b/.github/workflows/e2e-release-17.0.yaml @@ -15,11 +15,11 @@ jobs: matrix: python-version: [2.7, 3.5, 3.6, 3.7, 3.8] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 with: submodules: true - name: Create Kind Cluster - uses: helm/kind-action@v1.10.0 + uses: helm/kind-action@v1.14.0 with: cluster_name: kubernetes-python-e2e-release-17.0-${{ matrix.python-version }} # The kind version to be used to spin the cluster up @@ -30,7 +30,7 @@ jobs: # as we sync with Kubernetes upstream config: .github/workflows/kind-configs/cluster-1.17.yaml - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} - name: Install dependencies diff --git a/.github/workflows/e2e-release-18.0.yaml b/.github/workflows/e2e-release-18.0.yaml index 03e461b64d..884feabe9a 100644 --- a/.github/workflows/e2e-release-18.0.yaml +++ b/.github/workflows/e2e-release-18.0.yaml @@ -15,11 +15,11 @@ jobs: matrix: python-version: [3.6, 3.7, 3.8, 3.9] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 with: submodules: true - name: Create Kind Cluster - uses: helm/kind-action@v1.10.0 + uses: helm/kind-action@v1.14.0 with: cluster_name: kubernetes-python-e2e-release-18.0-${{ matrix.python-version }} # The kind version to be used to spin the cluster up @@ -30,7 +30,7 @@ jobs: # as we sync with Kubernetes upstream config: .github/workflows/kind-configs/cluster-1.18.yaml - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} - name: Install dependencies diff --git a/.github/workflows/e2e-release-26.0.yaml b/.github/workflows/e2e-release-26.0.yaml index 6cf2a730a7..46d6719a76 100644 --- a/.github/workflows/e2e-release-26.0.yaml +++ b/.github/workflows/e2e-release-26.0.yaml @@ -15,11 +15,11 @@ jobs: matrix: python-version: [3.7, 3.8, 3.9] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 with: submodules: true - name: Create Kind Cluster - uses: helm/kind-action@v1.10.0 + uses: helm/kind-action@v1.14.0 with: cluster_name: kubernetes-python-e2e-release-26.0-${{ matrix.python-version }} # The kind version to be used to spin the cluster up @@ -30,7 +30,7 @@ jobs: # as we sync with Kubernetes upstream config: .github/workflows/kind-configs/cluster-1.26.yaml - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} - name: Install dependencies diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index e140039e64..24ece82472 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -7,17 +7,17 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.7", "3.8", "3.10", "3.11"] + python-version: ["3.8", "3.10", "3.11", "3.12", "3.13", "3.14"] include: - python-version: "3.9" use_coverage: 'coverage' steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 with: submodules: true - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} - name: Install dependencies @@ -44,7 +44,7 @@ jobs: - name: Upload coverage to Codecov if: "matrix.use_coverage" - uses: codecov/codecov-action@v4 + uses: codecov/codecov-action@v6 with: fail_ci_if_error: false verbose: true diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 0000000000..d220507cec --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,53 @@ +# Read the Docs configuration file for Sphinx projects +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +# Required +version: 2 + +# Set the OS, Python version and other tools you might need +build: + os: ubuntu-22.04 + tools: + python: "3.12" + # You can also specify other tool versions: + # nodejs: "20" + # rust: "1.70" + # golang: "1.20" + +# Build documentation in the "docs/" directory with Sphinx +sphinx: + configuration: doc/source/conf.py + # You can configure Sphinx to use a different builder, for instance use the dirhtml builder for simpler URLs + # builder: "dirhtml" + # Fail on all warnings to avoid broken references + # fail_on_warning: true + +# Optionally build your docs in additional formats such as PDF and ePub +# formats: +# - pdf +# - epub + +# Optional but recommended, declare the Python requirements required +# to build your documentation +# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html +python: + install: + - requirements: doc/requirements-docs.txt + - requirements: test-requirements.txt + + +# git clone --depth 1 https://github.com/kubernetes-client/python . +# git fetch origin --force --prune --prune-tags --depth 50 refs/heads/master:refs/remotes/origin/master +# git checkout --force origin/master +# git clean -d -f -f +# python3.7 -mvirtualenv $READTHEDOCS_VIRTUALENV_PATH +# python -m pip install --upgrade --no-cache-dir pip setuptools +# python -m pip install --upgrade --no-cache-dir pillow mock==1.0.1 alabaster>=0.7,<0.8,!=0.7.5 commonmark==0.9.1 recommonmark==0.5.0 sphinx<2 sphinx-rtd-theme<0.5 readthedocs-sphinx-ext<2.3 jinja2<3.1.0 + +# cat doc/source/conf.py +# python -m sphinx -T -E -b html -d _build/doctrees -D language=en . $READTHEDOCS_OUTPUT/html +# python -m sphinx -T -E -b readthedocssinglehtmllocalmedia -d _build/doctrees -D language=en . $READTHEDOCS_OUTPUT/htmlzip +# python -m sphinx -T -E -b latex -d _build/doctrees -D language=en . $READTHEDOCS_OUTPUT/pdf +# cat latexmkrc +# latexmk -r latexmkrc -pdf -f -dvi- -ps- -jobname=kubernetes -interaction=nonstopmode +# python -m sphinx -T -E -b epub -d _build/doctrees -D language=en . $READTHEDOCS_OUTPUT/epub \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index b433f4d259..59f69a4153 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,967 @@ +# Breaking Change from upgrading openapi generator to v6.6.0 + +- Legacy dict(str, str) syntax is no longer supported in ApiClient deserializer. Only modern dict[str, str] syntax is supported. + +- All models __init__ will now use Configuration.get_default_copy() instead of Configuration() if the passed in parameter local_vars_configuration is None. [OpenAPITools/openapi-generator#8500](https://github.com/OpenAPITools/openapi-generator/pull/8500). + +- ApiClient's `update_params_for_auth` method has one parameter name changed from `querys` to `queries`. + +- Configuration auth uses 'BearerToken' instead of 'authorization' in api_key. + +# v35.0.0+snapshot + +Kubernetes API Version: v1.35.0 + +### API Change +- Added `ObservedGeneration` to CustomResourceDefinition conditions. ([kubernetes/kubernetes#134984](https://github.com/kubernetes/kubernetes/pull/134984), [@michaelasp](https://github.com/michaelasp)) +- Added `WithOrigin` within `apis/core/validation` with adjusted tests. ([kubernetes/kubernetes#132825](https://github.com/kubernetes/kubernetes/pull/132825), [@PatrickLaabs](https://github.com/PatrickLaabs)) +- Added scoring for the prioritized list feature so nodes that best satisfy the highest-ranked subrequests were chosen. ([kubernetes/kubernetes#134711](https://github.com/kubernetes/kubernetes/pull/134711), [@mortent](https://github.com/mortent)) [SIG Node, Scheduling and Testing] +- Added the `--min-compatibility-version` flag to `kube-apiserver`, `kube-controller-manager`, and `kube-scheduler`. ([kubernetes/kubernetes#133980](https://github.com/kubernetes/kubernetes/pull/133980), [@siyuanfoundation](https://github.com/siyuanfoundation)) [SIG API Machinery, Architecture, Cluster Lifecycle, Etcd, Scheduling and Testing] +- Added the `StorageVersionMigration` `v1beta1` API and removed the `v1alpha1` API. + + ACTION REQUIRED: The `v1alpha1` API is no longer supported. Users must remove any `v1alpha1` resources before upgrading. ([kubernetes/kubernetes#134784](https://github.com/kubernetes/kubernetes/pull/134784), [@michaelasp](https://github.com/michaelasp)) [SIG API Machinery, Apps, Auth, Etcd and Testing] +- Added validation to ensure `log-flush-frequency` is a positive value, returning an error instead of causing a panic. ([kubernetes/kubernetes#133540](https://github.com/kubernetes/kubernetes/pull/133540), [@BenTheElder](https://github.com/BenTheElder)) [SIG Architecture, Instrumentation, Network and Node] +- All containers are restarted when a source container in a restart policy rule exits. This alpha feature is gated behind `RestartAllContainersOnContainerExit`. ([kubernetes/kubernetes#134345](https://github.com/kubernetes/kubernetes/pull/134345), [@yuanwang04](https://github.com/yuanwang04)) [SIG Apps, Node and Testing] +- CSI drivers can now opt in to receive service account tokens via the secrets field instead of volume context by setting `spec.serviceAccountTokenInSecrets: true` in the CSIDriver object. This prevents tokens from being exposed in logs and other outputs. The feature is gated by the `CSIServiceAccountTokenSecrets` feature gate (beta in `v1.35`). ([kubernetes/kubernetes#134826](https://github.com/kubernetes/kubernetes/pull/134826), [@aramase](https://github.com/aramase)) [SIG API Machinery, Auth, Storage and Testing] +- Changed kuberc configuration schema. Two new optional fields added to kuberc configuration, `credPluginPolicy` and `credPluginAllowlist`. This is documented in [KEP-3104](https://github.com/kubernetes/enhancements/blob/master/keps/sig-cli/3104-introduce-kuberc/README.md#allowlist-design-details) and documentation is added to the website by [kubernetes/website#52877](https://github.com/kubernetes/website/pull/52877) ([kubernetes/kubernetes#134870](https://github.com/kubernetes/kubernetes/pull/134870), [@pmengelbert](https://github.com/pmengelbert)) [SIG API Machinery, Architecture, Auth, CLI, Instrumentation and Testing] +- DRA device taints: `DeviceTaintRule` status provides information about the rule, including whether Pods still need to be evicted (`EvictionInProgress` condition). The newly added `None` effect can be used to preview what a `DeviceTaintRule` would do if it used the `NoExecute` effect and to taint devices (`device health`) without immediately affecting scheduling or running Pods. ([kubernetes/kubernetes#134152](https://github.com/kubernetes/kubernetes/pull/134152), [@pohly](https://github.com/pohly)) [SIG API Machinery, Apps, Auth, Node, Release, Scheduling and Testing] +- DRA: The `DynamicResourceAllocation` feature gate for the core functionality (GA in `v1.34`) has now been locked to enabled-by-default and cannot be disabled anymore. ([kubernetes/kubernetes#134452](https://github.com/kubernetes/kubernetes/pull/134452), [@pohly](https://github.com/pohly)) [SIG Auth, Node, Scheduling and Testing] +- Enabled `kubectl get -o kyaml` by default. To disable it, set `KUBECTL_KYAML=false`. ([kubernetes/kubernetes#133327](https://github.com/kubernetes/kubernetes/pull/133327), [@thockin](https://github.com/thockin)) +- Enabled in-place resizing of pod-level resources. + - Added `Resources` in `PodStatus` to capture resources set in the pod-level cgroup. + - Added `AllocatedResources` in `PodStatus` to capture resources requested in the `PodSpec`. ([kubernetes/kubernetes#132919](https://github.com/kubernetes/kubernetes/pull/132919), [@ndixita](https://github.com/ndixita)) [SIG API Machinery, Apps, Architecture, Auth, CLI, Instrumentation, Node, Scheduling and Testing] +- Enabled the `NominatedNodeNameForExpectation` feature in kube-scheduler by default. + - Enabled the `ClearingNominatedNodeNameAfterBinding` feature in kube-apiserver by default. ([kubernetes/kubernetes#135103](https://github.com/kubernetes/kubernetes/pull/135103), [@ania-borowiec](https://github.com/ania-borowiec)) [SIG API Machinery, Apps, Architecture, Auth, Autoscaling, CLI, Cloud Provider, Cluster Lifecycle, Etcd, Instrumentation, Network, Node, Scheduling, Storage and Testing] +- Enhanced discovery responses to merge API groups and resources from all peer apiservers when the `UnknownVersionInteroperabilityProxy` feature is enabled. ([kubernetes/kubernetes#133648](https://github.com/kubernetes/kubernetes/pull/133648), [@richabanker](https://github.com/richabanker)) [SIG API Machinery, Auth, Cloud Provider, Node, Scheduling and Testing] +- Extended `core/v1` `Toleration` to support numeric comparison operators (`Gt`,`Lt`). ([kubernetes/kubernetes#134665](https://github.com/kubernetes/kubernetes/pull/134665), [@helayoty](https://github.com/helayoty)) [SIG API Machinery, Apps, Node, Scheduling, Testing and Windows] +- Feature gate dependencies are now explicit, and validated at startup. A feature can no longer be enabled if it depends on a disabled feature. In particular, this means that `AllAlpha=true` will no longer work without enabling disabled-by-default beta features that are depended on (either with `AllBeta=true` or explicitly enumerating the disabled dependencies). ([kubernetes/kubernetes#133697](https://github.com/kubernetes/kubernetes/pull/133697), [@tallclair](https://github.com/tallclair)) [SIG API Machinery, Architecture, Cluster Lifecycle and Node] +- Generated OpenAPI model packages for API types into `zz_generated.model_name.go` files, accessible via the `OpenAPIModelName()` function. This allows API authors to declare desired OpenAPI model packages instead of relying on the Go package path of API types. ([kubernetes/kubernetes#131755](https://github.com/kubernetes/kubernetes/pull/131755), [@jpbetz](https://github.com/jpbetz)) [SIG API Machinery, Apps, Architecture, Auth, CLI, Cloud Provider, Cluster Lifecycle, Instrumentation, Network, Node, Scheduling, Storage and Testing] +- Implemented constrained impersonation as described in [KEP-5284](https://kep.k8s.io/5284). ([kubernetes/kubernetes#134803](https://github.com/kubernetes/kubernetes/pull/134803), [@enj](https://github.com/enj)) [SIG API Machinery, Auth and Testing] +- Introduced a new declarative validation tag `+k8s:customUnique` to control listmap uniqueness. ([kubernetes/kubernetes#134279](https://github.com/kubernetes/kubernetes/pull/134279), [@yongruilin](https://github.com/yongruilin)) [SIG API Machinery and Auth] +- Introduced a structured and versioned `v1alpha1` response for the `statusz` endpoint. ([kubernetes/kubernetes#134313](https://github.com/kubernetes/kubernetes/pull/134313), [@richabanker](https://github.com/richabanker)) [SIG API Machinery, Architecture, Instrumentation, Network, Node, Scheduling and Testing] +- Introduced a structured and versioned `v1alpha1` response format for the `flagz` endpoint. ([kubernetes/kubernetes#134995](https://github.com/kubernetes/kubernetes/pull/134995), [@yongruilin](https://github.com/yongruilin)) [SIG API Machinery, Architecture, Instrumentation, Network, Node, Scheduling and Testing] +- Introduced the GangScheduling kube-scheduler plugin to support "all-or-nothing" scheduling using the `scheduling.k8s.io/v1alpha1` Workload API. ([kubernetes/kubernetes#134722](https://github.com/kubernetes/kubernetes/pull/134722), [@macsko](https://github.com/macsko)) [SIG API Machinery, Apps, Auth, CLI, Etcd, Scheduling and Testing] +- Introduced the Node Declared Features capability (alpha), which includes: + - A new `Node.Status.DeclaredFeatures` field for publishing node-specific features. + - A `component-helpers` library for feature registration and inference. + - A `NodeDeclaredFeatures` scheduler plugin to match pods with nodes that provide required features. + - A `NodeDeclaredFeatureValidator` admission plugin to validate pod updates against a node's declared features. ([kubernetes/kubernetes#133389](https://github.com/kubernetes/kubernetes/pull/133389), [@pravk03](https://github.com/pravk03)) [SIG API Machinery, Apps, Node, Release, Scheduling and Testing] +- Introduced the `scheduling.k8s.io/v1alpha1` Workload API to express workload-level scheduling requirements and allow the kube-scheduler to act on them. ([kubernetes/kubernetes#134564](https://github.com/kubernetes/kubernetes/pull/134564), [@macsko](https://github.com/macsko)) [SIG API Machinery, Apps, CLI, Etcd, Scheduling and Testing] +- Introduced the alpha `MutableSchedulingDirectivesForSuspendedJobs` feature gate (disabled by default), which allows mutating a Job's scheduling directives while the Job is suspended. + It also updates the Job controller to clears the `status.startTime` field for suspended Jobs. ([kubernetes/kubernetes#135104](https://github.com/kubernetes/kubernetes/pull/135104), [@mimowo](https://github.com/mimowo)) [SIG Apps and Testing] +- Kube-apiserver: Fixed a `v1.34` regression in `CustomResourceDefinition` handling that incorrectly warned about unrecognized formats on number and integer properties. ([kubernetes/kubernetes#133896](https://github.com/kubernetes/kubernetes/pull/133896), [@yongruilin](https://github.com/yongruilin)) [SIG API Machinery, Apps, Architecture, Auth, CLI, Cloud Provider, Contributor Experience, Network, Node and Scheduling] +- Kube-apiserver: Fixed a possible panic validating a custom resource whose `CustomResourceDefinition` indicates a status subresource exists, but which does not define a `status` property in the `openAPIV3Schema`. ([kubernetes/kubernetes#133721](https://github.com/kubernetes/kubernetes/pull/133721), [@fusida](https://github.com/fusida)) [SIG API Machinery, Apps, Architecture, Auth, Autoscaling, CLI, Cloud Provider, Cluster Lifecycle, Etcd, Instrumentation, Network, Node, Release, Scheduling, Storage and Testing] +- Kubernetes API Go types removed runtime use of the `github.com/gogo/protobuf` library, and are no longer registered into the global gogo type registry. Kubernetes API Go types were not suitable for use with the `google.golang.org/protobuf` library, and no longer implement `ProtoMessage()` by default to avoid accidental incompatible use. If removal of these marker methods impacts your use, it can be re-enabled for one more release with a `kubernetes_protomessage_one_more_release` build tag, but will be removed in `v1.36`. ([kubernetes/kubernetes#134256](https://github.com/kubernetes/kubernetes/pull/134256), [@liggitt](https://github.com/liggitt)) [SIG API Machinery, Apps, Architecture, Auth, CLI, Cluster Lifecycle, Instrumentation, Network, Node, Scheduling and Storage] +- Made node affinity in Persistent Volume mutable. ([kubernetes/kubernetes#134339](https://github.com/kubernetes/kubernetes/pull/134339), [@huww98](https://github.com/huww98)) [SIG API Machinery, Apps and Node] +- Moved the `ImagePullIntent` and `ImagePulledRecord` objects used by the kubelet to track image pulls to the `v1beta1` API version. ([kubernetes/kubernetes#132579](https://github.com/kubernetes/kubernetes/pull/132579), [@stlaz](https://github.com/stlaz)) [SIG Auth and Node] +- Pod resize now only allows CPU and memory resources; other resource types are forbidden. ([kubernetes/kubernetes#135084](https://github.com/kubernetes/kubernetes/pull/135084), [@tallclair](https://github.com/tallclair)) [SIG Apps, Node and Testing] +- Prevented Pods from being scheduled onto nodes that lack the required CSI driver. ([kubernetes/kubernetes#135012](https://github.com/kubernetes/kubernetes/pull/135012), [@gnufied](https://github.com/gnufied)) [SIG API Machinery, Scheduling, Storage and Testing] +- Promoted HPA configurable tolerance to beta. The `HPAConfigurableTolerance` feature gate has now been enabled by default. ([kubernetes/kubernetes#133128](https://github.com/kubernetes/kubernetes/pull/133128), [@jm-franc](https://github.com/jm-franc)) [SIG API Machinery and Autoscaling] +- Promoted ReplicaSet and Deployment `.status.terminatingReplicas` tracking to beta. The `DeploymentReplicaSetTerminatingReplicas` feature gate is now enabled by default. ([kubernetes/kubernetes#133087](https://github.com/kubernetes/kubernetes/pull/133087), [@atiratree](https://github.com/atiratree)) [SIG API Machinery, Apps and Testing] +- Promoted `PodObservedGenerationTracking` to GA. ([kubernetes/kubernetes#134948](https://github.com/kubernetes/kubernetes/pull/134948), [@natasha41575](https://github.com/natasha41575)) [SIG API Machinery, Apps, Node, Scheduling and Testing] +- Promoted the `JobManagedBy` feature to general availability. The `JobManagedBy` feature gate was locked to `true` and will be removed in a future Kubernetes release. ([kubernetes/kubernetes#135080](https://github.com/kubernetes/kubernetes/pull/135080), [@dejanzele](https://github.com/dejanzele)) [SIG API Machinery, Apps and Testing] +- Promoted the `MaxUnavailableStatefulSet` feature to beta and enabling it by default. ([kubernetes/kubernetes#133153](https://github.com/kubernetes/kubernetes/pull/133153), [@helayoty](https://github.com/helayoty)) [SIG API Machinery and Apps] +- Removed the `StrictCostEnforcementForVAP` and `StrictCostEnforcementForWebhooks` feature gates, which were locked since `v1.32`. ([kubernetes/kubernetes#134994](https://github.com/kubernetes/kubernetes/pull/134994), [@liggitt](https://github.com/liggitt)) [SIG API Machinery, Auth, Node and Testing] +- Scheduler: Added the `bindingTimeout` argument to the DynamicResources plugin configuration, allowing customization of the wait duration in `PreBind` for device binding conditions. + Defaults to 10 minutes when `DRADeviceBindingConditions` and `DRAResourceClaimDeviceStatus` are both enabled. ([kubernetes/kubernetes#134905](https://github.com/kubernetes/kubernetes/pull/134905), [@fj-naji](https://github.com/fj-naji)) [SIG Node and Scheduling] +- The DRA device taints and toleration feature received a separate feature gate, `DRADeviceTaintRules`, which controlled support for `DeviceTaintRules`. This allowed disabling it while keeping `DRADeviceTaints` enabled so that tainting via `ResourceSlices` continued to work. ([kubernetes/kubernetes#135068](https://github.com/kubernetes/kubernetes/pull/135068), [@pohly](https://github.com/pohly)) [SIG API Machinery, Apps, Auth, Node, Scheduling and Testing] +- The Pod Certificates feature moved to beta. The `PodCertificateRequest` feature gate is set disabled by default. To use the feature, users must enable the certificates API groups in `v1beta1` and enable the `PodCertificateRequest` feature gate. The `UserAnnotations` field was added to the `PodCertificateProjection` API and the corresponding `UnverifiedUserAnnotations` field was added to the `PodCertificateRequest` API. ([kubernetes/kubernetes#134624](https://github.com/kubernetes/kubernetes/pull/134624), [@yt2985](https://github.com/yt2985)) [SIG API Machinery, Apps, Auth, Etcd, Instrumentation, Node and Testing] +- The `KubeletEnsureSecretPulledImages` feature was promoted to Beta and enabled by default. ([kubernetes/kubernetes#135228](https://github.com/kubernetes/kubernetes/pull/135228), [@aramase](https://github.com/aramase)) [SIG Auth, Node and Testing] +- The `PreferSameZone` and `PreferSameNode` values for the Service + `trafficDistribution` field graduated to general availability. The + `PreferClose` value is now deprecated in favor of the more explicit + `PreferSameZone`. ([kubernetes/kubernetes#134457](https://github.com/kubernetes/kubernetes/pull/134457), [@danwinship](https://github.com/danwinship)) [SIG API Machinery, Apps, Network and Testing] +- Updated `ResourceQuota` to count device class requests within a `ResourceClaim` as two additional quotas when the `DRAExtendedResource` feature is enabled: + - `requests.deviceclass.resource.k8s.io/` is charged based on the worst-case number of devices requested. + - Device classes mapping to an extended resource now consume `requests.`. ([kubernetes/kubernetes#134210](https://github.com/kubernetes/kubernetes/pull/134210), [@yliaog](https://github.com/yliaog)) [SIG API Machinery, Apps, Node, Scheduling and Testing] +- Updated storage version for `MutatingAdmissionPolicy` to `v1beta1`. ([kubernetes/kubernetes#133715](https://github.com/kubernetes/kubernetes/pull/133715), [@cici37](https://github.com/cici37)) [SIG API Machinery, Etcd and Testing] +- Updated the Partitionable Devices feature to support referencing counter sets across ResourceSlices within the same resource pool. Devices from incomplete pools were no longer considered for allocation. This change introduced backwards-incompatible updates to the alpha feature, requiring any ResourceSlices using it to be removed before upgrading or downgrading between v1.34 and v1.35. ([kubernetes/kubernetes#134189](https://github.com/kubernetes/kubernetes/pull/134189), [@mortent](https://github.com/mortent)) [SIG API Machinery, Node, Scheduling and Testing] +- Upgraded the `PodObservedGenerationTracking` feature to beta in `v1.34` and removed the alpha version description from the OpenAPI specification. ([kubernetes/kubernetes#133883](https://github.com/kubernetes/kubernetes/pull/133883), [@yangjunmyfm192085](https://github.com/yangjunmyfm192085)) +- Add scoring for the prioritized list feature so that the node that can satisfy the best ranked subrequests are chosen. ([kubernetes/kubernetes#134711](https://github.com/kubernetes/kubernetes/pull/134711), [@mortent](https://github.com/mortent)) [SIG Node, Scheduling and Testing] +- Allows restart all containers when the source container exits with a matching restart policy rule. This is an alpha feature behind feature gate RestartAllContainersOnContainerExit. ([kubernetes/kubernetes#134345](https://github.com/kubernetes/kubernetes/pull/134345), [@yuanwang04](https://github.com/yuanwang04)) [SIG Apps, Node and Testing] +- Changed kuberc configuration schema. Two new optional fields added to kuberc configuration, `credPluginPolicy` and `credPluginAllowlist`. This is documented in [KEP-3104](https://github.com/kubernetes/enhancements/blob/master/keps/sig-cli/3104-introduce-kuberc/README.md#allowlist-design-details) and documentation is added to the website by [kubernetes/website#52877](https://github.com/kubernetes/website/pull/52877) ([kubernetes/kubernetes#134870](https://github.com/kubernetes/kubernetes/pull/134870), [@pmengelbert](https://github.com/pmengelbert)) [SIG API Machinery, Architecture, Auth, CLI, Instrumentation and Testing] +- Enhanced discovery response to support merged API groups/resources from all peer apiservers when UnknownVersionInteroperabilityProxy feature is enabled ([kubernetes/kubernetes#133648](https://github.com/kubernetes/kubernetes/pull/133648), [@richabanker](https://github.com/richabanker)) [SIG API Machinery, Auth, Cloud Provider, Node, Scheduling and Testing] +- Extend `core/v1 Toleration` to support numeric comparison operators (`Gt`, `Lt`). ([kubernetes/kubernetes#134665](https://github.com/kubernetes/kubernetes/pull/134665), [@helayoty](https://github.com/helayoty)) [SIG API Machinery, Apps, Node, Scheduling, Testing and Windows] +- Features: NominatedNodeNameForExpectation in kube-scheduler and CleaeringNominatedNodeNameAfterBinding in kube-apiserver are now enabled by default. ([kubernetes/kubernetes#135103](https://github.com/kubernetes/kubernetes/pull/135103), [@ania-borowiec](https://github.com/ania-borowiec)) [SIG API Machinery, Apps, Architecture, Auth, Autoscaling, CLI, Cloud Provider, Cluster Lifecycle, Etcd, Instrumentation, Network, Node, Scheduling, Storage and Testing] +- Implement changes to prevent pod scheduling to a node without CSI driver ([kubernetes/kubernetes#135012](https://github.com/kubernetes/kubernetes/pull/135012), [@gnufied](https://github.com/gnufied)) [SIG API Machinery, Scheduling, Storage and Testing] +- Introduce scheduling.k8s.io/v1alpha1 Workload API to allow for expressing workload-level scheduling requirements and let kube-scheduler act on those. ([kubernetes/kubernetes#134564](https://github.com/kubernetes/kubernetes/pull/134564), [@macsko](https://github.com/macsko)) [SIG API Machinery, Apps, CLI, Etcd, Scheduling and Testing] +- Introduce the alpha MutableSchedulingDirectivesForSuspendedJobs feature gate (disabled by default) which: + 1. allows to mutate Job's scheduling directives for suspended Jobs + 2. makes the Job controller to clear the status.startTime field for suspended Jobs ([kubernetes/kubernetes#135104](https://github.com/kubernetes/kubernetes/pull/135104), [@mimowo](https://github.com/mimowo)) [SIG Apps and Testing] +- Introduced GangScheduling kube-scheduler plugin to enable "all-or-nothing" scheduling. Workload API in scheduling.k8s.io/v1alpha1 is used to express the desired policy. ([kubernetes/kubernetes#134722](https://github.com/kubernetes/kubernetes/pull/134722), [@macsko](https://github.com/macsko)) [SIG API Machinery, Apps, Auth, CLI, Etcd, Scheduling and Testing] +- PV node affinity is now mutable. ([kubernetes/kubernetes#134339](https://github.com/kubernetes/kubernetes/pull/134339), [@huww98](https://github.com/huww98)) [SIG API Machinery, Apps and Node] +- ResourceQuota now counts device class requests within a ResourceClaim object as consuming two additional quotas when the DRAExtendedResource feature is enabled: + - `requests.deviceclass.resource.k8s.io/` with a quantity equal to the worst case count of devices requested + - requests for device classes that map to an extended resource consume `requests.` ([kubernetes/kubernetes#134210](https://github.com/kubernetes/kubernetes/pull/134210), [@yliaog](https://github.com/yliaog)) [SIG API Machinery, Apps, Node, Scheduling and Testing] +- The DRA device taints and toleration feature now has a separate feature gate, DRADeviceTaintRules, which controls whether support for DeviceTaintRules is enabled. It is possible to disable that and keep DRADeviceTaints enabled, in which case tainting by DRA drivers through ResourceSlices continues to work. ([kubernetes/kubernetes#135068](https://github.com/kubernetes/kubernetes/pull/135068), [@pohly](https://github.com/pohly)) [SIG API Machinery, Apps, Auth, Node, Scheduling and Testing] +- The ImagePullIntent and ImagePulledRecord objects used by kubelet to store information about image pulls have been moved to the v1beta1 API version. ([kubernetes/kubernetes#132579](https://github.com/kubernetes/kubernetes/pull/132579), [@stlaz](https://github.com/stlaz)) [SIG Auth and Node] +- The KubeletEnsureSecretPulledImages feature is now beta and enabled by default. ([kubernetes/kubernetes#135228](https://github.com/kubernetes/kubernetes/pull/135228), [@aramase](https://github.com/aramase)) [SIG Auth, Node and Testing] +- This change adds a new alpha feature Node Declared Features, which includes: + - A new `Node.Status.DeclaredFeatures` field for Kubelet to publish node-specific features. + - A library in `component-helpers` for feature registration and inference. + - A scheduler plugin (`NodeDeclaredFeatures`) scheduler plugin to match pods with nodes that provide their required features. + - An admission plugin (`NodeDeclaredFeatureValidator`) to validate pod updates against a node's declared features. ([kubernetes/kubernetes#133389](https://github.com/kubernetes/kubernetes/pull/133389), [@pravk03](https://github.com/pravk03)) [SIG API Machinery, Apps, Node, Release, Scheduling and Testing] +- This change allows In Place Resize of Pod Level Resources + - Add Resources in PodStatus to capture resources set at pod-level cgroup + - Add AllocatedResources in PodStatus to capture resources requested in the PodSpec ([kubernetes/kubernetes#132919](https://github.com/kubernetes/kubernetes/pull/132919), [@ndixita](https://github.com/ndixita)) [SIG API Machinery, Apps, Architecture, Auth, CLI, Instrumentation, Node, Scheduling and Testing] +- Updates to the Partitionable Devices feature which allows for referencing counter sets across different ResourceSlices within the same resource pool. + + Devices from incomplete pools are no longer considered for allocation. + + This contains backwards incompatible changes to the Partitionable Devices alpha feature, so any ResourceSlices that uses the feature should be removed prior to upgrading or downgrading between 1.34 and 1.35. ([kubernetes/kubernetes#134189](https://github.com/kubernetes/kubernetes/pull/134189), [@mortent](https://github.com/mortent)) [SIG API Machinery, Node, Scheduling and Testing] +- Add ObservedGeneration to CustomResourceDefinition Conditions. ([kubernetes/kubernetes#134984](https://github.com/kubernetes/kubernetes/pull/134984), [@michaelasp](https://github.com/michaelasp)) [SIG API Machinery] +- Add StorageVersionMigration v1beta1 api and remove the v1alpha API. + + Any use of the v1alpha1 api is no longer supported and + users must remove any v1alpha1 resources prior to upgrade. ([kubernetes/kubernetes#134784](https://github.com/kubernetes/kubernetes/pull/134784), [@michaelasp](https://github.com/michaelasp)) [SIG API Machinery, Apps, Auth, Etcd and Testing] +- CSI drivers can now opt-in to receive service account tokens via the secrets field instead of volume context by setting `spec.serviceAccountTokenInSecrets: true` in the CSIDriver object. This prevents tokens from being exposed in logs and other outputs. The feature is gated by the `CSIServiceAccountTokenSecrets` feature gate (Beta in v1.35). ([kubernetes/kubernetes#134826](https://github.com/kubernetes/kubernetes/pull/134826), [@aramase](https://github.com/aramase)) [SIG API Machinery, Auth, Storage and Testing] +- DRA device taints: DeviceTaintRule status provided information about the rule, in particular whether pods still need to be evicted ("EvictionInProgress" condition). The new "None" effect can be used to preview what a DeviceTaintRule would do if it used the "NoExecute" effect and to taint devices ("device health") without immediately affecting scheduling or running pods. ([kubernetes/kubernetes#134152](https://github.com/kubernetes/kubernetes/pull/134152), [@pohly](https://github.com/pohly)) [SIG API Machinery, Apps, Auth, Node, Release, Scheduling and Testing] +- DRA: the DynamicResourceAllocation feature gate for the core functionality (GA in 1.34) is now locked to enabled-by-default and thus cannot be disabled anymore. ([kubernetes/kubernetes#134452](https://github.com/kubernetes/kubernetes/pull/134452), [@pohly](https://github.com/pohly)) [SIG Auth, Node, Scheduling and Testing] +- Forbid adding resources other than CPU & memory on pod resize. ([kubernetes/kubernetes#135084](https://github.com/kubernetes/kubernetes/pull/135084), [@tallclair](https://github.com/tallclair)) [SIG Apps, Node and Testing] +- Implement constrained impersonation as described in https://kep.k8s.io/5284 ([kubernetes/kubernetes#134803](https://github.com/kubernetes/kubernetes/pull/134803), [@enj](https://github.com/enj)) [SIG API Machinery, Auth and Testing] +- Introduces a structured and versioned v1alpha1 response for flagz ([kubernetes/kubernetes#134995](https://github.com/kubernetes/kubernetes/pull/134995), [@yongruilin](https://github.com/yongruilin)) [SIG API Machinery, Architecture, Instrumentation, Network, Node, Scheduling and Testing] +- Introduces a structured and versioned v1alpha1 response for statusz ([kubernetes/kubernetes#134313](https://github.com/kubernetes/kubernetes/pull/134313), [@richabanker](https://github.com/richabanker)) [SIG API Machinery, Architecture, Instrumentation, Network, Node, Scheduling and Testing] +- New `--min-compatibility-version` flag for apiserver, kcm and kube scheduler ([kubernetes/kubernetes#133980](https://github.com/kubernetes/kubernetes/pull/133980), [@siyuanfoundation](https://github.com/siyuanfoundation)) [SIG API Machinery, Architecture, Cluster Lifecycle, Etcd, Scheduling and Testing] +- Promote PodObservedGenerationTracking to GA. ([kubernetes/kubernetes#134948](https://github.com/kubernetes/kubernetes/pull/134948), [@natasha41575](https://github.com/natasha41575)) [SIG API Machinery, Apps, Node, Scheduling and Testing] +- Promoted Job Managed By to general availability. The `JobManagedBy` feature gate is now locked to true, and will be removed in a future release of Kubernetes. ([kubernetes/kubernetes#135080](https://github.com/kubernetes/kubernetes/pull/135080), [@dejanzele](https://github.com/dejanzele)) [SIG API Machinery, Apps and Testing] +- Promoted ReplicaSet and Deployment `.status.terminatingReplicas` tracking to beta. The `DeploymentReplicaSetTerminatingReplicas` feature gate is now enabled by default. ([kubernetes/kubernetes#133087](https://github.com/kubernetes/kubernetes/pull/133087), [@atiratree](https://github.com/atiratree)) [SIG API Machinery, Apps and Testing] +- Scheduler: added a new `bindingTimeout` argument to the DynamicResources plugin configuration. + This allows customizing the wait duration in PreBind for device binding conditions. + Defaults to 10 minutes when DRADeviceBindingConditions and DRAResourceClaimDeviceStatus are both enabled. ([kubernetes/kubernetes#134905](https://github.com/kubernetes/kubernetes/pull/134905), [@fj-naji](https://github.com/fj-naji)) [SIG Node and Scheduling] +- The Pod Certificates feature is moving to beta. The PodCertificateRequest feature gate is still set false by default. To use the feature, users will need to enable the certificates API groups in v1beta1 and enable the feature gate PodCertificateRequest. A new field UserAnnotations is added to the PodCertificateProjection API and the corresponding UnverifiedUserAnnotations is added to the PodCertificateRequest API. ([kubernetes/kubernetes#134624](https://github.com/kubernetes/kubernetes/pull/134624), [@yt2985](https://github.com/yt2985)) [SIG API Machinery, Apps, Auth, Etcd, Instrumentation, Node and Testing] +- The StrictCostEnforcementForVAP and StrictCostEnforcementForWebhooks feature gates, locked on since 1.32, have been removed ([kubernetes/kubernetes#134994](https://github.com/kubernetes/kubernetes/pull/134994), [@liggitt](https://github.com/liggitt)) [SIG API Machinery, Auth, Node and Testing] +- The `PreferSameZone` and `PreferSameNode` values for Service's + `trafficDistribution` field are now GA. The old value `PreferClose` is now + deprecated in favor of the more-explicit `PreferSameZone`. ([kubernetes/kubernetes#134457](https://github.com/kubernetes/kubernetes/pull/134457), [@danwinship](https://github.com/danwinship)) [SIG API Machinery, Apps, Network and Testing] +- Kube-apiserver: fix a possible panic validating a custom resource whose CustomResourceDefinition indicates a status subresource exists, but which does not define a `status` property in the `openAPIV3Schema` ([kubernetes/kubernetes#133721](https://github.com/kubernetes/kubernetes/pull/133721), [@fusida](https://github.com/fusida)) [SIG API Machinery, Apps, Architecture, Auth, Autoscaling, CLI, Cloud Provider, Cluster Lifecycle, Etcd, Instrumentation, Network, Node, Release, Scheduling, Storage and Testing] +- Kubernetes API Go types removed runtime use of the github.com/gogo/protobuf library, and are no longer registered into the global gogo type registry. Kubernetes API Go types were not suitable for use with the google.golang.org/protobuf library, and no longer implement `ProtoMessage()` by default to avoid accidental incompatible use. If removal of these marker methods impacts your use, it can be re-enabled for one more release with a `kubernetes_protomessage_one_more_release` build tag, but will be removed in 1.36. ([kubernetes/kubernetes#134256](https://github.com/kubernetes/kubernetes/pull/134256), [@liggitt](https://github.com/liggitt)) [SIG API Machinery, Apps, Architecture, Auth, CLI, Cluster Lifecycle, Instrumentation, Network, Node, Scheduling and Storage] +- Promoted HPA configurable tolerance to beta. The `HPAConfigurableTolerance` feature gate is now enabled by default. ([kubernetes/kubernetes#133128](https://github.com/kubernetes/kubernetes/pull/133128), [@jm-franc](https://github.com/jm-franc)) [SIG API Machinery and Autoscaling] +- The MaxUnavailableStatefulSet feature is now beta and enabled by default. ([kubernetes/kubernetes#133153](https://github.com/kubernetes/kubernetes/pull/133153), [@helayoty](https://github.com/helayoty)) [SIG API Machinery and Apps] +- Added WithOrigin within apis/core/validation with adjusted tests ([kubernetes/kubernetes#132825](https://github.com/kubernetes/kubernetes/pull/132825), [@PatrickLaabs](https://github.com/PatrickLaabs)) [SIG Apps] +- Component-base: validate that log-flush-frequency is positive and return an error instead of panic-ing ([kubernetes/kubernetes#133540](https://github.com/kubernetes/kubernetes/pull/133540), [@BenTheElder](https://github.com/BenTheElder)) [SIG Architecture, Instrumentation, Network and Node] +- Feature gate dependencies are now explicit, and validated at startup. A feature can no longer be enabled if it depends on a disabled feature. In particular, this means that `AllAlpha=true` will no longer work without enabling disabled-by-default beta features that are depended on (either with `AllBeta=true` or explicitly enumerating the disabled dependencies). ([kubernetes/kubernetes#133697](https://github.com/kubernetes/kubernetes/pull/133697), [@tallclair](https://github.com/tallclair)) [SIG API Machinery, Architecture, Cluster Lifecycle and Node] +- In version 1.34, the PodObservedGenerationTracking feature has been upgraded to beta, and the description of the alpha version in the openapi has been removed. ([kubernetes/kubernetes#133883](https://github.com/kubernetes/kubernetes/pull/133883), [@yangjunmyfm192085](https://github.com/yangjunmyfm192085)) [SIG Apps] +- Introduce a new declarative validation tag +k8s:customUnique to control listmap uniqueness ([kubernetes/kubernetes#134279](https://github.com/kubernetes/kubernetes/pull/134279), [@yongruilin](https://github.com/yongruilin)) [SIG API Machinery and Auth] +- Kube-apiserver: Fixed a 1.34 regression in CustomResourceDefinition handling that incorrectly warned about unrecognized formats on number and integer properties ([kubernetes/kubernetes#133896](https://github.com/kubernetes/kubernetes/pull/133896), [@yongruilin](https://github.com/yongruilin)) [SIG API Machinery, Apps, Architecture, Auth, CLI, Cloud Provider, Contributor Experience, Network, Node and Scheduling] +- OpenAPI model packages of API types are generated into `zz_generated.model_name.go` files and are accessible using the `OpenAPIModelName()` function. This allows API authors to declare the desired OpenAPI model packages instead of using the go package path of API types. ([kubernetes/kubernetes#131755](https://github.com/kubernetes/kubernetes/pull/131755), [@jpbetz](https://github.com/jpbetz)) [SIG API Machinery, Apps, Architecture, Auth, CLI, Cloud Provider, Cluster Lifecycle, Instrumentation, Network, Node, Scheduling, Storage and Testing] +- Support for `kubectl get -o kyaml` is now on by default. To disable it, set `KUBECTL_KYAML=false`. ([kubernetes/kubernetes#133327](https://github.com/kubernetes/kubernetes/pull/133327), [@thockin](https://github.com/thockin)) [SIG CLI] +- The storage version for MutatingAdmissionPolicy is updated to v1beta1. ([kubernetes/kubernetes#133715](https://github.com/kubernetes/kubernetes/pull/133715), [@cici37](https://github.com/cici37)) [SIG API Machinery, Etcd and Testing] +# v34.1.0 + +Kubernetes API Version: v1.34.1 + + +# v34.1.0b1 + +Kubernetes API Version: v1.34.1 + + +# v34.1.0a1 + +Kubernetes API Version: v1.34.1 + +### API Change +- Added `omitempty` and `opt` tag to the API `v1beta2` AdminAccess type in the `DeviceRequestAllocationResult` struct. ([kubernetes/kubernetes#132338](https://github.com/kubernetes/kubernetes/pull/132338), [@PatrickLaabs](https://github.com/PatrickLaabs)) +- Added a `runtime.ApplyConfiguration` interface implemented by all generated apply configuration types. ([kubernetes/kubernetes#132194](https://github.com/kubernetes/kubernetes/pull/132194), [@alvaroaleman](https://github.com/alvaroaleman)) [SIG API Machinery and Instrumentation] +- Added a detailed event for in-place pod vertical scaling completed, improving cluster management and debugging. ([kubernetes/kubernetes#130387](https://github.com/kubernetes/kubernetes/pull/130387), [@shiya0705](https://github.com/shiya0705)) [SIG API Machinery, Apps, Autoscaling, Node, Scheduling and Testing] +- Added a mechanism for configurable container restarts: _container-level restart rules_. This was an alpha feature behind the `ContainerRestartRules` feature gate. ([kubernetes/kubernetes#132642](https://github.com/kubernetes/kubernetes/pull/132642), [@yuanwang04](https://github.com/yuanwang04)) [SIG API Machinery, Apps, Node and Testing] +- Added a new `FileKeyRef` field to containers, allowing them to load variables from files by setting this field. + + Introduced the `EnvFiles` feature gate to govern activation of this functionality. ([kubernetes/kubernetes#132626](https://github.com/kubernetes/kubernetes/pull/132626), [@HirazawaUi](https://github.com/HirazawaUi)) [SIG API Machinery, Apps, Node and Testing] +- Added driver-owned fields in `ResourceSlice` to mark whether the device was shareable among multiple resource claims (or requests) and to specify how each capacity could be shared between different requests. + - Added user-owned fields in `ResourceClaim` to specify resource requirements against each device capacity. + - Added scheduler-owned field in `ResourceClaim.Status` to specify how much device capacity is reserved for a specific request. + - Added an additional identifier to `ResourceClaim.Status` for the device supports multiple allocations. + - Added a new constraint type to enforce uniqueness of specified attributes across all allocated devices. ([kubernetes/kubernetes#132522](https://github.com/kubernetes/kubernetes/pull/132522), [@sunya-ch](https://github.com/sunya-ch)) [SIG API Machinery, Apps, Architecture, CLI, Cluster Lifecycle, Network, Node, Release, Scheduling and Testing] +- Added new optional APIs in `ResouceSlice.Basic` and `ResourceClaim.Status.AllocatedDeviceStatus`. ([kubernetes/kubernetes#130160](https://github.com/kubernetes/kubernetes/pull/130160), [@KobayashiD27](https://github.com/KobayashiD27)) [SIG API Machinery, Apps, Architecture, Node, Release, Scheduling and Testing] +- Added support for specifying `controlplane` or `cluster` egress selectors in JWT authenticators via the `issuer.egressSelectorType` field in the `AuthenticationConfiguration.jwt` array. If unset, the previous behavior of using no egress selector is preserved. This functionality requires the `StructuredAuthenticationConfigurationEgressSelector` beta feature gate (enabled by default). ([kubernetes/kubernetes#132768](https://github.com/kubernetes/kubernetes/pull/132768), [@enj](https://github.com/enj)) [SIG API Machinery, Auth and Testing] +- Added support in the Kubelet for monitoring the health of devices allocated via Dynamic Resource Allocation (DRA) and report it in the `pod.status.containerStatuses.allocatedResourcesStatus` field. This required the DRA plugin to implement the new v1alpha1 `NodeHealth` gRPC service. This feature was controlled by the `ResourceHealthStatus` feature gate. ([kubernetes/kubernetes#130606](https://github.com/kubernetes/kubernetes/pull/130606), [@Jpsassine](https://github.com/Jpsassine)) [SIG Apps, Architecture, Auth, CLI, Cloud Provider, Cluster Lifecycle, Etcd, Network, Node, Release, Scheduling, Storage and Testing] +- Added support in the kubelet's image pull credential tracking for service account-based verification. When an image was pulled using service account credentials via external credential providers, subsequent Pods using the same service account (UID, name, and namespace) could access the cached image without re-authentication for the lifetime of that service account. ([kubernetes/kubernetes#132771](https://github.com/kubernetes/kubernetes/pull/132771), [@aramase](https://github.com/aramase)) [SIG Auth, Node and Testing] +- Added validation to reject Pods using the `PodLevelResources` feature on Windows OS due to lack of support. The API server rejected Pods with pod-level resources and a `Pod.spec.os.name` targeting Windows. Kubelet on nodes running Windows also rejected Pods with pod-level resources at the admission phase. ([kubernetes/kubernetes#133046](https://github.com/kubernetes/kubernetes/pull/133046), [@toVersus](https://github.com/toVersus)) [SIG Apps and Node] +- Added warnings when creating headless service with set `loadBalancerIP`,`externalIPs` and/or `SessionAffinity`. ([kubernetes/kubernetes#132214](https://github.com/kubernetes/kubernetes/pull/132214), [@Peac36](https://github.com/Peac36)) +- Allowed `pvc.spec.VolumeAttributesClassName` to change from non-nil to nil. ([kubernetes/kubernetes#132106](https://github.com/kubernetes/kubernetes/pull/132106), [@AndrewSirenko](https://github.com/AndrewSirenko)) +- Allowed setting the `hostnameOverride` field in `PodSpec` to specify any RFC 1123 DNS subdomain as the pod's hostname. The `HostnameOverride` feature gate was introduced to control enablement of this functionality. ([kubernetes/kubernetes#132558](https://github.com/kubernetes/kubernetes/pull/132558), [@HirazawaUi](https://github.com/HirazawaUi)) [SIG API Machinery, Apps, Network, Node and Testing] +- Changed underlying logic for `Eviction Manager` helper functions. ([kubernetes/kubernetes#132277](https://github.com/kubernetes/kubernetes/pull/132277), [@KevinTMtz](https://github.com/KevinTMtz)) [SIG Node, Scheduling and Testing] +- Changed underlying logic to propagate pod-level hugepage cgroup to containers when they did not specify hugepage resources. + - Added validation to enforce the hugepage aggregated container limits to be smaller than or equal to pod-level limits. This was already enforced with the defaulted requests from the specified limits, however it did not make it clear about both hugepage requests and limits. ([kubernetes/kubernetes#131089](https://github.com/kubernetes/kubernetes/pull/131089), [@KevinTMtz](https://github.com/KevinTMtz)) [SIG Apps, Node and Testing] +- Corrected the documentation to clarify that `podSelector` is optional and described its default behavior. ([kubernetes/kubernetes#131354](https://github.com/kubernetes/kubernetes/pull/131354), [@tomoish](https://github.com/tomoish)) +- DRA API: resource.k8s.io/v1alpha3 now only contains DeviceTaintRule. All other types got removed because they became obsolete when introducing the v1beta1 API in 1.32. + before updating a cluster where resourceclaims, resourceclaimtemplates, deviceclasses, or resourceslices might have been stored using Kubernetes < 1.32, delete all of those resources before updating and recreate them as needed while running Kubernetes >= 1.32. ([kubernetes/kubernetes#132000](https://github.com/kubernetes/kubernetes/pull/132000), [@pohly](https://github.com/pohly)) [SIG Etcd, Node, Scheduling and Testing] +- DRA: Starting with Kubernetes 1.34, the alpha-level `resource.k8s.io/admin-access` label has been updated to `resource.kubernetes.io/admin-access`. Admins using the alpha feature and updating from 1.33 can set both labels, upgrade, then remove `resource.k8s.io/admin-access` when no downgrade is going to happen anymore. ([kubernetes/kubernetes#131996](https://github.com/kubernetes/kubernetes/pull/131996), [@ritazh](https://github.com/ritazh)) [SIG Node and Testing] +- DRA: The scheduler plugin prevented abnormal filter runtimes by timing out after 10 seconds. This was configurable via the plugin configuration's `FilterTimeout`. Setting it to zero disabled the timeout and restored the behavior of Kubernetes <= 1.33. ([kubernetes/kubernetes#132033](https://github.com/kubernetes/kubernetes/pull/132033), [@pohly](https://github.com/pohly)) [SIG Node, Scheduling and Testing] +- DRA: When the prioritized list feature was used in a request and the resulting number of allocated devices exceeded the number of allowed devices per claim, the scheduler aborted the attempt to allocate devices early. Previously, it tried to many different combinations, which could take a long time. ([kubernetes/kubernetes#130593](https://github.com/kubernetes/kubernetes/pull/130593), [@mortent](https://github.com/mortent)) [SIG Apps, Node, Scheduling and Testing] +- DRA: removed support for the v1alpha4 kubelet gRPC API (added in 1.31, superseded in 1.32). DRA drivers using the helper package from Kubernetes >= 1.32 use the v1beta1 API and continue to be supported. ([kubernetes/kubernetes#132574](https://github.com/kubernetes/kubernetes/pull/132574), [@pohly](https://github.com/pohly)) +- Deprecated `StreamingConnectionIdleTimeout` field of the kubelet config. ([kubernetes/kubernetes#131992](https://github.com/kubernetes/kubernetes/pull/131992), [@lalitc375](https://github.com/lalitc375)) +- Dynamic Resource Allocation: Graduated core functionality to general availability (GA). This newly stable feature uses the _structured parameters_ flavor of DRA. ([kubernetes/kubernetes#132706](https://github.com/kubernetes/kubernetes/pull/132706), [@pohly](https://github.com/pohly)) [SIG API Machinery, Apps, Auth, Autoscaling, Etcd, Node, Scheduling and Testing] +- Enabled kube-apiserver support for `PodCertificateRequest` and `PodCertificate` projected volumes (behind the `PodCertificateRequest` feature gate). ([kubernetes/kubernetes#128010](https://github.com/kubernetes/kubernetes/pull/128010), [@ahmedtd](https://github.com/ahmedtd)) [SIG API Machinery, Apps, Auth, Cloud Provider, Etcd, Node, Storage and Testing] +- Extended resources backed by DRA feature allowed cluster operator to specify `extendedResourceName` in `DeviceClass`, and application operator to continue using extended resources in pod's requests to request for DRA devices matching the DeviceClass. + + `NodeResourcesFit` plugin scoring didn't work for extended resources backed by DRA. ([kubernetes/kubernetes#130653](https://github.com/kubernetes/kubernetes/pull/130653), [@yliaog](https://github.com/yliaog)) [SIG API Machinery, Apps, Auth, Node, Scheduling and Testing] +- Extended the NodePorts scheduling plugin to consider hostPorts used by restartable init containers. ([kubernetes/kubernetes#132040](https://github.com/kubernetes/kubernetes/pull/132040), [@avrittrohwer](https://github.com/avrittrohwer)) [SIG Scheduling and Testing] +- Fixed a 1.33 regression that causes a nil panic in kube-scheduler when aggregating resource requested across container's spec and status. ([kubernetes/kubernetes#132895](https://github.com/kubernetes/kubernetes/pull/132895), [@yue9944882](https://github.com/yue9944882)) [SIG Node and Scheduling] +- Fixed prerelease lifecycle for `PodCertificateRequest`. ([kubernetes/kubernetes#133350](https://github.com/kubernetes/kubernetes/pull/133350), [@carlory](https://github.com/carlory)) +- Introduced OpenAPI format support for `k8s-short-name` and `k8s-long-name` in CustomResourceDefinition schemas. ([kubernetes/kubernetes#132504](https://github.com/kubernetes/kubernetes/pull/132504), [@jpbetz](https://github.com/jpbetz)) [SIG API Machinery, Architecture, Auth, CLI, Cloud Provider, Cluster Lifecycle, Instrumentation, Network, Node, Scheduling and Storage] +- Introduced the `admissionregistration.k8s.io/v1beta1/MutatingAdmissionPolicy` API type. To enable, enable the `MutatingAdmissionPolicy` feature gate (which was off by default) and set `--runtime-config=admissionregistration.k8s.io/v1beta1=true` on the kube-apiserver. + Note that the default stored version remained alpha in 1.34, and whoever enabled beta during 1.34 needed to run a storage migration yourself to ensure you don't depend on alpha data in etcd. ([kubernetes/kubernetes#132821](https://github.com/kubernetes/kubernetes/pull/132821), [@cici37](https://github.com/cici37)) [SIG API Machinery, Etcd and Testing] +- Kube-apiserver: Added support for disabling caching of authorization webhook decisions in the `--authorization-config` file. The new fields `cacheAuthorizedRequests` and `cacheUnauthorizedRequests` could be set to `false` to prevent caching for authorized or unauthorized requests. See the https://kubernetes.io/docs/reference/access-authn-authz/authorization/#using-configuration-file-for-authorization for more details. ([kubernetes/kubernetes#129237](https://github.com/kubernetes/kubernetes/pull/129237), [@rfranzke](https://github.com/rfranzke)) [SIG API Machinery and Auth] +- Kube-apiserver: Promoted the `StructuredAuthenticationConfiguration` feature gate to GA. ([kubernetes/kubernetes#131916](https://github.com/kubernetes/kubernetes/pull/131916), [@aramase](https://github.com/aramase)) [SIG API Machinery, Auth and Testing] +- Kube-apiserver: the AuthenticationConfiguration type accepted in `--authentication-config` files has been promoted to `apiserver.config.k8s.io/v1`. ([kubernetes/kubernetes#131752](https://github.com/kubernetes/kubernetes/pull/131752), [@aramase](https://github.com/aramase)) [SIG API Machinery, Auth and Testing] +- Kube-log-runner: Added the `-log-file-size` parameter to rotate log output into a new file once it reached a certain size. Introduced `-log-file-age` to enable automatic removal of old output files, and `-flush-interval` to support periodic flushing. ([kubernetes/kubernetes#127667](https://github.com/kubernetes/kubernetes/pull/127667), [@zylxjtu](https://github.com/zylxjtu)) [SIG API Machinery, Apps, Architecture, Auth, Autoscaling, CLI, Cloud Provider, Cluster Lifecycle, Etcd, Instrumentation, Network, Node, Release, Scheduling, Storage, Testing and Windows] +- Kubectl: Graduated kuberc support to beta. A `kuberc` configuration file provided a mechanism for customizing `kubectl` behavior (distinct from kubeconfig, which configures cluster access across different clients). ([kubernetes/kubernetes#131818](https://github.com/kubernetes/kubernetes/pull/131818), [@soltysh](https://github.com/soltysh)) [SIG CLI and Testing] +- Promoted Job Pod Replacement Policy to general availability. The `JobPodReplacementPolicy` feature gate was locked to `true` and will be removed in a future Kubernetes release. ([kubernetes/kubernetes#132173](https://github.com/kubernetes/kubernetes/pull/132173), [@dejanzele](https://github.com/dejanzele)) [SIG Apps and Testing] +- Promoted `MutableCSINodeAllocatableCount` to beta. ([kubernetes/kubernetes#132429](https://github.com/kubernetes/kubernetes/pull/132429), [@torredil](https://github.com/torredil)) +- Promoted feature-gate `VolumeAttributesClass` to GA + - Promoted API `VolumeAttributesClass` and `VolumeAttributesClassList` to `storage.k8s.io/v1`. ([kubernetes/kubernetes#131549](https://github.com/kubernetes/kubernetes/pull/131549), [@carlory](https://github.com/carlory)) [SIG API Machinery, Apps, Auth, CLI, Etcd, Storage and Testing] +- Promoted the `APIServerTracing` feature gate to GA. The `--tracing-config-file` flag accepted `TracingConfiguration` in version `apiserver.config.k8s.io/v1` (with no changes from `apiserver.config.k8s.io/v1beta1`). ([kubernetes/kubernetes#132340](https://github.com/kubernetes/kubernetes/pull/132340), [@dashpole](https://github.com/dashpole)) [SIG API Machinery and Testing] +- Promoted the `AuthorizeWithSelectors` and `AuthorizeNodeWithSelectors` feature gates to stable and locked on. ([kubernetes/kubernetes#132656](https://github.com/kubernetes/kubernetes/pull/132656), [@liggitt](https://github.com/liggitt)) [SIG API Machinery, Auth and Testing] +- Promoted the `KubeletTracing` feature gate to GA. ([kubernetes/kubernetes#132341](https://github.com/kubernetes/kubernetes/pull/132341), [@dashpole](https://github.com/dashpole)) [SIG Instrumentation and Node] +- Promoted the `RelaxedEnvironmentVariableValidation` feature gate to GA and locked it in the enabled state by default. ([kubernetes/kubernetes#132054](https://github.com/kubernetes/kubernetes/pull/132054), [@HirazawaUi](https://github.com/HirazawaUi)) [SIG Apps, Architecture, Node and Testing] +- Removed an inaccurate statement about requiring ports when the Pod spec `hostNetwork` field was set. ([kubernetes/kubernetes#130994](https://github.com/kubernetes/kubernetes/pull/130994), [@BenTheElder](https://github.com/BenTheElder)) [SIG Network and Node] +- Removed deprecated `gogo` protocol definitions from `k8s.io/kubelet/pkg/apis/pluginregistration` in favor of `google.golang.org/protobuf`. ([kubernetes/kubernetes#132773](https://github.com/kubernetes/kubernetes/pull/132773), [@saschagrunert](https://github.com/saschagrunert)) +- Removed deprecated gogo protocol definitions from `k8s.io/cri-api` in favor of `google.golang.org/protobuf`. ([kubernetes/kubernetes#128653](https://github.com/kubernetes/kubernetes/pull/128653), [@saschagrunert](https://github.com/saschagrunert)) [SIG API Machinery, Auth, Instrumentation, Node and Testing] +- Replaced Boolean-pointer-helper functions with the `k8s.io/utils/ptr` implementations. ([kubernetes/kubernetes#132794](https://github.com/kubernetes/kubernetes/pull/132794), [@PatrickLaabs](https://github.com/PatrickLaabs)) [SIG API Machinery, Auth, CLI, Node and Testing] +- Replaced `boolPtrFn` helper functions with the "k8s.io/utils/ptr" implementation. ([kubernetes/kubernetes#132907](https://github.com/kubernetes/kubernetes/pull/132907), [@PatrickLaabs](https://github.com/PatrickLaabs)) +- Replaced deprecated package `k8s.io/utils/pointer` with `k8s.io/utils/ptr` for the apiextensions-apiserver apiextensions. ([kubernetes/kubernetes#132723](https://github.com/kubernetes/kubernetes/pull/132723), [@PatrickLaabs](https://github.com/PatrickLaabs)) +- Replaced deprecated package `k8s.io/utils/pointer` with `k8s.io/utils/ptr` for the apiserver (1/2). ([kubernetes/kubernetes#132751](https://github.com/kubernetes/kubernetes/pull/132751), [@PatrickLaabs](https://github.com/PatrickLaabs)) [SIG API Machinery and Auth] +- Replaced deprecated package `k8s.io/utils/pointer` with `k8s.io/utils/ptr` for the component-base. ([kubernetes/kubernetes#132754](https://github.com/kubernetes/kubernetes/pull/132754), [@PatrickLaabs](https://github.com/PatrickLaabs)) [SIG API Machinery, Architecture, Instrumentation and Scheduling] +- Replaced deprecated package `k8s.io/utils/pointer` with `k8s.io/utils/ptr` for the kube-aggregator apiregistration. ([kubernetes/kubernetes#132701](https://github.com/kubernetes/kubernetes/pull/132701), [@PatrickLaabs](https://github.com/PatrickLaabs)) +- Simplied validation error message for invalid fields by removing redundant field name. ([kubernetes/kubernetes#132513](https://github.com/kubernetes/kubernetes/pull/132513), [@xiaoweim](https://github.com/xiaoweim)) [SIG API Machinery, Apps, Auth, Node and Scheduling] +- Simplied validation error message for required fields by removing redundant messages. ([kubernetes/kubernetes#132472](https://github.com/kubernetes/kubernetes/pull/132472), [@xiaoweim](https://github.com/xiaoweim)) [SIG API Machinery, Apps, Architecture, Auth, Cloud Provider, Network, Node and Storage] +- The `KubeletServiceAccountTokenForCredentialProviders` feature was beta and enabled by default. ([kubernetes/kubernetes#133017](https://github.com/kubernetes/kubernetes/pull/133017), [@aramase](https://github.com/aramase)) [SIG Auth and Node] +- The `conditionType` is "oneof" approved/denied check of CertificateSigningRequest's `.status.conditions` field was migrated to declarative validation. + If the `DeclarativeValidation` feature gate was enabled, mismatches with existing validation are reported via metrics. + If the `DeclarativeValidationTakeover` feature gate was enabled, declarative validation was the primary source of errors for migrated fields. ([kubernetes/kubernetes#133013](https://github.com/kubernetes/kubernetes/pull/133013), [@aaron-prindle](https://github.com/aaron-prindle)) [SIG API Machinery and Auth] +- The fallback behavior of the Downward API's `resourceFieldRef` field was updated to account for pod-level resources: if container-level limits were not set, pod-level limits were now used before falling back to node allocatable resources. ([kubernetes/kubernetes#132605](https://github.com/kubernetes/kubernetes/pull/132605), [@toVersus](https://github.com/toVersus)) [SIG Node, Scheduling and Testing] +- The validation of `replicas` field in the ReplicationController `/scale` subresource has been migrated to declarative validation. + If the `DeclarativeValidation` feature gate is enabled, mismatches with existing validation are reported via metrics. + If the `DeclarativeValidationTakeover` feature gate is enabled, declarative validation is the primary source of errors for migrated fields. ([kubernetes/kubernetes#131664](https://github.com/kubernetes/kubernetes/pull/131664), [@jpbetz](https://github.com/jpbetz)) [SIG API Machinery and Apps] +- The validation-gen code generator generated validation code that supported validation ratcheting. ([kubernetes/kubernetes#132236](https://github.com/kubernetes/kubernetes/pull/132236), [@yongruilin](https://github.com/yongruilin)) [SIG API Machinery, Apps, Auth and Node] +- Updated `IsDNS1123SubdomainWithUnderscore` so that, when it returned an error, it also returned the correct regex information (`dns1123SubdomainFmtWithUnderscore`). ([kubernetes/kubernetes#132034](https://github.com/kubernetes/kubernetes/pull/132034), [@ChosenFoam](https://github.com/ChosenFoam)) +- Updated etcd version to v3.6.0. ([kubernetes/kubernetes#131501](https://github.com/kubernetes/kubernetes/pull/131501), [@joshjms](https://github.com/joshjms)) [SIG API Machinery, Cloud Provider, Cluster Lifecycle, Etcd and Testing] +- Updated the `v1` credential provider configuration to include the `tokenAttributes.cacheType` field. This field is required and must be set to either `ServiceAccount` or `Token` when configuring a provider that uses a service account to fetch registry credentials. ([kubernetes/kubernetes#132617](https://github.com/kubernetes/kubernetes/pull/132617), [@aramase](https://github.com/aramase)) [SIG Auth, Node and Testing] +- Zero-value `metadata.creationTimestamp` values are now omitted and no longer serialize an explicit `null` in JSON, YAML, and CBOR output ([kubernetes/kubernetes#130989](https://github.com/kubernetes/kubernetes/pull/130989), [@liggitt](https://github.com/liggitt)) [SIG API Machinery, Apps, Architecture, Auth, CLI, Cloud Provider, Cluster Lifecycle, Etcd, Instrumentation, Network, Node, Scheduling, Storage and Testing] +- `AppArmor` profiles specified in the Pod or container `SecurityContext` were no longer copied to deprecated `AppArmor` annotations (prefix `container.apparmor.security.beta.kubernetes.io/`). Anything that inspected the deprecated annotations must be migrated to use the `SecurityContext` fields instead. ([kubernetes/kubernetes#131989](https://github.com/kubernetes/kubernetes/pull/131989), [@tallclair](https://github.com/tallclair)) +- `MultiCIDRServiceAllocator` was locked and enabled by default, `DisableAllocatorDualWrite` was enabled by default. ([kubernetes/kubernetes#131318](https://github.com/kubernetes/kubernetes/pull/131318), [@aojea](https://github.com/aojea)) [SIG API Machinery, Apps, Architecture, Auth, Etcd, Network and Testing] +- Add a new `FileKeyRef` field to containers, allowing them to load variables from files by setting this field. + + Introduce the EnvFiles feature gate to govern activation of this functionality. ([kubernetes/kubernetes#132626](https://github.com/kubernetes/kubernetes/pull/132626), [@HirazawaUi](https://github.com/HirazawaUi)) [SIG API Machinery, Apps, Node and Testing] +- Add driver-owned fields in ResourceSlice to mark whether the device is shareable among multiple resource claims (or requests) and to specify how each capacity can be shared between different requests. + - Add user-owned fields in ResourceClaim to specify resource requirements against each device capacity. + - Add scheduler-owned field in ResourceClaim.Status to specify how much device capacity is reserved for a specific request. + - Add an additional identifier to ResourceClaim.Status for the device supports multiple allocations. + - Add a new constraint type to enforce uniqueness of specified attributes across all allocated devices. ([kubernetes/kubernetes#132522](https://github.com/kubernetes/kubernetes/pull/132522), [@sunya-ch](https://github.com/sunya-ch)) [SIG API Machinery, Apps, Architecture, CLI, Cluster Lifecycle, Network, Node, Release, Scheduling and Testing] +- Add new optional APIs in ResouceSlice.Basic and ResourceClaim.Status.AllocatedDeviceStatus. ([kubernetes/kubernetes#130160](https://github.com/kubernetes/kubernetes/pull/130160), [@KobayashiD27](https://github.com/KobayashiD27)) [SIG API Machinery, Apps, Architecture, Node, Release, Scheduling and Testing] +- Added a mechanism for configurable container restarts: _container level restart rules_. This is an alpha feature behind the `ContainerRestartRules` feature gate. ([kubernetes/kubernetes#132642](https://github.com/kubernetes/kubernetes/pull/132642), [@yuanwang04](https://github.com/yuanwang04)) [SIG API Machinery, Apps, Node and Testing] +- Added detailed event for in-place pod vertical scaling completed, improving cluster management and debugging ([kubernetes/kubernetes#130387](https://github.com/kubernetes/kubernetes/pull/130387), [@shiya0705](https://github.com/shiya0705)) [SIG API Machinery, Apps, Autoscaling, Node, Scheduling and Testing] +- Added validation to reject Pods using the `PodLevelResources` feature on Windows OS due to lack of support. The API server rejects Pods with Pod-level resources and a `Pod.spec.os.name` targeting Windows. Kubelet on nodes running Windows also rejects Pods with Pod-level resources at admission phase. ([kubernetes/kubernetes#133046](https://github.com/kubernetes/kubernetes/pull/133046), [@toVersus](https://github.com/toVersus)) [SIG Apps and Node] +- Adds warnings when creating headless service with set loadBalancerIP,externalIPs and/or SessionAffinity ([kubernetes/kubernetes#132214](https://github.com/kubernetes/kubernetes/pull/132214), [@Peac36](https://github.com/Peac36)) [SIG Network] +- Allow pvc.spec.VolumeAttributesClassName to go from non-nil to nil ([kubernetes/kubernetes#132106](https://github.com/kubernetes/kubernetes/pull/132106), [@AndrewSirenko](https://github.com/AndrewSirenko)) [SIG Apps] +- Allows setting the `hostnameOverride` field in `PodSpec` to specify any RFC 1123 DNS subdomain as the pod's hostname. The `HostnameOverride` feature gate has been introduced to control enablement of this functionality. ([kubernetes/kubernetes#132558](https://github.com/kubernetes/kubernetes/pull/132558), [@HirazawaUi](https://github.com/HirazawaUi)) [SIG API Machinery, Apps, Network, Node and Testing] +- AppArmor profiles specified in the pod or container SecurityContext are no longer copied to deprecated AppArmor annotations (prefix `container.apparmor.security.beta.kubernetes.io/`). Anything that inspects the deprecated annotations must be migrated to use the SecurityContext fields instead. ([kubernetes/kubernetes#131989](https://github.com/kubernetes/kubernetes/pull/131989), [@tallclair](https://github.com/tallclair)) [SIG Node] +- Changes underlying logic to propagate Pod level hugepage cgroup to containers when they do not specify hugepage resources. + - Adds validation to enforce the hugepage aggregated container limits to be smaller or equal to pod-level limits. This was already enforced with the defaulted requests from the specified limits, however it did not make it clear about both hugepage requests and limits. ([kubernetes/kubernetes#131089](https://github.com/kubernetes/kubernetes/pull/131089), [@KevinTMtz](https://github.com/KevinTMtz)) [SIG Apps, Node and Testing] +- DRA: the scheduler plugin now prevents abnormal filter runtimes by timing out after 10 seconds. This is configurable via the plugin configuration's `FilterTimeout`. Setting it to zero disables the timeout and restores the behavior of Kubernetes <= 1.33. ([kubernetes/kubernetes#132033](https://github.com/kubernetes/kubernetes/pull/132033), [@pohly](https://github.com/pohly)) [SIG Node, Scheduling and Testing] +- DRA: when the prioritized list feature is used in a request and the resulting number of allocated devices exceeds the number of allowed devices per claim, the scheduler aborts the attempt to allocate devices early. Previously it tried to many different combinations, which can take a long time. ([kubernetes/kubernetes#130593](https://github.com/kubernetes/kubernetes/pull/130593), [@mortent](https://github.com/mortent)) [SIG Apps, Node, Scheduling and Testing] +- Dynamic Resource Allocation: graduated core functionality to general availability (GA). This newly stable feature uses the _structured parameters_ flavor of DRA. ([kubernetes/kubernetes#132706](https://github.com/kubernetes/kubernetes/pull/132706), [@pohly](https://github.com/pohly)) [SIG API Machinery, Apps, Auth, Autoscaling, Etcd, Node, Scheduling and Testing] +- Enable kube-apiserver support for PodCertificateRequest and PodCertificate projected volumes (behind the PodCertificateRequest feature gate). ([kubernetes/kubernetes#128010](https://github.com/kubernetes/kubernetes/pull/128010), [@ahmedtd](https://github.com/ahmedtd)) [SIG API Machinery, Apps, Auth, Cloud Provider, Etcd, Node, Storage and Testing] +- Extended resources backed by DRA feature allows cluster operator to specify extendedResourceName in DeviceClass, and application operator to continue using extended resources in pod's requests to request for DRA devices matching the DeviceClass. + + NodeResourcesFit plugin scoring won't work for extended resources backed by DRA ([kubernetes/kubernetes#130653](https://github.com/kubernetes/kubernetes/pull/130653), [@yliaog](https://github.com/yliaog)) [SIG API Machinery, Apps, Auth, Node, Scheduling and Testing] +- Fix prerelease lifecycle for PodCertificateRequest ([kubernetes/kubernetes#133350](https://github.com/kubernetes/kubernetes/pull/133350), [@carlory](https://github.com/carlory)) [SIG Auth] +- Fixes a 1.33 regression that can cause a nil panic in kube-scheduler when aggregating resource requests across container's spec and status. ([kubernetes/kubernetes#132895](https://github.com/kubernetes/kubernetes/pull/132895), [@yue9944882](https://github.com/yue9944882)) [SIG Node and Scheduling] +- Introduced the admissionregistration.k8s.io/v1beta1/MutatingAdmissionPolicy API type. + To enable, enable the `MutatingAdmissionPolicy` feature gate (which is off by default) and set `--runtime-config=admissionregistration.k8s.io/v1beta1=true` on the kube-apiserver. + Note that the default stored version remains alpha in 1.34 and whoever enabled beta during 1.34 needs to run a storage migration yourself to ensure you don't depend on alpha data in etcd. ([kubernetes/kubernetes#132821](https://github.com/kubernetes/kubernetes/pull/132821), [@cici37](https://github.com/cici37)) [SIG API Machinery, Etcd and Testing] +- No, changes underlying logic for Eviction Manager helper functions ([kubernetes/kubernetes#132277](https://github.com/kubernetes/kubernetes/pull/132277), [@KevinTMtz](https://github.com/KevinTMtz)) [SIG Node, Scheduling and Testing] +- Promote MutableCSINodeAllocatableCount to Beta. ([kubernetes/kubernetes#132429](https://github.com/kubernetes/kubernetes/pull/132429), [@torredil](https://github.com/torredil)) [SIG Storage] +- Promoted feature-gate `VolumeAttributesClass` to GA + - Promoted API `VolumeAttributesClass` and `VolumeAttributesClassList` to `storage.k8s.io/v1`. ([kubernetes/kubernetes#131549](https://github.com/kubernetes/kubernetes/pull/131549), [@carlory](https://github.com/carlory)) [SIG API Machinery, Apps, Auth, CLI, Etcd, Storage and Testing] +- Promoted the `APIServerTracing` feature gate to GA. The `--tracing-config-file` flag now accepts `TracingConfiguration` in version `apiserver.config.k8s.io/v1` (with no changes from `apiserver.config.k8s.io/v1beta1`). ([kubernetes/kubernetes#132340](https://github.com/kubernetes/kubernetes/pull/132340), [@dashpole](https://github.com/dashpole)) [SIG API Machinery and Testing] +- Removed deprecated gogo protocol definitions from `k8s.io/kubelet/pkg/apis/pluginregistration` in favor of `google.golang.org/protobuf`. ([kubernetes/kubernetes#132773](https://github.com/kubernetes/kubernetes/pull/132773), [@saschagrunert](https://github.com/saschagrunert)) [SIG Node] +- The Kubelet can now monitor the health of devices allocated via Dynamic Resource Allocation (DRA) and report it in the `pod.status.containerStatuses.allocatedResourcesStatus` field. This requires the DRA plugin to implement the new v1alpha1 `NodeHealth` gRPC service. This feature is controlled by the `ResourceHealthStatus` feature gate. ([kubernetes/kubernetes#130606](https://github.com/kubernetes/kubernetes/pull/130606), [@Jpsassine](https://github.com/Jpsassine)) [SIG Apps, Architecture, Auth, CLI, Cloud Provider, Cluster Lifecycle, Etcd, Network, Node, Release, Scheduling, Storage and Testing] +- The KubeletServiceAccountTokenForCredentialProviders feature is now beta and enabled by default. ([kubernetes/kubernetes#133017](https://github.com/kubernetes/kubernetes/pull/133017), [@aramase](https://github.com/aramase)) [SIG Auth and Node] +- The conditionType is "oneof" approved/denied check of CertificateSigningRequest's `.status.conditions` field has been migrated to declarative validation. + If the `DeclarativeValidation` feature gate is enabled, mismatches with existing validation are reported via metrics. + If the `DeclarativeValidationTakeover` feature gate is enabled, declarative validation is the primary source of errors for migrated fields. ([kubernetes/kubernetes#133013](https://github.com/kubernetes/kubernetes/pull/133013), [@aaron-prindle](https://github.com/aaron-prindle)) [SIG API Machinery and Auth] +- The fallback behavior of the Downward API's `resourceFieldRef` field has been updated to account for pod-level resources: if container-level limits are not set, pod-level limits are now used before falling back to node allocatable resources. ([kubernetes/kubernetes#132605](https://github.com/kubernetes/kubernetes/pull/132605), [@toVersus](https://github.com/toVersus)) [SIG Node, Scheduling and Testing] +- The kubelet's image pull credential tracking now supports service account-based verification. When an image is pulled using service account credentials via external credential providers, subsequent pods using the same service account (UID, name, and namespace) can access the cached image without re-authentication for the lifetime of that service account. ([kubernetes/kubernetes#132771](https://github.com/kubernetes/kubernetes/pull/132771), [@aramase](https://github.com/aramase)) [SIG Auth, Node and Testing] +- Added `tokenAttributes.cacheType` field to v1 credential provider config. This field is required to be set to either ServiceAccount or Token when configuring a provider that uses service account to fetch registry credentials. ([kubernetes/kubernetes#132617](https://github.com/kubernetes/kubernetes/pull/132617), [@aramase](https://github.com/aramase)) [SIG Auth, Node and Testing] +- JWT authenticators specified via the `AuthenticationConfiguration.jwt` array can now optionally specify either the `controlplane` or `cluster` egress selector by setting the `issuer.egressSelectorType` field. When unset, the prior behavior of using no egress selector is retained. The StructuredAuthenticationConfigurationEgressSelector beta feature (default on) must be enabled to use this functionality. ([kubernetes/kubernetes#132768](https://github.com/kubernetes/kubernetes/pull/132768), [@enj](https://github.com/enj)) [SIG API Machinery, Auth and Testing] +- Promoted the `KubeletTracing` feature gate to GA. ([kubernetes/kubernetes#132341](https://github.com/kubernetes/kubernetes/pull/132341), [@dashpole](https://github.com/dashpole)) [SIG Instrumentation and Node] +- Replaces boolPtrFn helper functions with the "k8s.io/utils/ptr" implementation. ([kubernetes/kubernetes#132907](https://github.com/kubernetes/kubernetes/pull/132907), [@PatrickLaabs](https://github.com/PatrickLaabs)) [SIG Architecture] +- Simplied validation error message for invalid fields by removing redundant field name. ([kubernetes/kubernetes#132513](https://github.com/kubernetes/kubernetes/pull/132513), [@xiaoweim](https://github.com/xiaoweim)) [SIG API Machinery, Apps, Auth, Node and Scheduling] +- The `AuthorizeWithSelectors` and `AuthorizeNodeWithSelectors` feature gates are promoted to stable and locked on. ([kubernetes/kubernetes#132656](https://github.com/kubernetes/kubernetes/pull/132656), [@liggitt](https://github.com/liggitt)) [SIG API Machinery, Auth and Testing] +- DRA: the v1alpha4 kubelet gRPC API (added in 1.31, superseded in 1.32) is no longer supported. DRA drivers using the helper package from Kubernetes >= 1.32 use the v1beta1 API and continue to be supported. ([kubernetes/kubernetes#132574](https://github.com/kubernetes/kubernetes/pull/132574), [@pohly](https://github.com/pohly)) [SIG Node] +- Deprecate StreamingConnectionIdleTimeout field of the kubelet config. ([kubernetes/kubernetes#131992](https://github.com/kubernetes/kubernetes/pull/131992), [@lalitc375](https://github.com/lalitc375)) [SIG Node] +- Removed deprecated gogo protocol definitions from `k8s.io/cri-api` in favor of `google.golang.org/protobuf`. ([kubernetes/kubernetes#128653](https://github.com/kubernetes/kubernetes/pull/128653), [@saschagrunert](https://github.com/saschagrunert)) [SIG API Machinery, Auth, Instrumentation, Node and Testing] +- Replaced deprecated package 'k8s.io/utils/pointer' with 'k8s.io/utils/ptr' for the apiextensions-apiserver apiextensions. ([kubernetes/kubernetes#132723](https://github.com/kubernetes/kubernetes/pull/132723), [@PatrickLaabs](https://github.com/PatrickLaabs)) [SIG API Machinery] +- Replaced deprecated package 'k8s.io/utils/pointer' with 'k8s.io/utils/ptr' for the component-base. ([kubernetes/kubernetes#132754](https://github.com/kubernetes/kubernetes/pull/132754), [@PatrickLaabs](https://github.com/PatrickLaabs)) [SIG API Machinery, Architecture, Instrumentation and Scheduling] +- Replaced deprecated package 'k8s.io/utils/pointer' with 'k8s.io/utils/ptr' for the kube-aggregator apiregistration. ([kubernetes/kubernetes#132701](https://github.com/kubernetes/kubernetes/pull/132701), [@PatrickLaabs](https://github.com/PatrickLaabs)) [SIG API Machinery] +- Replaces Boolean-pointer-helper functions with the "k8s.io/utils/ptr" implementations. ([kubernetes/kubernetes#132794](https://github.com/kubernetes/kubernetes/pull/132794), [@PatrickLaabs](https://github.com/PatrickLaabs)) [SIG API Machinery, Auth, CLI, Node and Testing] +- Replaces deprecated package 'k8s.io/utils/pointer' with 'k8s.io/utils/ptr' for the apiserver (1/2). ([kubernetes/kubernetes#132751](https://github.com/kubernetes/kubernetes/pull/132751), [@PatrickLaabs](https://github.com/PatrickLaabs)) [SIG API Machinery and Auth] +- Simplied validation error message for required fields by removing redundant messages. ([kubernetes/kubernetes#132472](https://github.com/kubernetes/kubernetes/pull/132472), [@xiaoweim](https://github.com/xiaoweim)) [SIG API Machinery, Apps, Architecture, Auth, Cloud Provider, Network, Node and Storage] +- Add a `runtime.ApplyConfiguration` interface that is implemented by all generated applyconfigs ([kubernetes/kubernetes#132194](https://github.com/kubernetes/kubernetes/pull/132194), [@alvaroaleman](https://github.com/alvaroaleman)) [SIG API Machinery and Instrumentation] +- Added omitempty and opt tag to the API v1beta2 AdminAccess type in the DeviceRequestAllocationResult struct. ([kubernetes/kubernetes#132338](https://github.com/kubernetes/kubernetes/pull/132338), [@PatrickLaabs](https://github.com/PatrickLaabs)) [SIG Auth] +- Introduces OpenAPI format support for `k8s-short-name` and `k8s-long-name`. ([kubernetes/kubernetes#132504](https://github.com/kubernetes/kubernetes/pull/132504), [@jpbetz](https://github.com/jpbetz)) [SIG API Machinery, Architecture, Auth, CLI, Cloud Provider, Cluster Lifecycle, Instrumentation, Network, Node, Scheduling and Storage] +- Promoted Job Pod Replacement Policy to general availability. The `JobPodReplacementPolicy` feature gate is now locked to true, and will be removed in a future release of Kubernetes. ([kubernetes/kubernetes#132173](https://github.com/kubernetes/kubernetes/pull/132173), [@dejanzele](https://github.com/dejanzele)) [SIG Apps and Testing] +- This PR corrects that documentation, making it clear to users that podSelector is optional and describes its default behavior. ([kubernetes/kubernetes#131354](https://github.com/kubernetes/kubernetes/pull/131354), [@tomoish](https://github.com/tomoish)) [SIG Network] +- #### Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: + + ([kubernetes/kubernetes#131996](https://github.com/kubernetes/kubernetes/pull/131996), [@ritazh](https://github.com/ritazh)) [SIG Node and Testing] +- DRA API: resource.k8s.io/v1alpha3 now only contains DeviceTaintRule. All other types got removed because they became obsolete when introducing the v1beta1 API in 1.32. + before updating a cluster where resourceclaims, resourceclaimtemplates, deviceclasses, or resourceslices might have been stored using Kubernetes < 1.32, delete all of those resources before updating and recreate them as needed while running Kubernetes >= 1.32. ([kubernetes/kubernetes#132000](https://github.com/kubernetes/kubernetes/pull/132000), [@pohly](https://github.com/pohly)) [SIG Etcd, Node, Scheduling and Testing] +- Extends the nodeports scheduling plugin to consider hostPorts used by restartable init containers. ([kubernetes/kubernetes#132040](https://github.com/kubernetes/kubernetes/pull/132040), [@avrittrohwer](https://github.com/avrittrohwer)) [SIG Scheduling and Testing] +- Kube-apiserver: Caching of authorization webhook decisions for authorized and unauthorized requests can now be disabled in the `--authorization-config` file by setting the new fields `cacheAuthorizedRequests` or `cacheUnauthorizedRequests` to `false` explicitly. See https://kubernetes.io/docs/reference/access-authn-authz/authorization/#using-configuration-file-for-authorization for more details. ([kubernetes/kubernetes#129237](https://github.com/kubernetes/kubernetes/pull/129237), [@rfranzke](https://github.com/rfranzke)) [SIG API Machinery and Auth] +- Kube-apiserver: Promoted the `StructuredAuthenticationConfiguration` feature gate to GA. ([kubernetes/kubernetes#131916](https://github.com/kubernetes/kubernetes/pull/131916), [@aramase](https://github.com/aramase)) [SIG API Machinery, Auth and Testing] +- Kube-apiserver: the AuthenticationConfiguration type accepted in `--authentication-config` files has been promoted to `apiserver.config.k8s.io/v1`. ([kubernetes/kubernetes#131752](https://github.com/kubernetes/kubernetes/pull/131752), [@aramase](https://github.com/aramase)) [SIG API Machinery, Auth and Testing] +- Kube-log-runner: rotating log output into a new file when reaching a certain file size can be requested via the new `-log-file-size` parameter. `-log-file-age` enables automatical removal of old output files. Periodic flushing can be requested through ` -flush-interval`. ([kubernetes/kubernetes#127667](https://github.com/kubernetes/kubernetes/pull/127667), [@zylxjtu](https://github.com/zylxjtu)) [SIG API Machinery, Apps, Architecture, Auth, Autoscaling, CLI, Cloud Provider, Cluster Lifecycle, Etcd, Instrumentation, Network, Node, Release, Scheduling, Storage, Testing and Windows] +- Kubectl: graduated `kuberc` support to beta. A `kuberc` configuration file provides a mechanism for customizing kubectl behavior (separate from kubeconfig, which configured cluster access across different clients). ([kubernetes/kubernetes#131818](https://github.com/kubernetes/kubernetes/pull/131818), [@soltysh](https://github.com/soltysh)) [SIG CLI and Testing] +- Promote the RelaxedEnvironmentVariableValidation feature gate to GA and lock it in the default enabled state. ([kubernetes/kubernetes#132054](https://github.com/kubernetes/kubernetes/pull/132054), [@HirazawaUi](https://github.com/HirazawaUi)) [SIG Apps, Architecture, Node and Testing] +- Remove inaccurate statement about requiring ports from pod spec hostNetwork field ([kubernetes/kubernetes#130994](https://github.com/kubernetes/kubernetes/pull/130994), [@BenTheElder](https://github.com/BenTheElder)) [SIG Network and Node] +- TBD ([kubernetes/kubernetes#131318](https://github.com/kubernetes/kubernetes/pull/131318), [@aojea](https://github.com/aojea)) [SIG API Machinery, Apps, Architecture, Auth, Etcd, Network and Testing] +- The validation of `replicas` field in the ReplicationController `/scale` subresource has been migrated to declarative validation. + If the `DeclarativeValidation` feature gate is enabled, mismatches with existing validation are reported via metrics. + If the `DeclarativeValidationTakeover` feature gate is enabled, declarative validation is the primary source of errors for migrated fields. ([kubernetes/kubernetes#131664](https://github.com/kubernetes/kubernetes/pull/131664), [@jpbetz](https://github.com/jpbetz)) [SIG API Machinery and Apps] +- The validation-gen code generator generates validation code that supports validation ratcheting. ([kubernetes/kubernetes#132236](https://github.com/kubernetes/kubernetes/pull/132236), [@yongruilin](https://github.com/yongruilin)) [SIG API Machinery, Apps, Auth and Node] +- Update etcd version to v3.6.0 ([kubernetes/kubernetes#131501](https://github.com/kubernetes/kubernetes/pull/131501), [@joshjms](https://github.com/joshjms)) [SIG API Machinery, Cloud Provider, Cluster Lifecycle, Etcd and Testing] +- When the IsDNS1123SubdomainWithUnderscore function returns an error, it will return the correct regex information dns1123SubdomainFmtWithUnderscore. ([kubernetes/kubernetes#132034](https://github.com/kubernetes/kubernetes/pull/132034), [@ChosenFoam](https://github.com/ChosenFoam)) [SIG Network] +- Zero-value `metadata.creationTimestamp` values are now omitted and no longer serialize an explicit `null` in JSON, YAML, and CBOR output ([kubernetes/kubernetes#130989](https://github.com/kubernetes/kubernetes/pull/130989), [@liggitt](https://github.com/liggitt)) [SIG API Machinery, Apps, Architecture, Auth, CLI, Cloud Provider, Cluster Lifecycle, Etcd, Instrumentation, Network, Node, Scheduling, Storage and Testing] + +# v33.0.0+snapshot + +Kubernetes API Version: v1.33.1 + +### API Change +- A new alpha feature gate, `MutableCSINodeAllocatableCount`, has been introduced. + + When this feature gate is enabled, the `CSINode.Spec.Drivers[*].Allocatable.Count` field becomes mutable, and a new field, `NodeAllocatableUpdatePeriodSeconds`, is available in the `CSIDriver` object. This allows periodic updates to a node's reported allocatable volume capacity, preventing stateful pods from becoming stuck due to outdated information that kube-scheduler relies on. ([kubernetes/kubernetes#130007](https://github.com/kubernetes/kubernetes/pull/130007), [@torredil](https://github.com/torredil)) [SIG Apps, Node, Scheduling and Storage] +- Added feature gate `DRAPartitionableDevices`, when enabled, Dynamic Resource Allocation support partitionable devices allocation. ([kubernetes/kubernetes#130764](https://github.com/kubernetes/kubernetes/pull/130764), [@cici37](https://github.com/cici37)) [SIG API Machinery, Architecture, Auth, CLI, Cloud Provider, Cluster Lifecycle, Instrumentation, Network, Node, Scheduling, Storage and Testing] +- Added DRA support for a "one-of" prioritized list of selection criteria to satisfy a device request in a resource claim. ([kubernetes/kubernetes#128586](https://github.com/kubernetes/kubernetes/pull/128586), [@mortent](https://github.com/mortent)) [SIG API Machinery, Apps, Etcd, Node, Scheduling and Testing] +- Added a `/flagz` endpoint for kubelet endpoint ([kubernetes/kubernetes#128857](https://github.com/kubernetes/kubernetes/pull/128857), [@zhifei92](https://github.com/zhifei92)) [SIG Architecture, Instrumentation and Node] +- Added a new `tolerance` field to HorizontalPodAutoscaler, overriding the cluster-wide default. Enabled via the HPAConfigurableTolerance alpha feature gate. ([kubernetes/kubernetes#130797](https://github.com/kubernetes/kubernetes/pull/130797), [@jm-franc](https://github.com/jm-franc)) [SIG API Machinery, Apps, Autoscaling, Etcd, Node, Scheduling and Testing] +- Added support for configuring custom stop signals with a new StopSignal container lifecycle ([kubernetes/kubernetes#130556](https://github.com/kubernetes/kubernetes/pull/130556), [@sreeram-venkitesh](https://github.com/sreeram-venkitesh)) [SIG API Machinery, Apps, Node and Testing] +- Added support for in-place vertical scaling of Pods with sidecars (containers defined within `initContainers` where the `restartPolicy` is set to `Always`). ([kubernetes/kubernetes#128367](https://github.com/kubernetes/kubernetes/pull/128367), [@vivzbansal](https://github.com/vivzbansal)) [SIG API Machinery, Apps, CLI, Node, Scheduling and Testing] +- CPUManager Policy Options support is GA ([kubernetes/kubernetes#130535](https://github.com/kubernetes/kubernetes/pull/130535), [@ffromani](https://github.com/ffromani)) [SIG API Machinery, Node and Testing] +- Changed the Pod API to support `hugepage resources` at `spec` level for pod-level resources. ([kubernetes/kubernetes#130577](https://github.com/kubernetes/kubernetes/pull/130577), [@KevinTMtz](https://github.com/KevinTMtz)) [SIG Apps, CLI, Node, Scheduling, Storage and Testing] +- DRA API: The maximum number of pods that can use the same ResourceClaim is now 256 instead of 32. Downgrading a cluster where this relaxed limit is in use to Kubernetes 1.32.0 is not supported, as version 1.32.0 would refuse to update ResourceClaims with more than 32 entries in the `status.reservedFor` field. ([kubernetes/kubernetes#129543](https://github.com/kubernetes/kubernetes/pull/129543), [@pohly](https://github.com/pohly)) [SIG API Machinery, Node and Testing] +- DRA: CEL expressions using attribute strings exceeded the cost limit because their cost estimation was incomplete. ([kubernetes/kubernetes#129661](https://github.com/kubernetes/kubernetes/pull/129661), [@pohly](https://github.com/pohly)) [SIG Node] +- DRA: Device taints enable DRA drivers or admins to mark device as unusable, which prevents allocating them. Pods may also get evicted at runtime if a device becomes unusable, depending on the severity of the taint and whether the claim tolerates the taint. ([kubernetes/kubernetes#130447](https://github.com/kubernetes/kubernetes/pull/130447), [@pohly](https://github.com/pohly)) [SIG API Machinery, Apps, Architecture, Auth, Etcd, Instrumentation, Node, Scheduling and Testing] +- DRA: Starting Kubernetes 1.33, only users with access to an admin namespace with the `kubernetes.io/dra-admin-access` label are authorized to create ResourceClaim or ResourceClaimTemplate objects with the `adminAccess` field in this admin namespace if they want to and only they can reference these ResourceClaims or ResourceClaimTemplates in their pod or deployment specs. ([kubernetes/kubernetes#130225](https://github.com/kubernetes/kubernetes/pull/130225), [@ritazh](https://github.com/ritazh)) [SIG API Machinery, Apps, Auth, Node and Testing] +- DRA: when asking for "All" devices on a node, Kubernetes <= 1.32 proceeded to schedule pods onto nodes with no devices by not allocating any devices for those pods. Kubernetes 1.33 changes that to only picking nodes which have at least one device. Users who want the "proceed with scheduling also without devices" semantic can use the upcoming prioritized list feature with one sub-request for "all" devices and a second alternative with "count: 0". ([kubernetes/kubernetes#129560](https://github.com/kubernetes/kubernetes/pull/129560), [@bart0sh](https://github.com/bart0sh)) [SIG API Machinery and Node] +- Expanded the on-disk kubelet credential provider configuration to allow an optional `tokenAttribute` field to be configured. When it is set, the kubelet will provision a token with the given audience bound to the current pod and its service account. This KSA token along with required annotations on the KSA defined in configuration will be sent to the credential provider plugin via its standard input (along with the image information that is already sent today). The KSA annotations to be sent are configurable in the kubelet credential provider configuration. ([kubernetes/kubernetes#128372](https://github.com/kubernetes/kubernetes/pull/128372), [@aramase](https://github.com/aramase)) [SIG API Machinery, Auth, Node and Testing] +- Fixed the example validation rule in godoc: + + When configuring a JWT authenticator: + + If username.expression uses 'claims.email', then 'claims.email_verified' must be used in + username.expression or extra[*].valueExpression or claimValidationRules[*].expression. + An example claim validation rule expression that matches the validation automatically + applied when username.claim is set to 'email' is 'claims.?email_verified.orValue(true) == true'. + By explicitly comparing the value to true, we let type-checking see the result will be a boolean, + and to make sure a non-boolean `email_verified` claim will be caught at runtime. ([kubernetes/kubernetes#130875](https://github.com/kubernetes/kubernetes/pull/130875), [@aramase](https://github.com/aramase)) [SIG Auth and Release] +- For the `InPlacePodVerticalScaling` feature, the API server will no longer set the resize status to `Proposed` upon receiving a resize request. ([kubernetes/kubernetes#130574](https://github.com/kubernetes/kubernetes/pull/130574), [@natasha41575](https://github.com/natasha41575)) [SIG Apps, Node and Testing] +- Graduate the `MatchLabelKeys` (MismatchLabelKeys) feature in PodAffinity (PodAntiAffinity) to GA ([kubernetes/kubernetes#130463](https://github.com/kubernetes/kubernetes/pull/130463), [@sanposhiho](https://github.com/sanposhiho)) [SIG API Machinery, Apps, Node, Scheduling and Testing] +- Graduated image volume sources to beta: + - Allowed `subPath`/`subPathExpr` for image volumes + - Added kubelet metrics `kubelet_image_volume_requested_total`, `kubelet_image_volume_mounted_succeed_total` and `kubelet_image_volume_mounted_errors_total` ([kubernetes/kubernetes#130135](https://github.com/kubernetes/kubernetes/pull/130135), [@saschagrunert](https://github.com/saschagrunert)) [SIG API Machinery, Apps, Node and Testing] +- Implemented a new status field, `.status.terminatingReplicas`, for Deployments and ReplicaSets to track terminating pods. The new field is present when the `DeploymentPodReplacementPolicy` feature gate is enabled. ([kubernetes/kubernetes#128546](https://github.com/kubernetes/kubernetes/pull/128546), [@atiratree](https://github.com/atiratree)) [SIG API Machinery, Apps and Testing] +- Implemented validation for `NodeSelectorRequirement` values in Kubernetes when creating pods. ([kubernetes/kubernetes#128212](https://github.com/kubernetes/kubernetes/pull/128212), [@AxeZhan](https://github.com/AxeZhan)) [SIG Apps and Scheduling] +- Improved how the API server responds to **list** requests where the response format negotiates to Protobuf. List responses in Protobuf are marshalled one element at the time, drastically reducing memory needed to serve large collections. Streaming list responses can be disabled via the `StreamingCollectionEncodingToProtobuf` feature gate. ([kubernetes/kubernetes#129407](https://github.com/kubernetes/kubernetes/pull/129407), [@serathius](https://github.com/serathius)) [SIG API Machinery, Apps, Architecture, Auth, CLI, Cloud Provider, Network, Node, Release, Scheduling, Storage and Testing] +- InPlacePodVerticalScaling: Memory limits cannot be decreased unless the memory resize restart policy is set to `RestartContainer`. Container resizePolicy is no longer mutable. ([kubernetes/kubernetes#130183](https://github.com/kubernetes/kubernetes/pull/130183), [@tallclair](https://github.com/tallclair)) [SIG Apps and Node] +- Introduced API type `coordination.k8s.io/v1beta1/LeaseCandidate` + `CoordinatedLeaderElection` feature moves to Beta ([kubernetes/kubernetes#130751](https://github.com/kubernetes/kubernetes/pull/130751), [@Jefftree](https://github.com/Jefftree)) [SIG API Machinery, Etcd and Testing] +- Introduced API type `coordination.k8s.io/v1beta1/LeaseCandidate` ([kubernetes/kubernetes#130291](https://github.com/kubernetes/kubernetes/pull/130291), [@Jefftree](https://github.com/Jefftree)) [SIG API Machinery, Etcd and Testing] +- It introduces a new scope name `VolumeAttributesClass`. + + It matches all PVC objects that have the volume attributes class mentioned. + + If you want to limit the count of PVCs that have a specific volume attributes class. In that case, you can create a quota object with the scope name `VolumeAttributesClass` and a `matchExpressions` that match the volume attributes class. ([kubernetes/kubernetes#124360](https://github.com/kubernetes/kubernetes/pull/124360), [@carlory](https://github.com/carlory)) [SIG API Machinery, Apps and Testing] +- KEP-3857: Recursive Read-only (RRO) mounts: promote to GA ([kubernetes/kubernetes#130116](https://github.com/kubernetes/kubernetes/pull/130116), [@AkihiroSuda](https://github.com/AkihiroSuda)) [SIG Apps, Node and Testing] +- kubectl: Added alpha support for customizing kubectl behavior using preferences from a `kuberc` file, separate from `kubeconfig`. ([kubernetes/kubernetes#125230](https://github.com/kubernetes/kubernetes/pull/125230), [@ardaguclu](https://github.com/ardaguclu)) [SIG API Machinery, CLI and Testing] +- kubelet: added `KubeletConfiguration.subidsPerPod`. ([kubernetes/kubernetes#130028](https://github.com/kubernetes/kubernetes/pull/130028), [@AkihiroSuda](https://github.com/AkihiroSuda)) [SIG API Machinery and Node] +- Kubernetes components that accepted X.509 client certificate authentication now read the user UID from a certificate subject name RDN with object ID `1.3.6.1.4.1.57683.2`. An RDN with this object ID had to contain a string value and appear no more than once in the certificate subject. Reading the user UID from this RDN could be disabled by setting the beta feature gate `AllowParsingUserUIDFromCertAuth` to `false`(until the feature gate graduated to GA). ([kubernetes/kubernetes#127897](https://github.com/kubernetes/kubernetes/pull/127897), [@modulitos](https://github.com/modulitos)) [SIG API Machinery, Auth and Testing] +- `MergeDefaultEvictionSettings` indicates that defaults for the evictionHard, evictionSoft, evictionSoftGracePeriod, and evictionMinimumReclaim fields should be merged into values specified for those fields in this configuration. Signals specified in this configuration take precedence. Signals not specified in this configuration inherit their defaults. ([kubernetes/kubernetes#127577](https://github.com/kubernetes/kubernetes/pull/127577), [@vaibhav2107](https://github.com/vaibhav2107)) [SIG API Machinery and Node] +- New configuration is introduced to the kubelet that allows it to track container images and the list of authentication information that leads to their successful pulls. This data is persisted across reboots of the host and restarts of the kubelet. + + The kubelet ensures any image requiring credential verification is always pulled if authentication information from an image pull is not yet present, thus enforcing authentication / re-authentication. This means an image pull might be attempted even in cases where a pod requests the `IfNotPresent` image pull policy, and might lead to the pod not starting if its pull policy is `Never` and is unable to present authentication information that led to a previous successful pull of the image it is requesting. ([kubernetes/kubernetes#128152](https://github.com/kubernetes/kubernetes/pull/128152), [@stlaz](https://github.com/stlaz)) [SIG API Machinery, Architecture, Auth, Node and Testing] +- Promoted JobSuccessPolicy E2E to Conformance ([kubernetes/kubernetes#130658](https://github.com/kubernetes/kubernetes/pull/130658), [@tenzen-y](https://github.com/tenzen-y)) [SIG API Machinery, Apps, Architecture and Testing] +- Promoted `NodeInclusionPolicyInPodTopologySpread` to Stable in v1.33 ([kubernetes/kubernetes#130920](https://github.com/kubernetes/kubernetes/pull/130920), [@kerthcet](https://github.com/kerthcet)) [SIG Apps, Node, Scheduling and Testing] +- Promoted the `JobSuccessPolicy` to Stable. ([kubernetes/kubernetes#130536](https://github.com/kubernetes/kubernetes/pull/130536), [@tenzen-y](https://github.com/tenzen-y)) [SIG API Machinery, Apps, Architecture and Testing] +- Promoted the Job's `JobBackoffLimitPerIndex` feature-gate to stable. ([kubernetes/kubernetes#130061](https://github.com/kubernetes/kubernetes/pull/130061), [@mimowo](https://github.com/mimowo)) [SIG API Machinery, Apps, Architecture and Testing] +- Promoted the feature gate `AnyVolumeDataSource` to GA. ([kubernetes/kubernetes#129770](https://github.com/kubernetes/kubernetes/pull/129770), [@sunnylovestiramisu](https://github.com/sunnylovestiramisu)) [SIG Apps, Storage and Testing] +- Removed general available feature gate `CPUManager`. ([kubernetes/kubernetes#129296](https://github.com/kubernetes/kubernetes/pull/129296), [@carlory](https://github.com/carlory)) [SIG API Machinery, Node and Testing] +- Removed general available feature-gate `PDBUnhealthyPodEvictionPolicy`. ([kubernetes/kubernetes#129500](https://github.com/kubernetes/kubernetes/pull/129500), [@carlory](https://github.com/carlory)) [SIG API Machinery, Apps and Auth] +- Start reporting swap capacity as part of `node.status.nodeSystemInfo`. ([kubernetes/kubernetes#129954](https://github.com/kubernetes/kubernetes/pull/129954), [@iholder101](https://github.com/iholder101)) [SIG API Machinery, Apps and Node] +- Graduated the `MultiCIDRServiceAllocator` feature gate to stable, and the `DisableAllocatorDualWrite` feature gate to beta (disabled by default). +**Action required** for Kubernetes cluster administrators and for distributions that manage the cluster Service CIDR. +Kubernetes now allows users to define the cluster Service CIDR via an API object: ServiceCIDR. +Distributions or administrators of Kubernetes may want to control that new Service CIDRs added to the cluster do not overlap with other networks on the cluster, that only belong to a specific range of IPs. Administrators may also prefer to retain the existing behavior of only having one ServiceCIDR per cluster. You can use `ValidatingAdmissionPolicy` to achieve this. ([kubernetes/kubernetes#128971](https://github.com/kubernetes/kubernetes/pull/128971), [@aojea](https://github.com/aojea)) [SIG Apps, Architecture, Auth, CLI, Etcd, Network, Release and Testing] +- The `ClusterTrustBundle` API is moving to `v1beta1`. + In order for the `ClusterTrustBundleProjection` feature to work on the kubelet side, the `ClusterTrustBundle` API must be available at `v1beta1` version and the `ClusterTrustBundleProjection` feature gate must be enabled. If the API becomes later after kubelet started running, restart the kubelet to enable the feature. ([kubernetes/kubernetes#128499](https://github.com/kubernetes/kubernetes/pull/128499), [@stlaz](https://github.com/stlaz)) [SIG API Machinery, Apps, Auth, Etcd, Node, Storage and Testing] +- The Service trafficDistribution field, including the PreferClose option, has graduated + to GA. Services that do not have the field configured will continue to operate + with their existing behavior. Refer to the documentation + https://kubernetes.io/docs/concepts/services-networking/service/#traffic-distribution + for more details. ([kubernetes/kubernetes#130673](https://github.com/kubernetes/kubernetes/pull/130673), [@gauravkghildiyal](https://github.com/gauravkghildiyal)) [SIG Apps, Network and Testing] +- The feature gate `InPlacePodVerticalScalingAllocatedStatus` is deprecated and no longer used. The `AllocatedResources` field in `ContainerStatus` is now guarded by the `InPlacePodVerticalScaling` feature gate. ([kubernetes/kubernetes#130880](https://github.com/kubernetes/kubernetes/pull/130880), [@tallclair](https://github.com/tallclair)) [SIG CLI, Node and Scheduling] +- The kube-controller-manager will set the `observedGeneration` field on pod conditions when the `PodObservedGenerationTracking` feature gate is set. ([kubernetes/kubernetes#130650](https://github.com/kubernetes/kubernetes/pull/130650), [@natasha41575](https://github.com/natasha41575)) [SIG API Machinery, Apps, Node, Scheduling, Storage, Testing and Windows] +- The kube-scheduler will set the `observedGeneration` field on pod conditions when the `PodObservedGenerationTracking` feature gate is set. ([kubernetes/kubernetes#130649](https://github.com/kubernetes/kubernetes/pull/130649), [@natasha41575](https://github.com/natasha41575)) [SIG Node, Scheduling and Testing] +- The kubelet will set the `observedGeneration` field on pod conditions when the `PodObservedGenerationTracking` feature gate is set. ([kubernetes/kubernetes#130573](https://github.com/kubernetes/kubernetes/pull/130573), [@natasha41575](https://github.com/natasha41575)) [SIG Apps, Node, Scheduling, Storage, Testing and Windows] +- The minimum value validation of ReplicationController's `replicas` and `minReadySeconds` fields have been migrated to declarative validation. The requiredness of both fields is also declaratively validated. + If the `DeclarativeValidation` feature gate is enabled, mismatches with existing validation are reported via metrics. + If the `DeclarativeValidationTakeover` feature gate is enabled, declarative validation is the primary source of errors for migrated fields. ([kubernetes/kubernetes#130725](https://github.com/kubernetes/kubernetes/pull/130725), [@jpbetz](https://github.com/jpbetz)) [SIG API Machinery, Apps, Architecture, CLI, Cluster Lifecycle, Instrumentation, Network, Node and Storage] +- The `resource.k8s.io/v1beta1` API is deprecated and will be removed in 1.36. Use `v1beta2` instead. ([kubernetes/kubernetes#129970](https://github.com/kubernetes/kubernetes/pull/129970), [@mortent](https://github.com/mortent)) [SIG API Machinery, Apps, Auth, Etcd, Node, Scheduling and Testing] +- Validation now requires new StatefulSets with a `.spec.serviceName` field value to pass DNS1123 validation. Previously created StatefulSets with an invalid `.spec.serviceName` field value could not create any pods, and should be deleted. + - Published OpenAPI for the StatefulSet schema is corrected to indicate the `.spec.serviceName` is optional. ([kubernetes/kubernetes#130233](https://github.com/kubernetes/kubernetes/pull/130233), [@soltysh](https://github.com/soltysh)) [SIG API Machinery, Apps and Testing] +- When the `PreferSameTrafficDistribution` feature gate is enabled, a new `trafficDistribution` value `PreferSameNode` is available, which attempts to always route Service connections to an endpoint on the same node as the client. Additionally, `PreferSameZone` is introduced as an alias for `PreferClose`. ([kubernetes/kubernetes#130844](https://github.com/kubernetes/kubernetes/pull/130844), [@danwinship](https://github.com/danwinship)) [SIG API Machinery, Apps, Network and Windows] +- When the `PodObservedGenerationTracking` feature gate was set, the kubelet populated `status.observedGeneration` to reflect the latest `metadata.generation` it observed for the pod. ([kubernetes/kubernetes#130352](https://github.com/kubernetes/kubernetes/pull/130352), [@natasha41575](https://github.com/natasha41575)) [SIG API Machinery, Apps, CLI, Node, Release, Scheduling, Storage, Testing and Windows] +- When the `StrictIPCIDRValidation` feature gate is enabled, Kubernetes will be + slightly stricter about what values will be accepted as IP addresses and network + address ranges (“CIDR blocks”). + + In particular, octets within IPv4 addresses are not allowed to have any leading + `0`s, and IPv4-mapped IPv6 values (e.g. `::ffff:192.168.0.1`) are forbidden. + These sorts of values can potentially cause security problems when different + components interpret the same string as referring to different IP addresses + (as in CVE-2021-29923). + + This tightening applies only to fields in built-in API kinds, and not to + custom resource kinds, values in Kubernetes configuration files, or + command-line arguments. + + (When the feature gate is disabled, creating an object with such an invalid + IP or CIDR value will result in a warning from the API server about the fact + that it will be rejected in the future.) ([kubernetes/kubernetes#122550](https://github.com/kubernetes/kubernetes/pull/122550), [#128786](https://github.com/kubernetes/kubernetes/pull/128786), [@danwinship](https://github.com/danwinship)) [SIG API Machinery, Apps, Network, Node, Scheduling and Testing] +- `apidiscovery.k8s.io/v2beta1` API group is disabled by default ([kubernetes/kubernetes#130347](https://github.com/kubernetes/kubernetes/pull/130347), [@Jefftree](https://github.com/Jefftree)) [SIG API Machinery and Testing] +- `kubectl apply` now coerces `null` values for labels and annotations in manifests to empty string values, +consistent with typed JSON metadata decoding, rather than dropping all labels and annotations ([kubernetes/kubernetes#129257](https://github.com/kubernetes/kubernetes/pull/129257), [@liggitt](https://github.com/liggitt)) [SIG API Machinery] +- A new alpha feature gate, `MutableCSINodeAllocatableCount`, has been introduced. + + When this feature gate is enabled, the `CSINode.Spec.Drivers[*].Allocatable.Count` field becomes mutable, and a new field, `NodeAllocatableUpdatePeriodSeconds`, is available in the `CSIDriver` object. This allows periodic updates to a node's reported allocatable volume capacity, preventing stateful pods from becoming stuck due to outdated information that kube-scheduler relies on. ([kubernetes/kubernetes#130007](https://github.com/kubernetes/kubernetes/pull/130007), [@torredil](https://github.com/torredil)) [SIG Apps, Node, Scheduling and Storage] +- Add feature gate `DRAPartitionableDevices`, when enabled, Dynamic Resource Allocation support partitionable devices allocation. ([kubernetes/kubernetes#130764](https://github.com/kubernetes/kubernetes/pull/130764), [@cici37](https://github.com/cici37)) [SIG API Machinery, Architecture, Auth, CLI, Cloud Provider, Cluster Lifecycle, Instrumentation, Network, Node, Scheduling, Storage and Testing] +- Added a /flagz endpoint for kubelet endpoint ([kubernetes/kubernetes#128857](https://github.com/kubernetes/kubernetes/pull/128857), [@zhifei92](https://github.com/zhifei92)) [SIG Architecture, Instrumentation and Node] +- Added a new 'tolerance' field to HorizontalPodAutoscaler, overriding the cluster-wide default. Enabled via the HPAConfigurableTolerance alpha feature gate. ([kubernetes/kubernetes#130797](https://github.com/kubernetes/kubernetes/pull/130797), [@jm-franc](https://github.com/jm-franc)) [SIG API Machinery, Apps, Autoscaling, Etcd, Node, Scheduling and Testing] +- Added support for configuring custom stop signals with a new StopSignal container lifecycle ([kubernetes/kubernetes#130556](https://github.com/kubernetes/kubernetes/pull/130556), [@sreeram-venkitesh](https://github.com/sreeram-venkitesh)) [SIG API Machinery, Apps, Node and Testing] +- CPUManager Policy Options support is GA ([kubernetes/kubernetes#130535](https://github.com/kubernetes/kubernetes/pull/130535), [@ffromani](https://github.com/ffromani)) [SIG API Machinery, Node and Testing] +- Changed the Pod API to support `hugepage resources` at `spec` level for pod-level resources. ([kubernetes/kubernetes#130577](https://github.com/kubernetes/kubernetes/pull/130577), [@KevinTMtz](https://github.com/KevinTMtz)) [SIG Apps, CLI, Node, Scheduling, Storage and Testing] +- DRA: Device taints enable DRA drivers or admins to mark device as unusable, which prevents allocating them. Pods may also get evicted at runtime if a device becomes unusable, depending on the severity of the taint and whether the claim tolerates the taint. ([kubernetes/kubernetes#130447](https://github.com/kubernetes/kubernetes/pull/130447), [@pohly](https://github.com/pohly)) [SIG API Machinery, Apps, Architecture, Auth, Etcd, Instrumentation, Node, Scheduling and Testing] +- DRA: Starting Kubernetes 1.33, only users with access to an admin namespace with the `kubernetes.io/dra-admin-access` label are authorized to create ResourceClaim or ResourceClaimTemplate objects with the `adminAccess` field in this admin namespace if they want to and only they can reference these ResourceClaims or ResourceClaimTemplates in their pod or deployment specs. ([kubernetes/kubernetes#130225](https://github.com/kubernetes/kubernetes/pull/130225), [@ritazh](https://github.com/ritazh)) [SIG API Machinery, Apps, Auth, Node and Testing] +- Expanded the on-disk kubelet credential provider configuration to allow an optional `tokenAttribute` field to be configured. When it is set, the Kubelet will provision a token with the given audience bound to the current pod and its service account. This KSA token along with required annotations on the KSA defined in configuration will be sent to the credential provider plugin via its standard input (along with the image information that is already sent today). The KSA annotations to be sent are configurable in the kubelet credential provider configuration. ([kubernetes/kubernetes#128372](https://github.com/kubernetes/kubernetes/pull/128372), [@aramase](https://github.com/aramase)) [SIG API Machinery, Auth, Node and Testing] +- Fixed the example validation rule in godoc: + + When configuring a JWT authenticator: + + If username.expression uses 'claims.email', then 'claims.email_verified' must be used in + username.expression or extra[*].valueExpression or claimValidationRules[*].expression. + An example claim validation rule expression that matches the validation automatically + applied when username.claim is set to 'email' is 'claims.?email_verified.orValue(true) == true'. + By explicitly comparing the value to true, we let type-checking see the result will be a boolean, + and to make sure a non-boolean `email_verified` claim will be caught at runtime. ([kubernetes/kubernetes#130875](https://github.com/kubernetes/kubernetes/pull/130875), [@aramase](https://github.com/aramase)) [SIG Auth and Release] +- For the InPlacePodVerticalScaling feature, the API server will no longer set the resize status to `Proposed` upon receiving a resize request. ([kubernetes/kubernetes#130574](https://github.com/kubernetes/kubernetes/pull/130574), [@natasha41575](https://github.com/natasha41575)) [SIG Apps, Node and Testing] +- Graduate the MatchLabelKeys (MismatchLabelKeys) feature in PodAffinity (PodAntiAffinity) to GA ([kubernetes/kubernetes#130463](https://github.com/kubernetes/kubernetes/pull/130463), [@sanposhiho](https://github.com/sanposhiho)) [SIG API Machinery, Apps, Node, Scheduling and Testing] +- Graduated image volume sources to beta: + - Allowed `subPath`/`subPathExpr` for image volumes + - Added kubelet metrics `kubelet_image_volume_requested_total`, `kubelet_image_volume_mounted_succeed_total` and `kubelet_image_volume_mounted_errors_total` ([kubernetes/kubernetes#130135](https://github.com/kubernetes/kubernetes/pull/130135), [@saschagrunert](https://github.com/saschagrunert)) [SIG API Machinery, Apps, Node and Testing] +- Improved how the API server responds to **list** requests where the response format negotiates to Protobuf. List responses in Protobuf are marshalled one element at the time, drastically reducing memory needed to serve large collections. Streaming list responses can be disabled via the `StreamingCollectionEncodingToProtobuf` feature gate. ([kubernetes/kubernetes#129407](https://github.com/kubernetes/kubernetes/pull/129407), [@serathius](https://github.com/serathius)) [SIG API Machinery, Apps, Architecture, Auth, CLI, Cloud Provider, Network, Node, Release, Scheduling, Storage and Testing] +- Introduced API type coordination.k8s.io/v1beta1/LeaseCandidate + CoordinatedLeaderElection feature is Beta ([kubernetes/kubernetes#130751](https://github.com/kubernetes/kubernetes/pull/130751), [@Jefftree](https://github.com/Jefftree)) [SIG API Machinery, Etcd and Testing] +- It introduces a new scope name `VolumeAttributesClass`. + + It matches all PVC objects that have the volume attributes class mentioned. + + If you want to limit the count of PVCs that have a specific volume attributes class. In that case, you can create a quota object with the scope name `VolumeAttributesClass` and a matchExpressions that match the volume attributes class. ([kubernetes/kubernetes#124360](https://github.com/kubernetes/kubernetes/pull/124360), [@carlory](https://github.com/carlory)) [SIG API Machinery, Apps and Testing] +- Kubelet: add KubeletConfiguration.subidsPerPod ([kubernetes/kubernetes#130028](https://github.com/kubernetes/kubernetes/pull/130028), [@AkihiroSuda](https://github.com/AkihiroSuda)) [SIG API Machinery and Node] +- New configuration is introduced to the kubelet that allows it to track container images and the list of authentication information that lead to their successful pulls . This data is persisted across reboots of the host and restarts of the kubelet. + + The kubelet ensures any image requiring credential verification is always pulled if authentication information from an image pull is not yet present, thus enforcing authentication / re-authentication. This means an image pull might be attempted even in cases where a pod requests the `IfNotPresent` image pull policy, and might lead to the pod not starting if its pull policy is `Never` and is unable to present authentication information that lead to a previous successful pull of the image it is requesting. ([kubernetes/kubernetes#128152](https://github.com/kubernetes/kubernetes/pull/128152), [@stlaz](https://github.com/stlaz)) [SIG API Machinery, Architecture, Auth, Node and Testing] +- Promote JobSuccessPolicy E2E to Conformance ([kubernetes/kubernetes#130658](https://github.com/kubernetes/kubernetes/pull/130658), [@tenzen-y](https://github.com/tenzen-y)) [SIG API Machinery, Apps, Architecture and Testing] +- Promote NodeInclusionPolicyInPodTopologySpread to Stable in v1.33 ([kubernetes/kubernetes#130920](https://github.com/kubernetes/kubernetes/pull/130920), [@kerthcet](https://github.com/kerthcet)) [SIG Apps, Node, Scheduling and Testing] +- Promote the JobSuccessPolicy to Stable. ([kubernetes/kubernetes#130536](https://github.com/kubernetes/kubernetes/pull/130536), [@tenzen-y](https://github.com/tenzen-y)) [SIG API Machinery, Apps, Architecture and Testing] +- Removed general available feature gate `CPUManager`. ([kubernetes/kubernetes#129296](https://github.com/kubernetes/kubernetes/pull/129296), [@carlory](https://github.com/carlory)) [SIG API Machinery, Node and Testing] +- Start reporting swap capacity as part of node.status.nodeSystemInfo. ([kubernetes/kubernetes#129954](https://github.com/kubernetes/kubernetes/pull/129954), [@iholder101](https://github.com/iholder101)) [SIG API Machinery, Apps and Node] +- The ClusterTrustBundle API is moving to v1beta1. + In order for the ClusterTrustBundleProjection feature to work on the kubelet side, the ClusterTrustBundle API must be available at v1beta1 version and the ClusterTrustBundleProjection feature gate must be enabled. If the API becomes later after kubelet started running, restart the kubelet to enable the feature. ([kubernetes/kubernetes#128499](https://github.com/kubernetes/kubernetes/pull/128499), [@stlaz](https://github.com/stlaz)) [SIG API Machinery, Apps, Auth, Etcd, Node, Storage and Testing] +- The Service trafficDistribution field, including the PreferClose option, has graduated + to GA. Services that do not have the field configured will continue to operate + with their existing behavior. Refer to the documentation + https://kubernetes.io/docs/concepts/services-networking/service/#traffic-distribution + for more details. ([kubernetes/kubernetes#130673](https://github.com/kubernetes/kubernetes/pull/130673), [@gauravkghildiyal](https://github.com/gauravkghildiyal)) [SIG Apps, Network and Testing] +- The feature gate InPlacePodVerticalScalingAllocatedStatus is deprecated and no longer used. The AllocatedResources field in ContainerStatus is now guarded by the InPlacePodVerticalScaling feature gate. ([kubernetes/kubernetes#130880](https://github.com/kubernetes/kubernetes/pull/130880), [@tallclair](https://github.com/tallclair)) [SIG CLI, Node and Scheduling] +- The kube-controller-manager will set the `observedGeneration` field on pod conditions when the `PodObservedGenerationTracking` feature gate is set. ([kubernetes/kubernetes#130650](https://github.com/kubernetes/kubernetes/pull/130650), [@natasha41575](https://github.com/natasha41575)) [SIG API Machinery, Apps, Node, Scheduling, Storage, Testing and Windows] +- The kube-scheduler will set the `observedGeneration` field on pod conditions when the `PodObservedGenerationTracking` feature gate is set. ([kubernetes/kubernetes#130649](https://github.com/kubernetes/kubernetes/pull/130649), [@natasha41575](https://github.com/natasha41575)) [SIG Node, Scheduling and Testing] +- The kubelet will set the `observedGeneration` field on pod conditions when the `PodObservedGenerationTracking` feature gate is set. ([kubernetes/kubernetes#130573](https://github.com/kubernetes/kubernetes/pull/130573), [@natasha41575](https://github.com/natasha41575)) [SIG Apps, Node, Scheduling, Storage, Testing and Windows] +- The minimum value validation of ReplicationController's `replicas` and `minReadySeconds` fields have been migrated to declarative validation. The requiredness of both fields is also declaratively validated. + If the `DeclarativeValidation` feature gate is enabled, mismatches with existing validation are reported via metrics. + If the `DeclarativeValidationTakeover` feature gate is enabled, declarative validation is the primary source of errors for migrated fields. ([kubernetes/kubernetes#130725](https://github.com/kubernetes/kubernetes/pull/130725), [@jpbetz](https://github.com/jpbetz)) [SIG API Machinery, Apps, Architecture, CLI, Cluster Lifecycle, Instrumentation, Network, Node and Storage] +- The resource.k8s.io/v1beta1 API is deprecated and will be removed in 1.36. Use v1beta2 instead. ([kubernetes/kubernetes#129970](https://github.com/kubernetes/kubernetes/pull/129970), [@mortent](https://github.com/mortent)) [SIG API Machinery, Apps, Auth, Etcd, Node, Scheduling and Testing] +- Validation now requires new StatefulSets with a `.spec.serviceName` field value to pass DNS1123 validation. Previously created StatefulSets with an invalid `.spec.serviceName` field value could not create any pods, and should be deleted. + - Published OpenAPI for the StatefulSet schema is corrected to indicate the `.spec.serviceName` is optional. ([kubernetes/kubernetes#130233](https://github.com/kubernetes/kubernetes/pull/130233), [@soltysh](https://github.com/soltysh)) [SIG API Machinery, Apps and Testing] +- When the `ImprovedTrafficDistribution` feature gate is enabled, a new + `trafficDistribution` value `PreferSameNode` is available, which attempts to + always route Service connections to an endpoint on the same node as + the client. Additionally, `PreferSameZone` is introduced as an alias for + `PreferClose`. ([kubernetes/kubernetes#130844](https://github.com/kubernetes/kubernetes/pull/130844), [@danwinship](https://github.com/danwinship)) [SIG API Machinery, Apps, Network and Windows] +- When the `StrictIPCIDRValidation` feature gate is enabled, Kubernetes will be + slightly stricter about what values will be accepted as IP addresses and network + address ranges (“CIDR blocks”). + + In particular, octets within IPv4 addresses are not allowed to have any leading + `0`s, and IPv4-mapped IPv6 values (e.g. `::ffff:192.168.0.1`) are forbidden. + These sorts of values can potentially cause security problems when different + components interpret the same string as referring to different IP addresses + (as in CVE-2021-29923). + + This tightening applies only to fields in build-in API kinds, and not to + custom resource kinds, values in Kubernetes configuration files, or + command-line arguments. + + (When the feature gate is disabled, creating an object with such an invalid + IP or CIDR value will result in a warning from the API server about the fact + that it will be rejected in the future.) ([kubernetes/kubernetes#122550](https://github.com/kubernetes/kubernetes/pull/122550), [@danwinship](https://github.com/danwinship)) [SIG API Machinery, Apps, Network, Node, Scheduling and Testing] +- `apidiscovery.k8s.io/v2beta1` API group is disabled by default ([kubernetes/kubernetes#130347](https://github.com/kubernetes/kubernetes/pull/130347), [@Jefftree](https://github.com/Jefftree)) [SIG API Machinery and Testing] +- DRA support for a "one-of" prioritized list of selection criteria to satisfy a device request in a resource claim. ([kubernetes/kubernetes#128586](https://github.com/kubernetes/kubernetes/pull/128586), [@mortent](https://github.com/mortent)) [SIG API Machinery, Apps, Etcd, Node, Scheduling and Testing] +- For the InPlacePodVerticalScaling feature, the API server will no longer set the resize status to `Proposed` upon receiving a resize request. ([kubernetes/kubernetes#130574](https://github.com/kubernetes/kubernetes/pull/130574), [@natasha41575](https://github.com/natasha41575)) [SIG Apps, Node and Testing] +- The apiserver will now return warnings if you create objects with "invalid" IP or + CIDR values (like "192.168.000.005", which should not have the extra zeros). + Values with non-standard formats can introduce security problems, and will + likely be forbidden in a future Kubernetes release. ([kubernetes/kubernetes#128786](https://github.com/kubernetes/kubernetes/pull/128786), [@danwinship](https://github.com/danwinship)) [SIG Apps, Network and Node] +- When the `PodObservedGenerationTracking` feature gate is set, the kubelet will populate `status.observedGeneration` to reflect the pod's latest `metadata.generation` that it has observed. ([kubernetes/kubernetes#130352](https://github.com/kubernetes/kubernetes/pull/130352), [@natasha41575](https://github.com/natasha41575)) [SIG API Machinery, Apps, CLI, Node, Release, Scheduling, Storage, Testing and Windows] +- InPlacePodVerticalScaling: Memory limits cannot be decreased unless the memory resize restart policy is set to `RestartContainer`. Container resizePolicy is no longer mutable. ([kubernetes/kubernetes#130183](https://github.com/kubernetes/kubernetes/pull/130183), [@tallclair](https://github.com/tallclair)) [SIG Apps and Node] +- Introduced API type coordination.k8s.io/v1beta1/LeaseCandidate ([kubernetes/kubernetes#130291](https://github.com/kubernetes/kubernetes/pull/130291), [@Jefftree](https://github.com/Jefftree)) [SIG API Machinery, Etcd and Testing] +- KEP-3857: Recursive Read-only (RRO) mounts: promote to GA ([kubernetes/kubernetes#130116](https://github.com/kubernetes/kubernetes/pull/130116), [@AkihiroSuda](https://github.com/AkihiroSuda)) [SIG Apps, Node and Testing] +- MergeDefaultEvictionSettings indicates that defaults for the evictionHard, evictionSoft, evictionSoftGracePeriod, and evictionMinimumReclaim fields should be merged into values specified for those fields in this configuration. Signals specified in this configuration take precedence. Signals not specified in this configuration inherit their defaults. ([kubernetes/kubernetes#127577](https://github.com/kubernetes/kubernetes/pull/127577), [@vaibhav2107](https://github.com/vaibhav2107)) [SIG API Machinery and Node] +- Promote the Job's JobBackoffLimitPerIndex feature-gate to stable. ([kubernetes/kubernetes#130061](https://github.com/kubernetes/kubernetes/pull/130061), [@mimowo](https://github.com/mimowo)) [SIG API Machinery, Apps, Architecture and Testing] +- Promoted the feature gate `AnyVolumeDataSource` to GA. ([kubernetes/kubernetes#129770](https://github.com/kubernetes/kubernetes/pull/129770), [@sunnylovestiramisu](https://github.com/sunnylovestiramisu)) [SIG Apps, Storage and Testing] +- Added support for in-place vertical scaling of Pods with sidecars (containers defined within `initContainers` where the `restartPolicy` is Always). ([kubernetes/kubernetes#128367](https://github.com/kubernetes/kubernetes/pull/128367), [@vivzbansal](https://github.com/vivzbansal)) [SIG API Machinery, Apps, CLI, Node, Scheduling and Testing] +- Kubectl: added alpha support for customizing kubectl behavior using preferences from a `kuberc` file (separate from kubeconfig). ([kubernetes/kubernetes#125230](https://github.com/kubernetes/kubernetes/pull/125230), [@ardaguclu](https://github.com/ardaguclu)) [SIG API Machinery, CLI and Testing] +- A new status field `.status.terminatingReplicas` is added to Deployments and ReplicaSets to allow tracking of terminating pods when the DeploymentReplicaSetTerminatingReplicas feature-gate is enabled. ([kubernetes/kubernetes#128546](https://github.com/kubernetes/kubernetes/pull/128546), [@atiratree](https://github.com/atiratree)) [SIG API Machinery, Apps and Testing] +- DRA API: the maximum number of pods which can use the same ResourceClaim is now 256 instead of 32. Beware that downgrading a cluster where this relaxed limit is in use to Kubernetes 1.32.0 is not supported because 1.32.0 would refuse to update ResourceClaims with more than 32 entries in the status.reservedFor field. ([kubernetes/kubernetes#129543](https://github.com/kubernetes/kubernetes/pull/129543), [@pohly](https://github.com/pohly)) [SIG API Machinery, Node and Testing] +- DRA: CEL expressions using attribute strings exceeded the cost limit because their cost estimation was incomplete. ([kubernetes/kubernetes#129661](https://github.com/kubernetes/kubernetes/pull/129661), [@pohly](https://github.com/pohly)) [SIG Node] +- DRA: when asking for "All" devices on a node, Kubernetes <= 1.32 proceeded to schedule pods onto nodes with no devices by not allocating any devices for those pods. Kubernetes 1.33 changes that to only picking nodes which have at least one device. Users who want the "proceed with scheduling also without devices" semantic can use the upcoming prioritized list feature with one sub-request for "all" devices and a second alternative with "count: 0". ([kubernetes/kubernetes#129560](https://github.com/kubernetes/kubernetes/pull/129560), [@bart0sh](https://github.com/bart0sh)) [SIG API Machinery and Node] +- Graduate MultiCIDRServiceAllocator to stable and DisableAllocatorDualWrite to beta (disabled by default). + Action required for Kubernetes distributions that manage the cluster Service CIDR. + This feature allows users to define the cluster Service CIDR via a new API object: ServiceCIDR. + Distributions or administrators of Kubernetes may want to control that new Service CIDRs added to the cluster does not overlap with other networks on the cluster, that only belong to a specific range of IPs or just simple retain the existing behavior of only having one ServiceCIDR per cluster. An example of a Validation Admission Policy to achieve this is: + + --- + apiVersion: admissionregistration.k8s.io/v1 + kind: ValidatingAdmissionPolicy + metadata: + name: "servicecidrs.default" + spec: + failurePolicy: Fail + matchConstraints: + resourceRules: + - apiGroups: ["networking.k8s.io"] + apiVersions: ["v1","v1beta1"] + operations: ["CREATE", "UPDATE"] + resources: ["servicecidrs"] + matchConditions: + - name: 'exclude-default-servicecidr' + expression: "object.metadata.name != 'kubernetes'" + variables: + - name: allowed + expression: "['10.96.0.0/16','2001:db8::/64']" + validations: + - expression: "object.spec.cidrs.all(i , variables.allowed.exists(j , cidr(j).containsCIDR(i)))" + --- + apiVersion: admissionregistration.k8s.io/v1 + kind: ValidatingAdmissionPolicyBinding + metadata: + name: "servicecidrs-binding" + spec: + policyName: "servicecidrs.default" + validationActions: [Deny,Audit] + --- ([kubernetes/kubernetes#128971](https://github.com/kubernetes/kubernetes/pull/128971), [@aojea](https://github.com/aojea)) [SIG Apps, Architecture, Auth, CLI, Etcd, Network, Release and Testing] +- Kubernetes starts validating NodeSelectorRequirement's values when creating pods. ([kubernetes/kubernetes#128212](https://github.com/kubernetes/kubernetes/pull/128212), [@AxeZhan](https://github.com/AxeZhan)) [SIG Apps and Scheduling] +- Kubernetes components that accept x509 client certificate authentication now read the user UID from a certificate subject name RDN with object id 1.3.6.1.4.1.57683.2. An RDN with this object id must contain a string value, and appear no more than once in the certificate subject. Reading the user UID from this RDN can be disabled by setting the beta feature gate `AllowParsingUserUIDFromCertAuth` to false (until the feature gate graduates to GA). ([kubernetes/kubernetes#127897](https://github.com/kubernetes/kubernetes/pull/127897), [@modulitos](https://github.com/modulitos)) [SIG API Machinery, Auth and Testing] +- Removed general available feature-gate `PDBUnhealthyPodEvictionPolicy`. ([kubernetes/kubernetes#129500](https://github.com/kubernetes/kubernetes/pull/129500), [@carlory](https://github.com/carlory)) [SIG API Machinery, Apps and Auth] +- `kubectl apply` now coerces `null` values for labels and annotations in manifests to empty string values, consistent with typed JSON metadata decoding, rather than dropping all labels and annotations ([kubernetes/kubernetes#129257](https://github.com/kubernetes/kubernetes/pull/129257), [@liggitt](https://github.com/liggitt)) [SIG API Machinery] + + +# v32.0.1 + +Kubernetes API Version: v1.32.2 + +### Uncategorized +- Adds support for providing cluster information to the exec credential provider if requested. (#2303, @brendandburns) +- Remove py from test dependencies (#2288, @jelly) + +### Bug or Regression +- Fix dynamic client watch of named resource (#2076, @bobh66) +- Fixed PortForward proxy to close local Python sockets when the WebSocket closes. (#2316, @anvilpete) +- Fixes bug that would fail authentication when using the exec-provider with a specific cluster selected (#2340, @tomasaschan) + +### Feature +- Add utility functions kubernetes.utils.duration.parse_duration and kubernetes.utils.duration.format_duration to manage Gateway API Duration strings as specified by GEP-2257. (#2261, @kflynn) +- Added the ability to use the optional `apply` parameter for functions within the `utils.create_from_yaml` submodule. This allows these functions to optionally use the `DynamicClient.server_side_apply` function to apply yaml manifests. (#2252, @dcmcand) +- Adding `utils.format_quantity` to convert decimal numbers into a canonical Kubernetes quantity. (#2216, @rkschamer) + +# v32.0.0 + +Kubernetes API Version: v1.32.1 + +### Bug or Regression +- Fixed PortForward proxy to close local Python sockets when the WebSocket closes. (#2316, @anvilpete) + +# v32.0.0b1 + +Kubernetes API Version: v1.32.1 + +### API Change +- DRA API: the maximum number of pods which can use the same ResourceClaim is now 256 instead of 32. Beware that downgrading a cluster where this relaxed limit is in use to Kubernetes 1.32.0 is not supported because 1.32.0 would refuse to update ResourceClaims with more than 32 entries in the status.reservedFor field. ([kubernetes/kubernetes#129544](https://github.com/kubernetes/kubernetes/pull/129544), [@pohly](https://github.com/pohly)) [SIG API Machinery, Node and Testing] +- NONE ([kubernetes/kubernetes#129598](https://github.com/kubernetes/kubernetes/pull/129598), [@aravindhp](https://github.com/aravindhp)) [SIG API Machinery and Node] + + +# v32.0.0a1 + +Kubernetes API Version: v1.32.0 + +### API Change +- **ACTION REQUIRED** for custom scheduler plugin developers: + `PodEligibleToPreemptOthers` in the `preemption` interface now includes `ctx` in the parameters. + Please update your plugins' implementation accordingly. ([kubernetes/kubernetes#126465](https://github.com/kubernetes/kubernetes/pull/126465), [@googs1025](https://github.com/googs1025)) [SIG Scheduling] +- Changed NodeToStatusMap from a map to a struct and exposed methods to access the entries. Added absentNodesStatus, which informs the status of nodes that are absent in the map. For developers of out-of-tree PostFilter plugins, ensure to update the usage of NodeToStatusMap. Additionally, NodeToStatusMap should eventually be renamed to NodeToStatusReader. ([kubernetes/kubernetes#126022](https://github.com/kubernetes/kubernetes/pull/126022), [@macsko](https://github.com/macsko)) [SIG Node, Scheduling, and Testing] +- A new /resize subresource was added to request pod resource resizing. Update your k8s client code to utilize the /resize subresource for Pod resizing operations. ([kubernetes/kubernetes#128266](https://github.com/kubernetes/kubernetes/pull/128266), [@AnishShah](https://github.com/AnishShah)) [SIG API Machinery, Apps, Node and Testing] +- A new feature that allows unsafe deletion of corrupt resources has been added, it is disabled by default, + and it can be enabled by setting the option `--feature-gates=AllowUnsafeMalformedObjectDeletion=true`. + It comes with an API change, a new delete option `ignoreStoreReadErrorWithClusterBreakingPotential` has + been introduced, it is not set by default, this maintains backward compatibility. + In order to perform an unsafe deletion of a corrupt resource, the user must enable the option for the delete + request. A resource is considered corrupt if it can not be successfully retrieved from the storage due to + a) transformation error e.g. decryption failure, or b) the object failed to decode. Normal deletion flow is + attempted first, and if it fails with a corrupt resource error then it triggers unsafe delete. + In addition, when this feature is enabled, the 'details' field of 'Status' from the LIST response + includes information that identifies the corrupt object(s). + NOTE: unsafe deletion ignores finalizer constraints, and skips precondition checks. + WARNING: this may break the workload associated with the resource being unsafe-deleted, if it relies on + the normal deletion flow, so cluster breaking consequences apply. ([kubernetes/kubernetes#127513](https://github.com/kubernetes/kubernetes/pull/127513), [@tkashem](https://github.com/tkashem)) [SIG API Machinery, Etcd, Node and Testing] +- Added `singleProcessOOMKill` flag to the kubelet configuration. Setting that to true enable single process OOM killing in cgroups v2. In this mode, if a single process is OOM killed within a container, the remaining processes will not be OOM killed. ([kubernetes/kubernetes#126096](https://github.com/kubernetes/kubernetes/pull/126096), [@utam0k](https://github.com/utam0k)) [SIG API Machinery, Node, Testing and Windows] +- Added a `/flagz` endpoint for kube-apiserver endpoint. ([kubernetes/kubernetes#127581](https://github.com/kubernetes/kubernetes/pull/127581), [@richabanker](https://github.com/richabanker)) [SIG API Machinery, Architecture, Auth and Instrumentation] +- Added a `Stream` field to `PodLogOptions`, which allows clients to request certain log stream (stdout or stderr) of the container. + Please also note that the combination of a specific `Stream` and `TailLines` is not supported. ([kubernetes/kubernetes#127360](https://github.com/kubernetes/kubernetes/pull/127360), [@knight42](https://github.com/knight42)) [SIG API Machinery, Apps, Architecture, Node, Release and Testing] +- Added alpha support for asynchronous Pod preemption. + When the `SchedulerAsyncPreemption` feature gate is enabled, the scheduler now runs API calls to trigger preemptions asynchronously for better performance. ([kubernetes/kubernetes#128170](https://github.com/kubernetes/kubernetes/pull/128170), [@sanposhiho](https://github.com/sanposhiho)) [SIG Scheduling and Testing] +- Added driver-owned fields in `ResourceClaim.Status` to report device status data for each allocated device. ([kubernetes/kubernetes#128240](https://github.com/kubernetes/kubernetes/pull/128240), [@LionelJouin](https://github.com/LionelJouin)) [SIG API Machinery, Network, Node and Testing] +- Added enforcement of an upper cost bound for DRA evaluations of CEL. The API server and scheduler now enforce an upper bound on the cost and runtime steps required for evaluating a CEL expression. ([kubernetes/kubernetes#128101](https://github.com/kubernetes/kubernetes/pull/128101), [@pohly](https://github.com/pohly)) [SIG API Machinery and Node] +- Added the ability to change the maximum backoff delay accrued between container restarts for a node for containers in `CrashLoopBackOff`. To set this for a node, turn on the feature gate `KubeletCrashLoopBackoffMax` and set the `CrashLoopBackOff.MaxContainerRestartPeriod ` field between `"1s"` and `"300s"` in your [kubelet config file](https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/). ([kubernetes/kubernetes#128374](https://github.com/kubernetes/kubernetes/pull/128374), [@lauralorenz](https://github.com/lauralorenz)) [SIG API Machinery and Node] +- Allow for Pod search domains to be a single dot `.` or contain an underscore `_` ([kubernetes/kubernetes#127167](https://github.com/kubernetes/kubernetes/pull/127167), [@adrianmoisey](https://github.com/adrianmoisey)) [SIG Apps, Network and Testing] +- Annotation `batch.kubernetes.io/cronjob-scheduled-timestamp` added to Job objects scheduled from CronJobs is promoted to stable. ([kubernetes/kubernetes#128336](https://github.com/kubernetes/kubernetes/pull/128336), [@soltysh](https://github.com/soltysh)) +- Apply fsGroup policy for ReadWriteOncePod volumes. ([kubernetes/kubernetes#128244](https://github.com/kubernetes/kubernetes/pull/128244), [@gnufied](https://github.com/gnufied)) [SIG Storage and Testing] +- Changed the Pod API to support `resources` at `spec` level for pod-level resources. ([kubernetes/kubernetes#128407](https://github.com/kubernetes/kubernetes/pull/128407), [@ndixita](https://github.com/ndixita)) [SIG API Machinery, Apps, CLI, Cluster Lifecycle, Node, Release, Scheduling and Testing] +- ContainerStatus.AllocatedResources is now guarded by a separate feature gate, InPlacePodVerticalSaclingAllocatedStatus ([kubernetes/kubernetes#128377](https://github.com/kubernetes/kubernetes/pull/128377), [@tallclair](https://github.com/tallclair)) [SIG API Machinery, CLI, Node, Scheduling and Testing] +- Coordination.v1alpha1 API is dropped and replaced with coordination.v1alpha2. Old coordination.v1alpha1 types must be deleted before upgrade ([kubernetes/kubernetes#127857](https://github.com/kubernetes/kubernetes/pull/127857), [@Jefftree](https://github.com/Jefftree)) [SIG API Machinery, Etcd, Scheduling and Testing] +- DRA: Restricted the length of opaque device configuration parameters. At admission time, Kubernetes enforces a 10KiB size limit. ([kubernetes/kubernetes#128601](https://github.com/kubernetes/kubernetes/pull/128601), [@pohly](https://github.com/pohly)) [SIG API Machinery, Apps, Auth, Etcd, Node, Scheduling and Testing] +- DRA: scheduling pods is up to 16x faster, depending on the scenario. Scheduling throughput depends a lot on cluster utilization. It is higher for lightly loaded clusters with free resources and gets lower when the cluster utilization increases. ([kubernetes/kubernetes#127277](https://github.com/kubernetes/kubernetes/pull/127277), [@pohly](https://github.com/pohly)) [SIG API Machinery, Apps, Architecture, Auth, Etcd, Instrumentation, Node, Scheduling and Testing] +- DRA: the `DeviceRequestAllocationResult` struct now has an "AdminAccess" field which should be used instead of the corresponding field in the `DeviceRequest` field when dealing with an allocation. If a device is only allocated for admin access, allocating it again for normal usage is now supported, as originally intended. To allow admin access, starting with 1.32 the `DRAAdminAccess` feature gate must be enabled. ([kubernetes/kubernetes#127266](https://github.com/kubernetes/kubernetes/pull/127266), [@pohly](https://github.com/pohly)) [SIG API Machinery, Apps, Auth, Etcd, Network, Node, Scheduling and Testing] +- Disallow `k8s.io` and `kubernetes.io` namespaced extra key in structured authentication configuration. ([kubernetes/kubernetes#126553](https://github.com/kubernetes/kubernetes/pull/126553), [@aramase](https://github.com/aramase)) [SIG Auth] +- Fixed a bug in the `NestedNumberAsFloat64` Unstructured field accessor that could have caused it to return rounded float64 values instead of errors when accessing very large int64 values. ([kubernetes/kubernetes#128099](https://github.com/kubernetes/kubernetes/pull/128099), [@benluddy](https://github.com/benluddy)) +- Fixed the bug where `spec.terminationGracePeriodSeconds` of the pod will always be overwritten by the MaxPodGracePeriodSeconds of the soft eviction, you can enable the `AllowOverwriteTerminationGracePeriodSeconds` feature gate, which will restore the previous behavior. If you do need to set this, please file an issue with the Kubernetes project to help contributors understand why you needed it. ([kubernetes/kubernetes#122890](https://github.com/kubernetes/kubernetes/pull/122890), [@HirazawaUi](https://github.com/HirazawaUi)) [SIG API Machinery, Architecture, Node and Testing] +- Graduated Job's `ManagedBy` field to beta. ([kubernetes/kubernetes#127402](https://github.com/kubernetes/kubernetes/pull/127402), [@mimowo](https://github.com/mimowo)) [SIG API Machinery, Apps and Testing] +- Implemented a new, alpha `seLinuxChangePolicy` field within a Pod-level `securityContext`, under SELinuxChangePolicy feature gate. This field allows for opting out from mounting Pod volumes with SELinux label when SELinuxMount feature is enabled (it is alpha and disabled by default now). + Please see [the KEP](https://github.com/kubernetes/enhancements/tree/master/keps/sig-storage/1710-selinux-relabeling#story-3-cluster-upgrade) how we expect to warn users before any SELinux behavior changes and how they can opt-out before. Note that this field and feature gate is useful only with clusters that run with SELinux enabled. No action is required on clusters without SELinux. ([kubernetes/kubernetes#127981](https://github.com/kubernetes/kubernetes/pull/127981), [@jsafrane](https://github.com/jsafrane)) [SIG API Machinery, Apps, Architecture, Node, Storage and Testing] +- Introduced `v1alpha1` API for mutating admission policies, enabling extensible # admission control via CEL expressions (KEP 3962: Mutating Admission Policies). # To use, enable the `MutatingAdmissionPolicy` feature gate and the `admissionregistration.k8s.io/v1alpha1` # API via `--runtime-config`. ([kubernetes/kubernetes#127134](https://github.com/kubernetes/kubernetes/pull/127134), [@jpbetz](https://github.com/jpbetz)) [SIG API Machinery, Auth, Etcd and Testing] +- Introduced compressible resource setting on system reserved and kube reserved slices. ([kubernetes/kubernetes#125982](https://github.com/kubernetes/kubernetes/pull/125982), [@harche](https://github.com/harche)) +- kube-apiserver: Promoted the `StructuredAuthorizationConfiguration` feature gate to GA. The `--authorization-config` flag now accepts `AuthorizationConfiguration` in version `apiserver.config.k8s.io/v1` (with no changes from `apiserver.config.k8s.io/v1beta1`). ([kubernetes/kubernetes#128172](https://github.com/kubernetes/kubernetes/pull/128172), [@liggitt](https://github.com/liggitt)) [SIG API Machinery, Auth and Testing] +- kube-proxy now reconciles Service/Endpoint changes with conntrack table and cleans up only stale UDP flow entries ([kubernetes/kubernetes#127318](https://github.com/kubernetes/kubernetes/pull/127318), [@aroradaman](https://github.com/aroradaman)) [SIG Network and Windows] +- kube-scheduler removed `AzureDiskLimits` ,`CinderLimits` `EBSLimits` and `GCEPDLimits` plugin. Given the corresponding CSI driver reports how many volumes a node can handle in NodeGetInfoResponse, the kubelet stores this limit in CSINode and the scheduler then knows the limit of the driver on the node. Removed plugins AzureDiskLimits, CinderLimits, EBSLimits and GCEPDLimits if you explicitly enabled them in the scheduler config. ([kubernetes/kubernetes#124003](https://github.com/kubernetes/kubernetes/pull/124003), [@carlory](https://github.com/carlory)) [SIG Scheduling, Storage and Testing] +- kubelet: the `--image-credential-provider-config` file was loaded with strict deserialization, which failed if the config file contained duplicate or unknown fields. This protected against accidentally running with malformed config files, unindented files, or typos in field names, and it prevented unexpected behavior. ([kubernetes/kubernetes#128062](https://github.com/kubernetes/kubernetes/pull/128062), [@aramase](https://github.com/aramase)) [SIG Auth and Node] +- NodeRestriction admission now validates the audience value that kubelet is requesting a service account token for is part of the pod spec volume. This change is introduced with a new kube-apiserver featuregate `ServiceAccountNodeAudienceRestriction` that's enabled by default. ([kubernetes/kubernetes#128077](https://github.com/kubernetes/kubernetes/pull/128077), [@aramase](https://github.com/aramase)) [SIG Auth, Storage and Testing] +- Promoted `CustomResourceFieldSelectors` to stable; the feature was enabled by default. The `--feature-gates=CustomResourceFieldSelectors=true` flag was no longer needed on kube-apiserver binaries and would be removed in a future release. ([kubernetes/kubernetes#127673](https://github.com/kubernetes/kubernetes/pull/127673), [@jpbetz](https://github.com/jpbetz)) [SIG API Machinery and Testing] +- Promoted feature gate `StatefulSetAutoDeletePVC` from beta to stable. ([kubernetes/kubernetes#128247](https://github.com/kubernetes/kubernetes/pull/128247), [@mattcary](https://github.com/mattcary)) [SIG API Machinery, Apps, Auth and Testing] +- Removed all support for _classic_ dynamic resource allocation (DRA). The `DRAControlPlaneController` feature gate, formerly alpha, is no longer available. Kubernetes now only uses the _structured parameters_ model (also alpha) for allocating dynamic resources to Pods. + if and only if classic DRA was enabled in a cluster, remove all workloads (pods, app deployments, etc. ) which depend on classic DRA and make sure that all PodSchedulingContext resources are gone before upgrading. PodSchedulingContext resources cannot be removed through the apiserver after an upgrade and workloads would not work properly. ([kubernetes/kubernetes#128003](https://github.com/kubernetes/kubernetes/pull/128003), [@pohly](https://github.com/pohly)) [SIG API Machinery, Apps, Auth, Etcd, Node, Scheduling and Testing] +- Removed generally available feature gate `HPAContainerMetrics` ([kubernetes/kubernetes#126862](https://github.com/kubernetes/kubernetes/pull/126862), [@carlory](https://github.com/carlory)) [SIG API Machinery, Apps and Autoscaling] +- Removed restrictions on subresource flag in kubectl commands ([kubernetes/kubernetes#128296](https://github.com/kubernetes/kubernetes/pull/128296), [@AnishShah](https://github.com/AnishShah)) [SIG CLI] +- Revised the kubelet API Authorization with new subresources, that allow finer-grained authorization checks and access control for kubelet endpoints. + Provided you enable the `KubeletFineGrainedAuthz` feature gate, you can access kubelet's `/healthz` endpoint by granting the caller `nodes/helathz` permission in RBAC. + Similarly you can also access kubelet's `/pods` endpoint to fetch a list of Pods bound to that node by granting the caller `nodes/pods` permission in RBAC. + Similarly you can also access kubelet's `/configz` endpoint to fetch kubelet's configuration by granting the caller `nodes/configz` permission in RBAC. + You can still access kubelet's `/healthz`, `/pods` and `/configz` by granting the caller `nodes/proxy` permission in RBAC but that also grants the caller permissions to exec, run and attach to containers on the nodes and doing so does not follow the least privilege principle. Granting callers more permissions than they need can give attackers an opportunity to escalate privileges. ([kubernetes/kubernetes#126347](https://github.com/kubernetes/kubernetes/pull/126347), [@vinayakankugoyal](https://github.com/vinayakankugoyal)) [SIG API Machinery, Auth, Cluster Lifecycle and Node] +- The core functionality of Dynamic Resource Allocation (DRA) got promoted to beta. No action is required when *upgrading*, the previous v1alpha3 API is still supported, so existing deployments and DRA drivers based on v1alpha3 continue to work. *Downgrading* from 1.32 to 1.31 with DRA resources in the cluster (resourceclaims, resourceclaimtemplates, deviceclasses, resourceslices) is *not* supported because the new v1beta1 is used as storage version and not readable by 1.31. ([kubernetes/kubernetes#127511](https://github.com/kubernetes/kubernetes/pull/127511), [@pohly](https://github.com/pohly)) [SIG API Machinery, Apps, Auth, Etcd, Node, Scheduling and Testing] +- The default value for node-monitor-grace-period has been increased to 50s (earlier 40s) (Ref - https://github.com/kubernetes/kubernetes/issues/121793) ([kubernetes/kubernetes#126287](https://github.com/kubernetes/kubernetes/pull/126287), [@devppratik](https://github.com/devppratik)) [SIG API Machinery, Apps and Node] +- The resource/v1alpha3.ResourceSliceList filed which should have been named "metadata" but was instead named "listMeta" is now properly "metadata". ([kubernetes/kubernetes#126749](https://github.com/kubernetes/kubernetes/pull/126749), [@thockin](https://github.com/thockin)) [SIG API Machinery] +- The synthetic "Bookmark" event for the watch stream requests will now include a new annotation: `kubernetes.io/initial-events-list-blueprint`. THe annotation contains an empty, versioned list that is encoded in the requested format (such as protobuf, JSON, or CBOR), then base64-encoded and stored as a string. ([kubernetes/kubernetes#127587](https://github.com/kubernetes/kubernetes/pull/127587), [@p0lyn0mial](https://github.com/p0lyn0mial)) [SIG API Machinery] +- To enhance usability and developer experience, CRD validation rules now support direct use of (CEL) reserved keywords as field names in object validation expressions. + Name format CEL library is supported in new expressions. ([kubernetes/kubernetes#126977](https://github.com/kubernetes/kubernetes/pull/126977), [@aaron-prindle](https://github.com/aaron-prindle)) [SIG API Machinery, Architecture, Auth, Etcd, Instrumentation, Release, Scheduling and Testing] +- Updated incorrect description of persistentVolumeClaimRetentionPolicy ([kubernetes/kubernetes#126545](https://github.com/kubernetes/kubernetes/pull/126545), [@yangjunmyfm192085](https://github.com/yangjunmyfm192085)) [SIG API Machinery, Apps and CLI] +- X.509 client certificate authentication to the kube-apiserver now produces credential IDs (derived from the certificate's signature) , for use in audit logging. ([kubernetes/kubernetes#125634](https://github.com/kubernetes/kubernetes/pull/125634), [@ahmedtd](https://github.com/ahmedtd)) [SIG API Machinery, Auth and Testing] +- Request header UID propagation is gated behind an alpha RemoteRequestHeaderUID feature gate. ([kubernetes/kubernetes#129081](https://github.com/kubernetes/kubernetes/pull/129081), [@stlaz](https://github.com/stlaz)) [SIG API Machinery, Cluster Lifecycle and Testing] +- A new /resize subresource was added to request pod resource resizing. Update your k8s client code to utilize the /resize subresource for Pod resizing operations. ([kubernetes/kubernetes#128266](https://github.com/kubernetes/kubernetes/pull/128266), [@AnishShah](https://github.com/AnishShah)) [SIG API Machinery, Apps, Node and Testing] +- A new feature that allows unsafe deletion of corrupt resources has been added, it is disabled by default, + and it can be enabled by setting the option `--feature-gates=AllowUnsafeMalformedObjectDeletion=true`. + It comes with an API change, a new delete option `ignoreStoreReadErrorWithClusterBreakingPotential` has + been introduced, it is not set by default, this maintains backward compatibility. + In order to perform an unsafe deletion of a corrupt resource, the user must enable the option for the delete + request. A resource is considered corrupt if it can not be successfully retrieved from the storage due to + a) transformation error e.g. decryption failure, or b) the object failed to decode. Normal deletion flow is + attempted first, and if it fails with a corrupt resource error then it triggers unsafe delete. + In addition, when this feature is enabled, the 'details' field of 'Status' from the LIST response + includes information that identifies the corrupt object(s). + NOTE: unsafe deletion ignores finalizer constraints, and skips precondition checks. + WARNING: this may break the workload associated with the resource being unsafe-deleted, if it relies on + the normal deletion flow, so cluster breaking consequences apply. ([kubernetes/kubernetes#127513](https://github.com/kubernetes/kubernetes/pull/127513), [@tkashem](https://github.com/tkashem)) [SIG API Machinery, Etcd, Node and Testing] +- Add a `Stream` field to `PodLogOptions`, which allows clients to request certain log stream(stdout or stderr) of the container. + Please also note that the combination of a specific `Stream` and `TailLines` is not supported. ([kubernetes/kubernetes#127360](https://github.com/kubernetes/kubernetes/pull/127360), [@knight42](https://github.com/knight42)) [SIG API Machinery, Apps, Architecture, Node, Release and Testing] +- Add driver-owned fields in ResourceClaim.Status to report device status data for each allocated device. ([kubernetes/kubernetes#128240](https://github.com/kubernetes/kubernetes/pull/128240), [@LionelJouin](https://github.com/LionelJouin)) [SIG API Machinery, Network, Node and Testing] +- Added `singleProcessOOMKill` flag to the kubelet configuration. Setting that to true enable single process OOM killing in cgroups v2. In this mode, if a single process is OOM killed within a container, the remaining processes will not be OOM killed. ([kubernetes/kubernetes#126096](https://github.com/kubernetes/kubernetes/pull/126096), [@utam0k](https://github.com/utam0k)) [SIG API Machinery, Node, Testing and Windows] +- Added alpha support for asynchronous Pod preemption. + When the `SchedulerAsyncPreemption` feature gate is enabled, the scheduler now runs API calls to trigger preemptions asynchronously for better performance. ([kubernetes/kubernetes#128170](https://github.com/kubernetes/kubernetes/pull/128170), [@sanposhiho](https://github.com/sanposhiho)) [SIG Scheduling and Testing] +- Added the ability to change the maximum backoff delay accrued between container restarts for a node for containers in `CrashLoopBackOff`. To set this for a node, turn on the feature gate `KubeletCrashLoopBackoffMax` and set the `CrashLoopBackOff.MaxContainerRestartPeriod ` field between `"1s"` and `"300s"` in your [kubelet config file](https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/). ([kubernetes/kubernetes#128374](https://github.com/kubernetes/kubernetes/pull/128374), [@lauralorenz](https://github.com/lauralorenz)) [SIG API Machinery and Node] +- Adds a /flagz endpoint for kube-apiserver endpoint ([kubernetes/kubernetes#127581](https://github.com/kubernetes/kubernetes/pull/127581), [@richabanker](https://github.com/richabanker)) [SIG API Machinery, Architecture, Auth and Instrumentation] +- Changed the Pod API to support `resources` at `spec` level for pod-level resources. ([kubernetes/kubernetes#128407](https://github.com/kubernetes/kubernetes/pull/128407), [@ndixita](https://github.com/ndixita)) [SIG API Machinery, Apps, CLI, Cluster Lifecycle, Node, Release, Scheduling and Testing] +- ContainerStatus.AllocatedResources is now guarded by a separate feature gate, InPlacePodVerticalSaclingAllocatedStatus ([kubernetes/kubernetes#128377](https://github.com/kubernetes/kubernetes/pull/128377), [@tallclair](https://github.com/tallclair)) [SIG API Machinery, CLI, Node, Scheduling and Testing] +- Coordination.v1alpha1 API is dropped and replaced with coordination.v1alpha2. Old coordination.v1alpha1 types must be deleted before upgrade ([kubernetes/kubernetes#127857](https://github.com/kubernetes/kubernetes/pull/127857), [@Jefftree](https://github.com/Jefftree)) [SIG API Machinery, Etcd, Scheduling and Testing] +- DRA: Restricted the length of opaque device configuration parameters. At admission time, Kubernetes enforces a 10KiB size limit. ([kubernetes/kubernetes#128601](https://github.com/kubernetes/kubernetes/pull/128601), [@pohly](https://github.com/pohly)) [SIG API Machinery, Apps, Auth, Etcd, Node, Scheduling and Testing] +- Introduce v1alpha1 API for mutating admission policies, enabling extensible admission control via CEL expressions (KEP 3962: Mutating Admission Policies). To use, enable the `MutatingAdmissionPolicy` feature gate and the `admissionregistration.k8s.io/v1alpha1` API via `--runtime-config`. ([kubernetes/kubernetes#127134](https://github.com/kubernetes/kubernetes/pull/127134), [@jpbetz](https://github.com/jpbetz)) [SIG API Machinery, Auth, Etcd and Testing] +- NodeRestriction admission now validates the audience value that kubelet is requesting a service account token for is part of the pod spec volume. This change is introduced with a new kube-apiserver featuregate `ServiceAccountNodeAudienceRestriction` that's enabled by default. ([kubernetes/kubernetes#128077](https://github.com/kubernetes/kubernetes/pull/128077), [@aramase](https://github.com/aramase)) [SIG Auth, Storage and Testing] +- Promoted feature gate `StatefulSetAutoDeletePVC` from beta to stable. ([kubernetes/kubernetes#128247](https://github.com/kubernetes/kubernetes/pull/128247), [@mattcary](https://github.com/mattcary)) [SIG API Machinery, Apps, Auth and Testing] +- Removed restrictions on subresource flag in kubectl commands ([kubernetes/kubernetes#128296](https://github.com/kubernetes/kubernetes/pull/128296), [@AnishShah](https://github.com/AnishShah)) [SIG CLI] +- The core functionality of Dynamic Resource Allocation (DRA) got promoted to beta. No action is required when *upgrading*, the previous v1alpha3 API is still supported, so existing deployments and DRA drivers based on v1alpha3 continue to work. *Downgrading* from 1.32 to 1.31 with DRA resources in the cluster (resourceclaims, resourceclaimtemplates, deviceclasses, resourceslices) is *not* supported because the new v1beta1 is used as storage version and not readable by 1.31. ([kubernetes/kubernetes#127511](https://github.com/kubernetes/kubernetes/pull/127511), [@pohly](https://github.com/pohly)) [SIG API Machinery, Apps, Auth, Etcd, Node, Scheduling and Testing] +- DRA: scheduling pods is up to 16x faster, depending on the scenario. Scheduling throughput depends a lot on cluster utilization. It is higher for lightly loaded clusters with free resources and gets lower when the cluster utilization increases. ([kubernetes/kubernetes#127277](https://github.com/kubernetes/kubernetes/pull/127277), [@pohly](https://github.com/pohly)) [SIG API Machinery, Apps, Architecture, Auth, Etcd, Instrumentation, Node, Scheduling and Testing] +- DRA: the `DeviceRequestAllocationResult` struct now has an "AdminAccess" field which should be used instead of the corresponding field in the `DeviceRequest` field when dealing with an allocation. If a device is only allocated for admin access, allocating it again for normal usage is now supported, as originally intended. To allow admin access, starting with 1.32 the `DRAAdminAccess` feature gate must be enabled. ([kubernetes/kubernetes#127266](https://github.com/kubernetes/kubernetes/pull/127266), [@pohly](https://github.com/pohly)) [SIG API Machinery, Apps, Auth, Etcd, Network, Node, Scheduling and Testing] +- Implemented a new, alpha `seLinuxChangePolicy` field within a Pod-level `securityContext`, under SELinuxChangePolicy feature gate. This field allows for opting out from mounting Pod volumes with SELinux label when SELinuxMount feature is enabled (it is alpha and disabled by default now). + Please see [the KEP](https://github.com/kubernetes/enhancements/tree/master/keps/sig-storage/1710-selinux-relabeling#story-3-cluster-upgrade) how we expect to warn users before any SELinux behavior changes and how they can opt-out before. Note that this field and feature gate is useful only with clusters that run with SELinux enabled. No action is required on clusters without SELinux. ([kubernetes/kubernetes#127981](https://github.com/kubernetes/kubernetes/pull/127981), [@jsafrane](https://github.com/jsafrane)) [SIG API Machinery, Apps, Architecture, Node, Storage and Testing] +- Introduce v1alpha1 API for mutating admission policies, enabling extensible admission control via CEL expressions (KEP 3962: Mutating Admission Policies). To use, enable the `MutatingAdmissionPolicy` feature gate and the `admissionregistration.k8s.io/v1alpha1` API via `--runtime-config`. ([kubernetes/kubernetes#127134](https://github.com/kubernetes/kubernetes/pull/127134), [@jpbetz](https://github.com/jpbetz)) [SIG API Machinery, Auth, Etcd and Testing] +- Kube-proxy now reconciles Service/Endpoint changes with conntrack table and cleans up only stale UDP flow entries ([kubernetes/kubernetes#127318](https://github.com/kubernetes/kubernetes/pull/127318), [@aroradaman](https://github.com/aroradaman)) [SIG Network and Windows] +- Removed generally available feature gate `HPAContainerMetrics` ([kubernetes/kubernetes#126862](https://github.com/kubernetes/kubernetes/pull/126862), [@carlory](https://github.com/carlory)) [SIG API Machinery, Apps and Autoscaling] +- Added enforcement of an upper cost bound for DRA evaluations of CEL. The API server and scheduler now enforce an upper bound on the cost and runtime steps required for evaluating a CEL expression. ([kubernetes/kubernetes#128101](https://github.com/kubernetes/kubernetes/pull/128101), [@pohly](https://github.com/pohly)) [SIG API Machinery and Node] +- Annotation `batch.kubernetes.io/cronjob-scheduled-timestamp` added to Job objects scheduled from CronJobs is promoted to stable ([kubernetes/kubernetes#128336](https://github.com/kubernetes/kubernetes/pull/128336), [@soltysh](https://github.com/soltysh)) [SIG Apps] +- Apply fsGroup policy for ReadWriteOncePod volumes ([kubernetes/kubernetes#128244](https://github.com/kubernetes/kubernetes/pull/128244), [@gnufied](https://github.com/gnufied)) [SIG Storage and Testing] +- Graduate Job's ManagedBy field to Beta ([kubernetes/kubernetes#127402](https://github.com/kubernetes/kubernetes/pull/127402), [@mimowo](https://github.com/mimowo)) [SIG API Machinery, Apps and Testing] +- Kube-apiserver: Promoted the `StructuredAuthorizationConfiguration` feature gate to GA. The `--authorization-config` flag now accepts `AuthorizationConfiguration` in version `apiserver.config.k8s.io/v1` (with no changes from `apiserver.config.k8s.io/v1beta1`). ([kubernetes/kubernetes#128172](https://github.com/kubernetes/kubernetes/pull/128172), [@liggitt](https://github.com/liggitt)) [SIG API Machinery, Auth and Testing] +- Removed all support for _classic_ dynamic resource allocation (DRA). The `DRAControlPlaneController` feature gate, formerly alpha, is no longer available. Kubernetes now only uses the _structured parameters_ model (also alpha) for allocating dynamic resources to Pods. + + if and only if classic DRA was enabled in a cluster, remove all workloads (pods, app deployments, etc. ) which depend on classic DRA and make sure that all PodSchedulingContext resources are gone before upgrading. PodSchedulingContext resources cannot be removed through the apiserver after an upgrade and workloads would not work properly. ([kubernetes/kubernetes#128003](https://github.com/kubernetes/kubernetes/pull/128003), [@pohly](https://github.com/pohly)) [SIG API Machinery, Apps, Auth, Etcd, Node, Scheduling and Testing] +- Revised the Kubelet API Authorization with new subresources, that allow finer-grained authorization checks and access control for kubelet endpoints. + Provided you enable the `KubeletFineGrainedAuthz` feature gate, you can access kubelet's `/healthz` endpoint by granting the caller `nodes/helathz` permission in RBAC. + Similarly you can also access kubelet's `/pods` endpoint to fetch a list of Pods bound to that node by granting the caller `nodes/pods` permission in RBAC. + Similarly you can also access kubelet's `/configz` endpoint to fetch kubelet's configuration by granting the caller `nodes/configz` permission in RBAC. + You can still access kubelet's `/healthz`, `/pods` and `/configz` by granting the caller `nodes/proxy` permission in RBAC but that also grants the caller permissions to exec, run and attach to containers on the nodes and doing so does not follow the least privilege principle. Granting callers more permissions than they need can give attackers an opportunity to escalate privileges. ([kubernetes/kubernetes#126347](https://github.com/kubernetes/kubernetes/pull/126347), [@vinayakankugoyal](https://github.com/vinayakankugoyal)) [SIG API Machinery, Auth, Cluster Lifecycle and Node] +- Fixed a bug in the NestedNumberAsFloat64 Unstructured field accessor that could cause it to return rounded float64 values instead of errors when accessing very large int64 values. ([kubernetes/kubernetes#128099](https://github.com/kubernetes/kubernetes/pull/128099), [@benluddy](https://github.com/benluddy)) [SIG API Machinery] +- Introduce compressible resource setting on system reserved and kube reserved slices ([kubernetes/kubernetes#125982](https://github.com/kubernetes/kubernetes/pull/125982), [@harche](https://github.com/harche)) [SIG Node] +- Kubelet: the `--image-credential-provider-config` file is now loaded with strict deserialization, which fails if the config file contains duplicate or unknown fields. This protects against accidentally running with config files that are malformed, mis-indented, or have typos in field names, and getting unexpected behavior. ([kubernetes/kubernetes#128062](https://github.com/kubernetes/kubernetes/pull/128062), [@aramase](https://github.com/aramase)) [SIG Auth and Node] +- Promoted `CustomResourceFieldSelectors` to stable; the feature is enabled by default. `--feature-gates=CustomResourceFieldSelectors=true` not needed on kube-apiserver binaries and will be removed in a future release. ([kubernetes/kubernetes#127673](https://github.com/kubernetes/kubernetes/pull/127673), [@jpbetz](https://github.com/jpbetz)) [SIG API Machinery and Testing] +- **ACTION REQUIRED** for custom scheduler plugin developers: + - `PodEligibleToPreemptOthers` in the `preemption` interface gets `ctx` in the parameters. + Please change your plugins' implementation accordingly. ([kubernetes/kubernetes#126465](https://github.com/kubernetes/kubernetes/pull/126465), [@googs1025](https://github.com/googs1025)) [SIG Scheduling] + - Changed NodeToStatusMap from map to struct and exposed methods to access the entries. Added absentNodesStatus, which inform what is the status of nodes that are absent in the map. + - For developers of out-of-tree PostFilter plugins, make sure to update usage of NodeToStatusMap. Additionally, NodeToStatusMap should be eventually renamed to NodeToStatusReader. ([kubernetes/kubernetes#126022](https://github.com/kubernetes/kubernetes/pull/126022), [@macsko](https://github.com/macsko)) [SIG Node, Scheduling and Testing] +- Allow for Pod search domains to be a single dot "." or contain an underscore "_" ([kubernetes/kubernetes#127167](https://github.com/kubernetes/kubernetes/pull/127167), [@adrianmoisey](https://github.com/adrianmoisey)) [SIG Apps, Network and Testing] +- Disallow `k8s.io` and `kubernetes.io` namespaced extra key in structured authentication configuration. ([kubernetes/kubernetes#126553](https://github.com/kubernetes/kubernetes/pull/126553), [@aramase](https://github.com/aramase)) [SIG Auth] +- Fix the bug where spec.terminationGracePeriodSeconds of the pod will always be overwritten by the MaxPodGracePeriodSeconds of the soft eviction, you can enable the `AllowOverwriteTerminationGracePeriodSeconds` feature gate, which will restore the previous behavior. If you do need to set this, please file an issue with the Kubernetes project to help contributors understand why you need it. ([kubernetes/kubernetes#122890](https://github.com/kubernetes/kubernetes/pull/122890), [@HirazawaUi](https://github.com/HirazawaUi)) [SIG API Machinery, Architecture, Node and Testing] +- Kube-scheduler removed the following plugins: + - AzureDiskLimits + - CinderLimits + - EBSLimits + - GCEPDLimits + Because the corresponding CSI driver reports how many volumes a node can handle in NodeGetInfoResponse, the kubelet stores this limit in CSINode and the scheduler then knows the driver's limit on the node. + Remove plugins AzureDiskLimits, CinderLimits, EBSLimits and GCEPDLimits if you explicitly enabled them in the scheduler config. ([kubernetes/kubernetes#124003](https://github.com/kubernetes/kubernetes/pull/124003), [@carlory](https://github.com/carlory)) [SIG Scheduling, Storage and Testing] +- Promoted `CustomResourceFieldSelectors` to stable; the feature is enabled by default. `--feature-gates=CustomResourceFieldSelectors=true` not needed on kube-apiserver binaries and will be removed in a future release. ([kubernetes/kubernetes#127673](https://github.com/kubernetes/kubernetes/pull/127673), [@jpbetz](https://github.com/jpbetz)) [SIG API Machinery and Testing] +- The default value for node-monitor-grace-period has been increased to 50s (earlier 40s) (Ref - https://github.com/kubernetes/kubernetes/issues/121793) ([kubernetes/kubernetes#126287](https://github.com/kubernetes/kubernetes/pull/126287), [@devppratik](https://github.com/devppratik)) [SIG API Machinery, Apps and Node] +- The resource/v1alpha3.ResourceSliceList filed which should have been named "metadata" but was instead named "listMeta" is now properly "metadata". ([kubernetes/kubernetes#126749](https://github.com/kubernetes/kubernetes/pull/126749), [@thockin](https://github.com/thockin)) [SIG API Machinery] +- The synthetic "Bookmark" event for the watch stream requests will now include a new annotation: `kubernetes.io/initial-events-list-blueprint`. THe annotation contains an empty, versioned list that is encoded in the requested format (such as protobuf, JSON, or CBOR), then base64-encoded and stored as a string. ([kubernetes/kubernetes#127587](https://github.com/kubernetes/kubernetes/pull/127587), [@p0lyn0mial](https://github.com/p0lyn0mial)) [SIG API Machinery] +- To enhance usability and developer experience, CRD validation rules now support direct use of (CEL) reserved keywords as field names in object validation expressions. + Name format CEL library is supported in new expressions. ([kubernetes/kubernetes#126977](https://github.com/kubernetes/kubernetes/pull/126977), [@aaron-prindle](https://github.com/aaron-prindle)) [SIG API Machinery, Architecture, Auth, Etcd, Instrumentation, Release, Scheduling and Testing] +- Updated incorrect description of persistentVolumeClaimRetentionPolicy ([kubernetes/kubernetes#126545](https://github.com/kubernetes/kubernetes/pull/126545), [@yangjunmyfm192085](https://github.com/yangjunmyfm192085)) [SIG API Machinery, Apps and CLI] +- X.509 client certificate authentication to kube-apiserver now produces credential IDs (derived from the certificate's signature) for use by audit logging. ([kubernetes/kubernetes#125634](https://github.com/kubernetes/kubernetes/pull/125634), [@ahmedtd](https://github.com/ahmedtd)) [SIG API Machinery, Auth and Testing] + + +# v31.0.0 + +Kubernetes API Version: v1.31.0 + +# v31.0.0b1 + +Kubernetes API Version: v1.31.0 + +# v31.0.0a1 + +Kubernetes API Version: v1.31.0 + +### API Change +- 'ACTION REQUIRED: The Dynamic Resource Allocation (DRA) driver's DaemonSet + must be deployed with a service account that enables writing ResourceSlice + and reading ResourceClaim objects.' + ([kubernetes/kubernetes#125163](https://github.com/kubernetes/kubernetes/pull/125163), [@pohly](https://github.com/pohly)) [SIG Auth, Node and Testing] +- Add UserNamespaces field to NodeRuntimeHandlerFeatures ([kubernetes/kubernetes#126034](https://github.com/kubernetes/kubernetes/pull/126034), [@sohankunkerkar](https://github.com/sohankunkerkar)) [SIG API Machinery, Apps and Node] +- Added Coordinated Leader Election as Alpha under the `CoordinatedLeaderElection` feature gate. With the feature enabled, the control plane can use LeaseCandidate objects (coordination.k8s.io/v1alpha1 API group) to participate in a leader election and let the kube-apiserver select the best instance according to some strategy. ([kubernetes/kubernetes#124012](https://github.com/kubernetes/kubernetes/pull/124012), [@Jefftree](https://github.com/Jefftree)) [SIG API Machinery, Apps, Auth, Cloud Provider, Etcd, Node, Release, Scheduling and Testing] +- Added a `.status.features.supplementalGroupsPolicy` field to Nodes. The field is true when the feature is implemented in the CRI implementation (KEP-3619). ([kubernetes/kubernetes#125470](https://github.com/kubernetes/kubernetes/pull/125470), [@everpeace](https://github.com/everpeace)) [SIG API Machinery, Apps, Node and Testing] +- Added an `allocatedResourcesStatus` to each container status to indicate the health status of devices exposed by the device plugin. ([kubernetes/kubernetes#126243](https://github.com/kubernetes/kubernetes/pull/126243), [@SergeyKanzhelev](https://github.com/SergeyKanzhelev)) [SIG API Machinery, Apps, Node and Testing] +- Added support to the kube-proxy nodePortAddresses / --nodeport-addresses option to + accept the value "primary", meaning to only listen for NodePort connections + on the node's primary IPv4 and/or IPv6 address (according to the Node object). + This is strongly recommended, if you were not previously using + --nodeport-addresses, to avoid surprising behavior. + (This behavior is enabled by default with the nftables backend; you would + need to explicitly request `--nodeport-addresses 0.0.0.0/0,::/0` there to get + the traditional "listen on all interfaces" behavior.) ([kubernetes/kubernetes#123105](https://github.com/kubernetes/kubernetes/pull/123105), [@danwinship](https://github.com/danwinship)) [SIG API Machinery, Network and Windows] +- Added the feature gates `StrictCostEnforcementForVAP` and `StrictCostEnforcementForWebhooks` to enforce the strict cost calculation for CEL extended libraries. It is strongly recommended to turn on the feature gates as early as possible. ([kubernetes/kubernetes#124675](https://github.com/kubernetes/kubernetes/pull/124675), [@cici37](https://github.com/cici37)) [SIG API Machinery, Auth, Node and Testing] +- Changed how the API server handles updates to `.spec.defaultBackend` of Ingress objects. + Server-side apply now considers `.spec.defaultBackend` to be an atomic struct. This means that any field-owner who sets values in that struct (they are mutually exclusive) owns the whole struct. For almost all users this change has no impact; for controllers that want to change the default backend port from number to name (or vice-versa), this makes it easier. ([kubernetes/kubernetes#126207](https://github.com/kubernetes/kubernetes/pull/126207), [@thockin](https://github.com/thockin)) [SIG API Machinery] +- Component-base/logs: when compiled with Go >= 1.21, component-base will automatically configure the slog default logger together with initializing klog. ([kubernetes/kubernetes#120696](https://github.com/kubernetes/kubernetes/pull/120696), [@pohly](https://github.com/pohly)) [SIG API Machinery, Architecture, Auth, CLI, Cloud Provider, Cluster Lifecycle, Instrumentation, Network, Storage and Testing] +- CustomResourceDefinition objects created with non-empty `caBundle` fields which are invalid or do not contain any certificates will not appear in discovery or serve endpoints until a valid `caBundle` is provided. Updates to CustomResourceDefinition are no longer allowed to transition a valid `caBundle` field to an invalid `caBundle` field, because this breaks serving of the existing CustomResourceDefinition. ([kubernetes/kubernetes#124061](https://github.com/kubernetes/kubernetes/pull/124061), [@Jefftree](https://github.com/Jefftree)) [SIG API Machinery] +- Dynamic Resource Allocation (DRA): Added a feature so the number of ResourceClaim objects can be limited per namespace and by the number of devices requested through a specific class via the v1.ResourceQuota mechanism. ([kubernetes/kubernetes#120611](https://github.com/kubernetes/kubernetes/pull/120611), [@pohly](https://github.com/pohly)) [SIG API Machinery, Apps, Auth, CLI, Etcd, Node, Release, Scheduling and Testing] +- Dynamic Resource Allocation (DRA): client-side validation of a ResourceHandle would have accepted a missing DriverName, whereas server-side validation then would have raised an error. ([kubernetes/kubernetes#124075](https://github.com/kubernetes/kubernetes/pull/124075), [@pohly](https://github.com/pohly)) +- Dynamic Resource Allocation (DRA): in the `pod.spec.recourceClaims` array, the `source` indirection is no longer necessary. Instead of e.g. `source: resourceClaimTemplateName: my-template`, one can write `resourceClaimTemplateName: my-template`. ([kubernetes/kubernetes#125116](https://github.com/kubernetes/kubernetes/pull/125116), [@pohly](https://github.com/pohly)) [SIG API Machinery, Apps, Auth, Node, Scheduling and Testing] +- Enhanced the Dynamic Resource Allocation (DRA) with an updated version of the resource.k8s.io API group. The primary user-facing type remains the ResourceClaim, however significant changes have been made, resulting in the new version, v1alpha3, which is not compatible with the previous version. ([kubernetes/kubernetes#125488](https://github.com/kubernetes/kubernetes/pull/125488), [@pohly](https://github.com/pohly)) [SIG API Machinery, Apps, Auth, CLI, Cluster Lifecycle, Etcd, Node, Release, Scheduling, Storage and Testing] +- Fixed a 1.30.0 regression in OpenAPI descriptions of the `imagePullSecrets` and + `hostAliases` fields to mark the fields used as keys in those lists as either defaulted + or required. ([kubernetes/kubernetes#124553](https://github.com/kubernetes/kubernetes/pull/124553), [@pmalek](https://github.com/pmalek)) +- Fixed a 1.30.0 regression in openapi descriptions of `PodIP.IP` and `HostIP.IP` fields to mark the fields used as keys in those lists as required. ([kubernetes/kubernetes#126057](https://github.com/kubernetes/kubernetes/pull/126057), [@thockin](https://github.com/thockin)) +- Fixed a bug in the API server where empty collections of ValidatingAdmissionPolicies did not have an `items` field. ([kubernetes/kubernetes#124568](https://github.com/kubernetes/kubernetes/pull/124568), [@xyz-li](https://github.com/xyz-li)) [SIG API Machinery] +- Fixed a deep copy issue when retrieving the controller reference. ([kubernetes/kubernetes#124116](https://github.com/kubernetes/kubernetes/pull/124116), [@HiranmoyChowdhury](https://github.com/HiranmoyChowdhury)) [SIG API Machinery and Release] +- Fixed code-generator client-gen to work with `api/v1`-like package structure. ([kubernetes/kubernetes#125162](https://github.com/kubernetes/kubernetes/pull/125162), [@sttts](https://github.com/sttts)) [SIG API Machinery and Apps] +- Fixed incorrect "v1 Binding is deprecated in v1.6+" warning in kube-scheduler log. ([kubernetes/kubernetes#125540](https://github.com/kubernetes/kubernetes/pull/125540), [@pohly](https://github.com/pohly)) [SIG API Machinery] +- Fixed the comment for the Job's managedBy field. ([kubernetes/kubernetes#124793](https://github.com/kubernetes/kubernetes/pull/124793), [@mimowo](https://github.com/mimowo)) [SIG API Machinery and Apps] +- Fixed the documentation for the default value of the `procMount` entry in `securityContext` within a Pod. + The documentation was previously using the name of the internal variable `DefaultProcMount`, rather than the actual value, "Default". ([kubernetes/kubernetes#125782](https://github.com/kubernetes/kubernetes/pull/125782), [@aborrero](https://github.com/aborrero)) [SIG Apps and Node] +- Graduate PodDisruptionConditions to GA and lock ([kubernetes/kubernetes#125461](https://github.com/kubernetes/kubernetes/pull/125461), [@mimowo](https://github.com/mimowo)) [SIG Apps, Node, Scheduling and Testing] +- Graduated MatchLabelKeys/MismatchLabelKeys feature in PodAffinity/PodAntiAffinity to Beta. ([kubernetes/kubernetes#123638](https://github.com/kubernetes/kubernetes/pull/123638), [@sanposhiho](https://github.com/sanposhiho)) [SIG API Machinery, Apps, Scheduling and Testing] +- Graduated `JobPodFailurePolicy` to GA and locked it to it's default. ([kubernetes/kubernetes#125442](https://github.com/kubernetes/kubernetes/pull/125442), [@mimowo](https://github.com/mimowo)) [SIG API Machinery, Apps, Scheduling and Testing] +- Graduated the Job `successPolicy` field to beta. + + The new reason label, "SuccessPolicy" and "CompletionsReached" are added to the "jobs_finished_total" metric. + Additionally, if you enable the `JobSuccessPolicy` feature gate, the Job gets "CompletionsReached" reason for the "SuccessCriteriaMet" and "Complete" condition type + when the number of succeeded Job Pods (`.status.succeeded`) reached the desired completions (`.spec.completions`). ([kubernetes/kubernetes#126067](https://github.com/kubernetes/kubernetes/pull/126067), [@tenzen-y](https://github.com/tenzen-y)) [SIG API Machinery, Apps and Testing] +- Graduated the `DisableNodeKubeProxyVersion` feature gate to beta. By default, the kubelet no longer attempts to set the `.status.kubeProxyVersion` field for its associated Node. ([kubernetes/kubernetes#123845](https://github.com/kubernetes/kubernetes/pull/123845), [@HirazawaUi](https://github.com/HirazawaUi)) [SIG API Machinery, Cloud Provider, Network, Node and Testing] +- Improved scheduling performance when many nodes, and prefilter returned 1-2 nodes (e.g. daemonset) + + For developers of out-of-tree PostFilter plugins, note that the semantics of NodeToStatusMap are changing: A node with an absent value in the NodeToStatusMap should be interpreted as having an UnschedulableAndUnresolvable status. ([kubernetes/kubernetes#125197](https://github.com/kubernetes/kubernetes/pull/125197), [@gabesaba](https://github.com/gabesaba)) +- Introduced a new boolean kubelet flag `--fail-cgroupv1`. ([kubernetes/kubernetes#126031](https://github.com/kubernetes/kubernetes/pull/126031), [@harche](https://github.com/harche)) [SIG API Machinery and Node] +- K8s.io/apimachinery/pkg/util/runtime: Added support for new calls to handle panics and errors in the context where they occur. `PanicHandlers` and `ErrorHandlers` now must accept a context parameter for that. Log output is structured instead of unstructured. ([kubernetes/kubernetes#121970](https://github.com/kubernetes/kubernetes/pull/121970), [@pohly](https://github.com/pohly)) [SIG API Machinery and Instrumentation] +- KEP-1880: Users of the new feature to add multiple service CIDR will use by default a dual-write strategy on the new ClusterIP allocators to avoid the problem of possible duplicate IPs allocated to Services when running skewed kube-apiservers using different allocators. They can opt-out of this behavior by enabled the feature gate DisableAllocatorDualWrite. ([kubernetes/kubernetes#122047](https://github.com/kubernetes/kubernetes/pull/122047), [@aojea](https://github.com/aojea)) [SIG API Machinery, Apps, Instrumentation and Testing] +- Kube-apiserver: Added Alpha features to allow API server authz to check the context of requests: + - The `AuthorizeWithSelectors` feature gate enables including field and label selector information from requests in webhook authorization calls. + - The `AuthorizeNodeWithSelectors` feature gate changes node authorizer behavior to limit requests from node API clients, so that each Node can only get / list / watch its own Node API object, and can also only get / list / watch Pod API objects bound to that node. Clients using kubelet credentials to read other nodes or unrelated pods must change their authentication credentials (recommended), adjust their usage, or obtain broader read access independent of the node authorizer. ([kubernetes/kubernetes#125571](https://github.com/kubernetes/kubernetes/pull/125571), [@liggitt](https://github.com/liggitt)) [SIG API Machinery, Auth, Node, Scheduling and Testing] +- Kube-apiserver: ControllerRevision objects are now verified to contain valid JSON data in the `data` field. ([kubernetes/kubernetes#125549](https://github.com/kubernetes/kubernetes/pull/125549), [@liggitt](https://github.com/liggitt)) [SIG API Machinery and Apps] +- Kube-apiserver: the `--encryption-provider-config` file is now loaded with strict deserialization, which fails if the config file contains duplicate or unknown fields. This protects against accidentally running with config files that are malformed, mis-indented, or have typos in field names, and getting unexpected behavior. When `--encryption-provider-config-automatic-reload` is used, new encryption config files that contain typos after the kube-apiserver is running are treated as invalid and the last valid config is used. ([kubernetes/kubernetes#124912](https://github.com/kubernetes/kubernetes/pull/124912), [@enj](https://github.com/enj)) [SIG API Machinery and Auth] +- Kube-controller-manager: the `horizontal-pod-autoscaler-upscale-delay` and `horizontal-pod-autoscaler-downscale-delay` flags have been removed (deprecated and non-functional since v1.12). ([kubernetes/kubernetes#124948](https://github.com/kubernetes/kubernetes/pull/124948), [@SataQiu](https://github.com/SataQiu)) [SIG API Machinery, Apps and Autoscaling] +- Made kube-proxy Windows service control manager integration (`--windows-service`) configurable in v1alpha1 component configuration via `windowsRunAsService` field. ([kubernetes/kubernetes#126072](https://github.com/kubernetes/kubernetes/pull/126072), [@aroradaman](https://github.com/aroradaman)) [SIG Network and Scalability] +- PersistentVolumeLastPhaseTransitionTime feature is stable and enabled by default. ([kubernetes/kubernetes#124969](https://github.com/kubernetes/kubernetes/pull/124969), [@RomanBednar](https://github.com/RomanBednar)) [SIG API Machinery, Apps, Storage and Testing] +- Promoted `LocalStorageCapacityIsolation` to beta; the behaviour is enabled by default. Within the kubelet, storage capacity isolation is active if the feature gate is enabled and the specific Pod is using a user namespace. ([kubernetes/kubernetes#126014](https://github.com/kubernetes/kubernetes/pull/126014), [@PannagaRao](https://github.com/PannagaRao)) [SIG Apps, Autoscaling, Node, Storage and Testing] +- Promoted `StatefulSetStartOrdinal` to stable. This means `--feature-gates=StatefulSetStartOrdinal=true` are not needed on kube-apiserver and kube-controller-manager binaries and they'll be removed soon following policy at https://kubernetes.io/docs/reference/using-api/deprecation-policy/#deprecation. ([kubernetes/kubernetes#125374](https://github.com/kubernetes/kubernetes/pull/125374), [@pwschuurman](https://github.com/pwschuurman)) [SIG API Machinery, Apps and Testing] +- Promoted feature-gate `VolumeAttributesClass` to beta (disabled by default). Users need to enable the feature gate and the `storage.k8s.io/v1beta1` API group to use this feature. + Promoted the VolumeAttributesClass API to beta. ([kubernetes/kubernetes#126145](https://github.com/kubernetes/kubernetes/pull/126145), [@carlory](https://github.com/carlory)) [SIG API Machinery, Apps, CLI, Etcd, Storage and Testing] +- Removed deprecated command flags --volume-host-cidr-denylist + and --volume-host-allow-local-loopback from kube-controller-manager. + ([kubernetes/kubernetes#124017](https://github.com/kubernetes/kubernetes/pull/124017), [@carlory](https://github.com/carlory)) [SIG API Machinery, Apps, Cloud Provider and Storage] +- Removed feature gate `CustomResourceValidationExpressions`. ([kubernetes/kubernetes#126136](https://github.com/kubernetes/kubernetes/pull/126136), [@cici37](https://github.com/cici37)) [SIG API Machinery, Cloud Provider and Testing] +- Reverted a [change](https://github.com/kubernetes/kubernetes/pull/123513) where `ConsistentListFromCache` was moved to beta and enabled by default. ([kubernetes/kubernetes#126139](https://github.com/kubernetes/kubernetes/pull/126139), [@enj](https://github.com/enj)) +- Revised the Pod API with Alpha support for volumes derived from OCI artifacts. This feature is behind the `ImageVolume` feature gate. ([kubernetes/kubernetes#125660](https://github.com/kubernetes/kubernetes/pull/125660), [@saschagrunert](https://github.com/saschagrunert)) [SIG API Machinery, Apps and Node] +- Supported fine-grained supplemental groups policy (KEP-3619), which enabled + fine-grained control for supplementary groups in the first container processes. + This allows you to choose whether to include groups defined in the container image (/etc/groups) + for the container's primary UID or not. ([kubernetes/kubernetes#117842](https://github.com/kubernetes/kubernetes/pull/117842), [@everpeace](https://github.com/everpeace)) [SIG API Machinery, Apps and Node] +- The (alpha) nftables mode of kube-proxy now requires version 1.0.1 or later + of the nft command-line, and kernel 5.13 or later. (For testing/development + purposes, you can use older kernels, as far back as 5.4, if you set the + `nftables.skipKernelVersionCheck` option in the kube-proxy config, but this is not + recommended in production since it may cause problems with other nftables + users on the system.) ([kubernetes/kubernetes#124152](https://github.com/kubernetes/kubernetes/pull/124152), [@danwinship](https://github.com/danwinship)) [SIG Network] +- To enhance usability and developer experience, CRD validation rules now support direct use of (CEL) reserved keywords as field names in object validation expressions for existing expressions in storage, will fully support runtime in next release for compatibility concern. ([kubernetes/kubernetes#126188](https://github.com/kubernetes/kubernetes/pull/126188), [@cici37](https://github.com/cici37)) [SIG API Machinery and Testing] +- Updated the feature MultiCIDRServiceAllocator to beta (disabled by default). Users need to enable the feature gate and the networking v1beta1 group to be able to use this new feature, that allows to dynamically reconfigure Service CIDR ranges. ([kubernetes/kubernetes#125021](https://github.com/kubernetes/kubernetes/pull/125021), [@aojea](https://github.com/aojea)) [SIG API Machinery, Apps, CLI, Etcd, Instrumentation, Network and Testing] +- Use omitempty for optional Job Pod Failure Policy fields. ([kubernetes/kubernetes#126046](https://github.com/kubernetes/kubernetes/pull/126046), [@mimowo](https://github.com/mimowo)) +- User can choose a different static policy option `SpreadPhysicalCPUsPreferredOption` to spread cpus across physical cpus for some specific applications ([kubernetes/kubernetes#123733](https://github.com/kubernetes/kubernetes/pull/123733), [@Jeffwan](https://github.com/Jeffwan)) [SIG Node] +- When the featuregate AnonymousAuthConfigurableEndpoints is enabled users can update the AuthenticationConfig file with endpoints for with anonymous requests are alllowed. ([kubernetes/kubernetes#124917](https://github.com/kubernetes/kubernetes/pull/124917), [@vinayakankugoyal](https://github.com/vinayakankugoyal)) [SIG API Machinery, Auth, Cloud Provider, Node and Testing] +- Move ConsistentListFromCache feature flag to Beta and enable it by default ([kubernetes/kubernetes#126469](https://github.com/kubernetes/kubernetes/pull/126469), [@serathius](https://github.com/serathius)) [SIG API Machinery] +- Add Coordinated Leader Election as alpha under the CoordinatedLeaderElection feature gate. With the feature enabled, the control plane can use LeaseCandidate objects (coordination.k8s.io/v1alpha1 API group) to participate in a leader election and let the kube-apiserver select the best instance according to some strategy. ([kubernetes/kubernetes#124012](https://github.com/kubernetes/kubernetes/pull/124012), [@Jefftree](https://github.com/Jefftree)) [SIG API Machinery, Apps, Auth, Cloud Provider, Etcd, Node, Release, Scheduling and Testing] +- Add an AllocatedResourcesStatus to each container status to indicate the health status of devices exposed by the device plugin. ([kubernetes/kubernetes#126243](https://github.com/kubernetes/kubernetes/pull/126243), [@SergeyKanzhelev](https://github.com/SergeyKanzhelev)) [SIG API Machinery, Apps, Node and Testing] +- Added Node.Status.Features.SupplementalGroupsPolicy field which is set to true when the feature is implemented in the CRI implementation (KEP-3619) ([kubernetes/kubernetes#125470](https://github.com/kubernetes/kubernetes/pull/125470), [@everpeace](https://github.com/everpeace)) [SIG API Machinery, Apps, Node and Testing] +- CustomResourceDefinition objects created with non-empty `caBundle` fields which are invalid or do not contain any certificates will not appear in discovery or serve endpoints until a valid `caBundle` is provided. Updates to CustomResourceDefinition are no longer allowed to transition a valid `caBundle` field to an invalid `caBundle` field. ([kubernetes/kubernetes#124061](https://github.com/kubernetes/kubernetes/pull/124061), [@Jefftree](https://github.com/Jefftree)) [SIG API Machinery] +- DRA: The DRA driver's daemonset must be deployed with a service account that enables writing ResourceSlice and reading ResourceClaim objects. ([kubernetes/kubernetes#125163](https://github.com/kubernetes/kubernetes/pull/125163), [@pohly](https://github.com/pohly)) [SIG Auth, Node and Testing] +- DRA: new API and several new features ([kubernetes/kubernetes#125488](https://github.com/kubernetes/kubernetes/pull/125488), [@pohly](https://github.com/pohly)) [SIG API Machinery, Apps, Auth, CLI, Cluster Lifecycle, Etcd, Node, Release, Scheduling, Storage and Testing] +- DRA: the number of ResourceClaim objects can be limited per namespace and by the number of devices requested through a specific class via the v1.ResourceQuota mechanism. ([kubernetes/kubernetes#120611](https://github.com/kubernetes/kubernetes/pull/120611), [@pohly](https://github.com/pohly)) [SIG API Machinery, Apps, Auth, CLI, Etcd, Node, Release, Scheduling and Testing] +- Fix the documentation for the default value of the procMount entry in the pod securityContext. + The documentation was previously using the name of the internal variable 'DefaultProcMount' rather than the actual value 'Default'. ([kubernetes/kubernetes#125782](https://github.com/kubernetes/kubernetes/pull/125782), [@aborrero](https://github.com/aborrero)) [SIG Apps and Node] +- Fixed a bug in the API server where empty collections of ValidatingAdmissionPolicies did not have an `items` field. ([kubernetes/kubernetes#124568](https://github.com/kubernetes/kubernetes/pull/124568), [@xyz-li](https://github.com/xyz-li)) [SIG API Machinery] +- Graduate the Job SuccessPolicy to Beta. + + The new reason label, "SuccessPolicy" and "CompletionsReached" are added to the "jobs_finished_total" metric. + Additionally, If we enable the "JobSuccessPolicy" feature gate, the Job gets "CompletionsReached" reason for the "SuccessCriteriaMet" and "Complete" condition type + when the number of succeeded Job Pods (".status.succeeded") reached the desired completions (".spec.completions"). ([kubernetes/kubernetes#126067](https://github.com/kubernetes/kubernetes/pull/126067), [@tenzen-y](https://github.com/tenzen-y)) [SIG API Machinery, Apps and Testing] +- Introduce a new boolean kubelet flag --fail-cgroupv1 ([kubernetes/kubernetes#126031](https://github.com/kubernetes/kubernetes/pull/126031), [@harche](https://github.com/harche)) [SIG API Machinery and Node] +- Kube-apiserver: adds an alpha AuthorizeWithSelectors feature that includes field and label selector information from requests in webhook authorization calls; adds an alpha AuthorizeNodeWithSelectors feature that makes the node authorizer limit requests from node API clients to get / list / watch its own Node API object, and to get / list / watch its own Pod API objects. Clients using kubelet credentials to read other nodes or unrelated pods must change their authentication credentials (recommended), adjust their usage, or grant broader read access independent of the node authorizer. ([kubernetes/kubernetes#125571](https://github.com/kubernetes/kubernetes/pull/125571), [@liggitt](https://github.com/liggitt)) [SIG API Machinery, Auth, Node, Scheduling and Testing] +- Kube-proxy Windows service control manager integration(--windows-service) is now configurable in v1alpha1 component configuration via `WindowsRunAsService` field ([kubernetes/kubernetes#126072](https://github.com/kubernetes/kubernetes/pull/126072), [@aroradaman](https://github.com/aroradaman)) [SIG Network and Scalability] +- Promote LocalStorageCapacityIsolation to beta and enable if user namespace is enabled for the pod ([kubernetes/kubernetes#126014](https://github.com/kubernetes/kubernetes/pull/126014), [@PannagaRao](https://github.com/PannagaRao)) [SIG Apps, Autoscaling, Node, Storage and Testing] +- Promote StatefulSetStartOrdinal to stable. This means `--feature-gates=StatefulSetStartOrdinal=true` are not needed on kube-apiserver and kube-controller-manager binaries and they'll be removed soon following policy at https://kubernetes.io/docs/reference/using-api/deprecation-policy/#deprecation ([kubernetes/kubernetes#125374](https://github.com/kubernetes/kubernetes/pull/125374), [@pwschuurman](https://github.com/pwschuurman)) [SIG API Machinery, Apps and Testing] +- Promoted feature-gate `VolumeAttributesClass` to beta (disabled by default). Users need to enable the feature gate and the storage v1beta1 group to use this new feature. + - Promoted API `VolumeAttributesClass` and `VolumeAttributesClassList` to `storage.k8s.io/v1beta1`. ([kubernetes/kubernetes#126145](https://github.com/kubernetes/kubernetes/pull/126145), [@carlory](https://github.com/carlory)) [SIG API Machinery, Apps, CLI, Etcd, Storage and Testing] +- Removed feature gate `CustomResourceValidationExpressions`. ([kubernetes/kubernetes#126136](https://github.com/kubernetes/kubernetes/pull/126136), [@cici37](https://github.com/cici37)) [SIG API Machinery, Cloud Provider and Testing] +- Revert "Move ConsistentListFromCache feature flag to Beta and enable it by default" ([kubernetes/kubernetes#126139](https://github.com/kubernetes/kubernetes/pull/126139), [@enj](https://github.com/enj)) [SIG API Machinery] +- Revised the Pod API with alpha support for volumes derived from OCI artefacts. + This feature is behind the `ImageVolume` feature gate. ([kubernetes/kubernetes#125660](https://github.com/kubernetes/kubernetes/pull/125660), [@saschagrunert](https://github.com/saschagrunert)) [SIG API Machinery, Apps and Node] +- The Ingress.spec.defaultBackend is now considered an atomic struct for the purposes of server-side-apply. This means that any field-owner who sets values in that struct (they are mutually exclusive) owns the whole struct. For almost all users this change has no impact. For controllers which want to change port from number to name (or vice-versa), this makes it easier. ([kubernetes/kubernetes#126207](https://github.com/kubernetes/kubernetes/pull/126207), [@thockin](https://github.com/thockin)) [SIG API Machinery] +- To enhance usability and developer experience, CRD validation rules now support direct use of (CEL) reserved keywords as field names in object validation expressions for existing expressions in storage, will fully support runtime in next release for compatibility concern. ([kubernetes/kubernetes#126188](https://github.com/kubernetes/kubernetes/pull/126188), [@cici37](https://github.com/cici37)) [SIG API Machinery and Testing] +- Add UserNamespaces field to NodeRuntimeHandlerFeatures ([kubernetes/kubernetes#126034](https://github.com/kubernetes/kubernetes/pull/126034), [@sohankunkerkar](https://github.com/sohankunkerkar)) [SIG API Machinery, Apps and Node] +- Fixes a 1.30.0 regression in openapi descriptions of PodIP.IP and HostIP.IP fields to mark the fields used as keys in those lists as required. ([kubernetes/kubernetes#126057](https://github.com/kubernetes/kubernetes/pull/126057), [@thockin](https://github.com/thockin)) [SIG API Machinery] +- Graduate JobPodFailurePolicy to GA and lock ([kubernetes/kubernetes#125442](https://github.com/kubernetes/kubernetes/pull/125442), [@mimowo](https://github.com/mimowo)) [SIG API Machinery, Apps, Scheduling and Testing] +- Graduate PodDisruptionConditions to GA and lock ([kubernetes/kubernetes#125461](https://github.com/kubernetes/kubernetes/pull/125461), [@mimowo](https://github.com/mimowo)) [SIG Apps, Node, Scheduling and Testing] +- PersistentVolumeLastPhaseTransitionTime feature is stable and enabled by default. ([kubernetes/kubernetes#124969](https://github.com/kubernetes/kubernetes/pull/124969), [@RomanBednar](https://github.com/RomanBednar)) [SIG API Machinery, Apps, Storage and Testing] +- The (alpha) nftables mode of kube-proxy now requires version 1.0.1 or later + of the nft command-line, and kernel 5.13 or later. (For testing/development + purposes, you can use older kernels, as far back as 5.4, if you set the + `nftables.skipKernelVersionCheck` option in the kube-proxy config, but this is not + recommended in production since it may cause problems with other nftables + users on the system.) ([kubernetes/kubernetes#124152](https://github.com/kubernetes/kubernetes/pull/124152), [@danwinship](https://github.com/danwinship)) [SIG Network] +- Use omitempty for optional Job Pod Failure Policy fields ([kubernetes/kubernetes#126046](https://github.com/kubernetes/kubernetes/pull/126046), [@mimowo](https://github.com/mimowo)) [SIG Apps] +- User can choose a different static policy option `SpreadPhysicalCPUsPreferredOption` to spread cpus across physical cpus for some specific applications ([kubernetes/kubernetes#123733](https://github.com/kubernetes/kubernetes/pull/123733), [@Jeffwan](https://github.com/Jeffwan)) [SIG Node] +- DRA: in the `pod.spec.recourceClaims` array, the `source` indirection is no longer necessary. Instead of e.g. `source: resourceClaimTemplateName: my-template`, one can write `resourceClaimTemplateName: my-template`. ([kubernetes/kubernetes#125116](https://github.com/kubernetes/kubernetes/pull/125116), [@pohly](https://github.com/pohly)) [SIG API Machinery, Apps, Auth, Node, Scheduling and Testing] +- Fix code-generator client-gen to work with `api/v1`-like package structure. ([kubernetes/kubernetes#125162](https://github.com/kubernetes/kubernetes/pull/125162), [@sttts](https://github.com/sttts)) [SIG API Machinery and Apps] +- KEP-1880: Users of the new feature to add multiple service CIDR will use by default a dual-write strategy on the new ClusterIP allocators to avoid the problem of possible duplicate IPs allocated to Services when running skewed kube-apiservers using different allocators. They can opt-out of this behavior by enabled the feature gate DisableAllocatorDualWrite ([kubernetes/kubernetes#122047](https://github.com/kubernetes/kubernetes/pull/122047), [@aojea](https://github.com/aojea)) [SIG API Machinery, Apps, Instrumentation and Testing] +- Kube-apiserver: ControllerRevision objects are now verified to contain valid JSON data in the `data` field. ([kubernetes/kubernetes#125549](https://github.com/kubernetes/kubernetes/pull/125549), [@liggitt](https://github.com/liggitt)) [SIG API Machinery and Apps] +- Update the feature MultiCIDRServiceAllocator to beta (disabled by default). Users need to enable the feature gate and the networking v1beta1 group to be able to use this new feature, that allows to dynamically reconfigure Service CIDR ranges. ([kubernetes/kubernetes#125021](https://github.com/kubernetes/kubernetes/pull/125021), [@aojea](https://github.com/aojea)) [SIG API Machinery, Apps, CLI, Etcd, Instrumentation, Network and Testing] +- When the featuregate AnonymousAuthConfigurableEndpoints is enabled users can update the AuthenticationConfig file with endpoints for with anonymous requests are alllowed. ([kubernetes/kubernetes#124917](https://github.com/kubernetes/kubernetes/pull/124917), [@vinayakankugoyal](https://github.com/vinayakankugoyal)) [SIG API Machinery, Auth, Cloud Provider, Node and Testing] +- Fixed incorrect "v1 Binding is deprecated in v1.6+" warning in kube-scheduler log. ([kubernetes/kubernetes#125540](https://github.com/kubernetes/kubernetes/pull/125540), [@pohly](https://github.com/pohly)) [SIG API Machinery] +- Added the feature gates `StrictCostEnforcementForVAP` and `StrictCostEnforcementForWebhooks` to enforce the strct cost calculation for CEL extended libraries. It is strongly recommended to turn on the feature gates as early as possible. ([kubernetes/kubernetes#124675](https://github.com/kubernetes/kubernetes/pull/124675), [@cici37](https://github.com/cici37)) [SIG API Machinery, Auth, Node and Testing] +- Component-base/logs: when compiled with Go >= 1.21, component-base will automatically configure the slog default logger together with initializing klog. ([kubernetes/kubernetes#120696](https://github.com/kubernetes/kubernetes/pull/120696), [@pohly](https://github.com/pohly)) [SIG API Machinery, Architecture, Auth, CLI, Cloud Provider, Cluster Lifecycle, Instrumentation, Network, Storage and Testing] +- DRA: client-side validation of a ResourceHandle would have accepted a missing DriverName, whereas server-side validation then would have raised an error. ([kubernetes/kubernetes#124075](https://github.com/kubernetes/kubernetes/pull/124075), [@pohly](https://github.com/pohly)) [SIG Apps] +- Fix Deep Copy issue in getting controller reference ([kubernetes/kubernetes#124116](https://github.com/kubernetes/kubernetes/pull/124116), [@HiranmoyChowdhury](https://github.com/HiranmoyChowdhury)) [SIG API Machinery and Release] +- Fix the comment for the Job's managedBy field ([kubernetes/kubernetes#124793](https://github.com/kubernetes/kubernetes/pull/124793), [@mimowo](https://github.com/mimowo)) [SIG API Machinery and Apps] +- Fixes a 1.30.0 regression in openapi descriptions of imagePullSecrets and hostAliases fields to mark the fields used as keys in those lists as either defaulted or required. ([kubernetes/kubernetes#124553](https://github.com/kubernetes/kubernetes/pull/124553), [@pmalek](https://github.com/pmalek)) [SIG API Machinery] +- Graduate MatchLabelKeys/MismatchLabelKeys feature in PodAffinity/PodAntiAffinity to Beta ([kubernetes/kubernetes#123638](https://github.com/kubernetes/kubernetes/pull/123638), [@sanposhiho](https://github.com/sanposhiho)) [SIG API Machinery, Apps, Scheduling and Testing] +- Graduated the `DisableNodeKubeProxyVersion` feature gate to beta. By default, the kubelet no longer attempts to set the `.status.kubeProxyVersion` field for its associated Node. ([kubernetes/kubernetes#123845](https://github.com/kubernetes/kubernetes/pull/123845), [@HirazawaUi](https://github.com/HirazawaUi)) [SIG API Machinery, Cloud Provider, Network, Node and Testing] +- Improved scheduling performance when many nodes, and prefilter returns 1-2 nodes (e.g. daemonset) + + For developers of out-of-tree PostFilter plugins, note that the semantics of NodeToStatusMap are changing: A node with an absent value in the NodeToStatusMap should be interpreted as having an UnschedulableAndUnresolvable status ([kubernetes/kubernetes#125197](https://github.com/kubernetes/kubernetes/pull/125197), [@gabesaba](https://github.com/gabesaba)) [SIG Scheduling] +- K8s.io/apimachinery/pkg/util/runtime: new calls support handling panics and errors in the context where they occur. `PanicHandlers` and `ErrorHandlers` now must accept a context parameter for that. Log output is structured instead of unstructured. ([kubernetes/kubernetes#121970](https://github.com/kubernetes/kubernetes/pull/121970), [@pohly](https://github.com/pohly)) [SIG API Machinery and Instrumentation] +- Kube-apiserver: the `--encryption-provider-config` file is now loaded with strict deserialization, which fails if the config file contains duplicate or unknown fields. This protects against accidentally running with config files that are malformed, mis-indented, or have typos in field names, and getting unexpected behavior. When `--encryption-provider-config-automatic-reload` is used, new encryption config files that contain typos after the kube-apiserver is running are treated as invalid and the last valid config is used. ([kubernetes/kubernetes#124912](https://github.com/kubernetes/kubernetes/pull/124912), [@enj](https://github.com/enj)) [SIG API Machinery and Auth] +- Kube-controller-manager removes deprecated command flags: --volume-host-cidr-denylist and --volume-host-allow-local-loopback ([kubernetes/kubernetes#124017](https://github.com/kubernetes/kubernetes/pull/124017), [@carlory](https://github.com/carlory)) [SIG API Machinery, Apps, Cloud Provider and Storage] +- Kube-controller-manager: the `horizontal-pod-autoscaler-upscale-delay` and `horizontal-pod-autoscaler-downscale-delay` flags have been removed (deprecated and non-functional since v1.12) ([kubernetes/kubernetes#124948](https://github.com/kubernetes/kubernetes/pull/124948), [@SataQiu](https://github.com/SataQiu)) [SIG API Machinery, Apps and Autoscaling] +- Support fine-grained supplemental groups policy (KEP-3619), which enables fine-grained control for supplementary groups in the first container processes. You can choose whether to include groups defined in the container image(/etc/groups) for the container's primary uid or not. ([kubernetes/kubernetes#117842](https://github.com/kubernetes/kubernetes/pull/117842), [@everpeace](https://github.com/everpeace)) [SIG API Machinery, Apps and Node] +- The kube-proxy nodeportAddresses / --nodeport-addresses option now + accepts the value "primary", meaning to only listen for NodePort connections + on the node's primary IPv4 and/or IPv6 address (according to the Node object). + This is strongly recommended, if you were not previously using + --nodeport-addresses, to avoid surprising behavior. + + (This behavior is enabled by default with the nftables backend; you would + need to explicitly request `--nodeport-addresses 0.0.0.0/0,::/0` there to get + the traditional "listen on all interfaces" behavior.) ([kubernetes/kubernetes#123105](https://github.com/kubernetes/kubernetes/pull/123105), [@danwinship](https://github.com/danwinship)) [SIG API Machinery, Network and Windows] + + # v30.1.0 Kubernetes API Version: v1.30.1 +**New Feature:** +- Add utility functions to parse and format [GEP-2257] Duration strings for Gateway API + +[GEP-2257]: https://gateway-api.sigs.k8s.io/geps/gep-2257/ # v30.1.0b1 @@ -38,7 +998,7 @@ Kubernetes API Version: v1.30.1 - The `StorageVersionMigration` API, previously available as a Custom Resource Definition (CRD), is now a built-in API in Kubernetes. ([kubernetes/kubernetes#123344](https://github.com/kubernetes/kubernetes/pull/123344), [@nilekhc](https://github.com/nilekhc)) - When configuring a JWT authenticator: - + If `username.expression` used 'claims.email', then 'claims.email_verified' must have been used in `username.expression` or `extra[*].valueExpression` or `claimValidationRules[*].expression`. An example claim validation rule expression that matches the validation automatically applied when `username.claim` is set to 'email' is 'claims.?email_verified.orValue(true)'. ([kubernetes/kubernetes#123737](https://github.com/kubernetes/kubernetes/pull/123737), [@enj](https://github.com/enj)) - `readOnly` volumes now support recursive read-only mounts for kernel versions >= 5.12." @@ -132,8 +1092,8 @@ Kubernetes API Version: v1.30.1 - OIDC authentication will now fail if the username asserted based on a CEL expression config is the empty string. Previously the request would be authenticated with the username set to the empty string. ([kubernetes/kubernetes#123568](https://github.com/kubernetes/kubernetes/pull/123568), [@enj](https://github.com/enj)) [SIG API Machinery, Auth and Testing] - PodSpec API: remove note that hostAliases are not supported on hostNetwork Pods. The feature has been supported since v1.8. ([kubernetes/kubernetes#122422](https://github.com/kubernetes/kubernetes/pull/122422), [@neolit123](https://github.com/neolit123)) [SIG API Machinery and Apps] - Promote AdmissionWebhookMatchConditions to GA. The feature is now stable and the feature gate is now locked to default. ([kubernetes/kubernetes#123560](https://github.com/kubernetes/kubernetes/pull/123560), [@ivelichkovich](https://github.com/ivelichkovich)) [SIG API Machinery and Testing] -- Structured Authentication Configuration now supports `DiscoveryURL`. - discoveryURL if specified, overrides the URL used to fetch discovery information. +- Structured Authentication Configuration now supports `DiscoveryURL`. + discoveryURL if specified, overrides the URL used to fetch discovery information. This is for scenarios where the well-known and jwks endpoints are hosted at a different location than the issuer (such as locally in the cluster). ([kubernetes/kubernetes#123527](https://github.com/kubernetes/kubernetes/pull/123527), [@aramase](https://github.com/aramase)) [SIG API Machinery, Auth and Testing] - Support Recursive Read-only (RRO) mounts (KEP-3857) ([kubernetes/kubernetes#123180](https://github.com/kubernetes/kubernetes/pull/123180), [@AkihiroSuda](https://github.com/AkihiroSuda)) [SIG API Machinery, Apps, Node and Testing] @@ -142,14 +1102,14 @@ Kubernetes API Version: v1.30.1 - The kubernetes repo now uses Go workspaces. This should not impact end users at all, but does have impact for developers of downstream projects. Switching to workspaces caused some breaking changes in the flags to the various k8s.io/code-generator tools. Downstream consumers should look at staging/src/k8s.io/code-generator/kube_codegen.sh to see the changes. ([kubernetes/kubernetes#123529](https://github.com/kubernetes/kubernetes/pull/123529), [@thockin](https://github.com/thockin)) [SIG API Machinery, Apps, Architecture, Auth, CLI, Cloud Provider, Cluster Lifecycle, Instrumentation, Network, Node, Release, Storage and Testing] - ValidatingAdmissionPolicy is promoted to GA and will be enabled by default. ([kubernetes/kubernetes#123405](https://github.com/kubernetes/kubernetes/pull/123405), [@cici37](https://github.com/cici37)) [SIG API Machinery, Apps, Auth and Testing] - When configuring a JWT authenticator: - + If username.expression uses 'claims.email', then 'claims.email_verified' must be used in username.expression or extra[*].valueExpression or claimValidationRules[*].expression. An example claim validation rule expression that matches the validation automatically applied when username.claim is set to 'email' is 'claims.?email_verified.orValue(true)'. ([kubernetes/kubernetes#123737](https://github.com/kubernetes/kubernetes/pull/123737), [@enj](https://github.com/enj)) [SIG API Machinery and Auth] - Added a CBOR implementation of `runtime.Serializer`. Until CBOR graduates to Alpha, API servers will refuse to start if configured with CBOR support. ([kubernetes/kubernetes#122881](https://github.com/kubernetes/kubernetes/pull/122881), [@benluddy](https://github.com/benluddy)) [SIG API Machinery] - Added audienceMatchPolicy field to AuthenticationConfiguration and support for configuring multiple audiences. - + - The "audienceMatchPolicy" can be empty (or unset) when a single audience is specified in the "audiences" field. - The "audienceMatchPolicy" must be set to "MatchAny" when multiple audiences are specified in the "audiences" field. ([kubernetes/kubernetes#123165](https://github.com/kubernetes/kubernetes/pull/123165), [@aramase](https://github.com/aramase)) [SIG API Machinery, Auth and Testing] - Contextual logging is now beta and enabled by default. ([kubernetes/kubernetes#122589](https://github.com/kubernetes/kubernetes/pull/122589), [@pohly](https://github.com/pohly)) [SIG Instrumentation] @@ -238,19 +1198,19 @@ Kubernetes API Version: v1.29.0 - `ValidatingAdmissionPolicy` type checking now supports CRDs and API extensions types. ([kubernetes/kubernetes#119109](https://github.com/kubernetes/kubernetes/pull/119109), [@jiahuif](https://github.com/jiahuif)) - `kube-apiserver`: added `--authorization-config` flag for reading a configuration file containing an `apiserver.config.k8s.io/v1alpha1 AuthorizationConfiguration` object. The `--authorization-config` flag is mutually exclusive with `--authorization-modes` and `--authorization-webhook-*` flags. The `alpha` `StructuredAuthorizationConfiguration` feature flag must be enabled for `--authorization-config` to be specified. ([kubernetes/kubernetes#120154](https://github.com/kubernetes/kubernetes/pull/120154), [@palnabarun](https://github.com/palnabarun)) - `kube-proxy` now has a new nftables-based mode, available by running - + `kube-proxy --feature-gates NFTablesProxyMode=true --proxy-mode nftables` - + This is currently an alpha-level feature and while it probably will not eat your data, it may nibble at it a bit. (It passes e2e testing but has not yet seen real-world use.) - + At this point it should be functionally mostly identical to the iptables mode, except that it does not (and will not) support Service NodePorts on 127.0.0.1. (Also note that there are currently no command-line arguments for the nftables-specific config; you will need to use a config file if you want to set the equivalent of any of the `--iptables-xxx` options.) - + As this code is still very new, it has not been heavily optimized yet; while it is expected to _eventually_ have better performance than the iptables backend, very little performance testing has been done so far. ([kubernetes/kubernetes#121046](https://github.com/kubernetes/kubernetes/pull/121046), [@danwinship](https://github.com/danwinship)) @@ -275,19 +1235,19 @@ Kubernetes API Version: v1.29.0 - Graduate Job BackoffLimitPerIndex feature to Beta ([kubernetes/kubernetes#121356](https://github.com/kubernetes/kubernetes/pull/121356), [@mimowo](https://github.com/mimowo)) [SIG Apps] - Kube-apiserver: adds --authorization-config flag for reading a configuration file containing an apiserver.config.k8s.io/v1alpha1 AuthorizationConfiguration object. --authorization-config flag is mutually exclusive with --authorization-modes and --authorization-webhook-* flags. The alpha StructuredAuthorizationConfiguration feature flag must be enabled for --authorization-config to be specified. ([kubernetes/kubernetes#120154](https://github.com/kubernetes/kubernetes/pull/120154), [@palnabarun](https://github.com/palnabarun)) [SIG API Machinery, Auth and Testing] - Kube-proxy now has a new nftables-based mode, available by running - + kube-proxy --feature-gates NFTablesProxyMode=true --proxy-mode nftables - + This is currently an alpha-level feature and while it probably will not eat your data, it may nibble at it a bit. (It passes e2e testing but has not yet seen real-world use.) - + At this point it should be functionally mostly identical to the iptables mode, except that it does not (and will not) support Service NodePorts on 127.0.0.1. (Also note that there are currently no command-line arguments for the nftables-specific config; you will need to use a config file if you want to set the equivalent of any of the `--iptables-xxx` options.) - + As this code is still very new, it has not been heavily optimized yet; while it is expected to _eventually_ have better performance than the iptables backend, very little performance testing has been done so far. ([kubernetes/kubernetes#121046](https://github.com/kubernetes/kubernetes/pull/121046), [@danwinship](https://github.com/danwinship)) [SIG API Machinery and Network] @@ -485,8 +1445,8 @@ Kubernetes API Version: v1.27.2 (at the cost of an occasional pod being scheduled non-optimally/violating existing pods preferred inter-pod affinities). To enable this scheduler option, set the `InterPodAffinity` scheduler plugin arg `ignorePreferredTermsOfExistingPods: true` ([kubernetes/kubernetes#114393](https://github.com/kubernetes/kubernetes/pull/114393), [@danielvegamyhre](https://github.com/danielvegamyhre)) -- Added the `MatchConditions` field to `ValidatingWebhookConfiguration` and `MutatingWebhookConfiguration` for the v1beta and v1 apis. - +- Added the `MatchConditions` field to `ValidatingWebhookConfiguration` and `MutatingWebhookConfiguration` for the v1beta and v1 apis. + The `AdmissionWebhookMatchConditions` featuregate is now in Alpha ([kubernetes/kubernetes#116261](https://github.com/kubernetes/kubernetes/pull/116261), [@ivelichkovich](https://github.com/ivelichkovich)) [SIG API Machinery and Testing] - Added validation to ensure that if `service.kubernetes.io/topology-aware-hints` and `service.kubernetes.io/topology-mode` annotations are both set, they are set to the same value.Also Added deprecation warning if `service.kubernetes.io/topology-aware-hints` annotation is used. ([kubernetes/kubernetes#116612](https://github.com/kubernetes/kubernetes/pull/116612), [@robscott](https://github.com/robscott)) - Added warnings about workload resources (Pods, ReplicaSets, Deployments, Jobs, CronJobs, or ReplicationControllers) whose names are not valid DNS labels. ([kubernetes/kubernetes#114412](https://github.com/kubernetes/kubernetes/pull/114412), [@thockin](https://github.com/thockin)) @@ -504,22 +1464,22 @@ Kubernetes API Version: v1.27.2 - Graduated `Kubelet Topology Manager` to GA. ([kubernetes/kubernetes#116093](https://github.com/kubernetes/kubernetes/pull/116093), [@swatisehgal](https://github.com/swatisehgal)) - Graduated `KubeletTracing` to beta, which means that the feature gate is now enabled by default. ([kubernetes/kubernetes#115750](https://github.com/kubernetes/kubernetes/pull/115750), [@saschagrunert](https://github.com/saschagrunert)) - Graduated seccomp profile defaulting to GA. - + Set the kubelet `--seccomp-default` flag or `seccompDefault` kubelet configuration field to `true` to make pods on that node default to using the `RuntimeDefault` seccomp profile. - + Enabling seccomp for your workload can have a negative performance impact depending on the kernel and container runtime version in use. - + Guidance for identifying and mitigating those issues is outlined in the Kubernetes [seccomp tutorial](https://k8s.io/docs/tutorials/security/seccomp). ([kubernetes/kubernetes#115719](https://github.com/kubernetes/kubernetes/pull/115719), [@saschagrunert](https://github.com/saschagrunert)) [SIG API Machinery, Node, Storage and Testing] - Graduated the container resource metrics feature on `HPA` to beta. ([kubernetes/kubernetes#116046](https://github.com/kubernetes/kubernetes/pull/116046), [@sanposhiho](https://github.com/sanposhiho)) - Implemented API streaming for the `watch-cache` - + When `sendInitialEvents` `ListOption` is set together with `watch=true`, it begins the watch stream with synthetic init events followed by a synthetic "Bookmark" after which the server continues streaming events. ([kubernetes/kubernetes#110960](https://github.com/kubernetes/kubernetes/pull/110960), [@p0lyn0mial](https://github.com/p0lyn0mial)) - Introduced API for streaming. - + Added `SendInitialEvents` field to the `ListOptions`. When the new option is set together with `watch=true`, it begins the watch stream with synthetic init events followed by a synthetic "Bookmark" after which the server continues streaming events. ([kubernetes/kubernetes#115402](https://github.com/kubernetes/kubernetes/pull/115402), [@p0lyn0mial](https://github.com/p0lyn0mial)) - Introduced a breaking change to the `resource.k8s.io` API in its `AllocationResult` struct. This change allows a kubelet plugin for the `DynamicResourceAllocation` feature to service allocations from multiple resource driver controllers. ([kubernetes/kubernetes#116332](https://github.com/kubernetes/kubernetes/pull/116332), [@klueska](https://github.com/klueska)) - Introduces new alpha functionality to the reflector, allowing user to enable API streaming. - + To activate this feature, users can set the `ENABLE_CLIENT_GO_WATCH_LIST_ALPHA` environmental variable. It is important to note that the server must support streaming for this feature to function properly. If streaming is not supported by the server, the reflector will revert to the previous method @@ -599,8 +1559,8 @@ Kubernetes API Version: v1.27.2 variable with expressions. The new variable provides a builder that allows expressions such `authorizer.group('').resource('pods').check('create').allowed()`. ([kubernetes/kubernetes#116054](https://github.com/kubernetes/kubernetes/pull/116054), [@jpbetz](https://github.com/jpbetz)) [SIG API Machinery and Testing] - Added matchConditions field to ValidatingAdmissionPolicy, enabled support for CEL based custom match criteria. ([kubernetes/kubernetes#116350](https://github.com/kubernetes/kubernetes/pull/116350), [@maxsmythe](https://github.com/maxsmythe)) [SIG API Machinery and Testing] - Added messageExpression field to ValidationRule. (#115969, @DangerOnTheRanger) ([kubernetes/kubernetes#115969](https://github.com/kubernetes/kubernetes/pull/115969), [@DangerOnTheRanger](https://github.com/DangerOnTheRanger)) [SIG API Machinery, Architecture, Auth, CLI, Cloud Provider, Instrumentation, Node and Testing] -- Added the `MatchConditions` field to `ValidatingWebhookConfiguration` and `MutatingWebhookConfiguration` for the v1beta and v1 apis. - +- Added the `MatchConditions` field to `ValidatingWebhookConfiguration` and `MutatingWebhookConfiguration` for the v1beta and v1 apis. + The `AdmissionWebhookMatchConditions` featuregate is now in Alpha ([kubernetes/kubernetes#116261](https://github.com/kubernetes/kubernetes/pull/116261), [@ivelichkovich](https://github.com/ivelichkovich)) [SIG API Machinery and Testing] - Added validation to ensure that if `service.kubernetes.io/topology-aware-hints` and `service.kubernetes.io/topology-mode` annotations are both set, they are set to the same value. - Added deprecation warning if `service.kubernetes.io/topology-aware-hints` annotation is used. ([kubernetes/kubernetes#116612](https://github.com/kubernetes/kubernetes/pull/116612), [@robscott](https://github.com/robscott)) [SIG Apps, Network and Testing] @@ -619,7 +1579,7 @@ Kubernetes API Version: v1.27.2 - Graduate the container resource metrics feature on HPA to beta. ([kubernetes/kubernetes#116046](https://github.com/kubernetes/kubernetes/pull/116046), [@sanposhiho](https://github.com/sanposhiho)) [SIG Autoscaling] - Introduced a breaking change to the `resource.k8s.io` API in its `AllocationResult` struct. This change allows a kubelet plugin for the `DynamicResourceAllocation` feature to service allocations from multiple resource driver controllers. ([kubernetes/kubernetes#116332](https://github.com/kubernetes/kubernetes/pull/116332), [@klueska](https://github.com/klueska)) [SIG API Machinery, Apps, CLI, Node, Scheduling and Testing] - Introduces new alpha functionality to the reflector, allowing user to enable API streaming. - + To activate this feature, users can set the `ENABLE_CLIENT_GO_WATCH_LIST_ALPHA` environmental variable. It is important to note that the server must support streaming for this feature to function properly. If streaming is not supported by the server, the reflector will revert to the previous method @@ -647,17 +1607,17 @@ Kubernetes API Version: v1.27.2 The type checking is fully informational, and the behavior of the policy is unchanged. ([kubernetes/kubernetes#115668](https://github.com/kubernetes/kubernetes/pull/115668), [@jiahuif](https://github.com/jiahuif)) [SIG API Machinery, Auth, Cloud Provider and Testing] - We have removed support for the v1alpha1 kubeletplugin API of DynamicResourceManagement. All plugins must update to v1alpha2 in order to function properly going forward. ([kubernetes/kubernetes#116558](https://github.com/kubernetes/kubernetes/pull/116558), [@klueska](https://github.com/klueska)) [SIG API Machinery, Apps, CLI, Node, Scheduling and Testing] - Graduated seccomp profile defaulting to GA. - + Set the kubelet `--seccomp-default` flag or `seccompDefault` kubelet configuration field to `true` to make pods on that node default to using the `RuntimeDefault` seccomp profile. - + Enabling seccomp for your workload can have a negative performance impact depending on the kernel and container runtime version in use. - + Guidance for identifying and mitigating those issues is outlined in the Kubernetes [seccomp tutorial](https://k8s.io/docs/tutorials/security/seccomp). ([kubernetes/kubernetes#115719](https://github.com/kubernetes/kubernetes/pull/115719), [@saschagrunert](https://github.com/saschagrunert)) [SIG API Machinery, Node, Storage and Testing] - Implements API for streaming for the watch-cache - + When sendInitialEvents ListOption is set together with watch=true, it begins the watch stream with synthetic init events followed by a synthetic "Bookmark" after which the server continues streaming events. ([kubernetes/kubernetes#110960](https://github.com/kubernetes/kubernetes/pull/110960), [@p0lyn0mial](https://github.com/p0lyn0mial)) [SIG API Machinery] - Introduce API for streaming. - + Add SendInitialEvents field to the ListOptions. When the new option is set together with watch=true, it begins the watch stream with synthetic init events followed by a synthetic "Bookmark" after which the server continues streaming events. ([kubernetes/kubernetes#115402](https://github.com/kubernetes/kubernetes/pull/115402), [@p0lyn0mial](https://github.com/p0lyn0mial)) [SIG API Machinery] - Kubelet: a "maxParallelImagePulls" field can now be specified in the kubelet configuration file to control how many image pulls the kubelet can perform in parallel. ([kubernetes/kubernetes#115220](https://github.com/kubernetes/kubernetes/pull/115220), [@ruiwen-zhao](https://github.com/ruiwen-zhao)) [SIG API Machinery, Node and Scalability] - PodSchedulingReadiness is graduated to beta. ([kubernetes/kubernetes#115815](https://github.com/kubernetes/kubernetes/pull/115815), [@Huang-Wei](https://github.com/Huang-Wei)) [SIG API Machinery, Apps, Scheduling and Testing] @@ -776,7 +1736,7 @@ Kubernetes API Version: v1.26.1 label selectors.' ([kubernetes/kubernetes#113699](https://github.com/kubernetes/kubernetes/pull/113699), [@liggitt](https://github.com/liggitt)) - Add `percentageOfNodesToScore` as a scheduler profile level parameter to API version `v1`. When a profile `percentageOfNodesToScore` is set, it will override global `percentageOfNodesToScore`. ([kubernetes/kubernetes#112521](https://github.com/kubernetes/kubernetes/pull/112521), [@yuanchen8911](https://github.com/yuanchen8911)) -- Add auth API to get self subject attributes (new selfsubjectreviews API is added). +- Add auth API to get self subject attributes (new selfsubjectreviews API is added). The corresponding command for kubctl is provided - `kubectl auth whoami`. ([kubernetes/kubernetes#111333](https://github.com/kubernetes/kubernetes/pull/111333), [@nabokihms](https://github.com/nabokihms)) [SIG API Machinery, Auth, CLI and Testing] - Added `kubernetes_feature_enabled` metric series to track whether each active feature gate is enabled. ([kubernetes/kubernetes#112690](https://github.com/kubernetes/kubernetes/pull/112690), [@logicalhan](https://github.com/logicalhan)) - Added a `--topology-manager-policy-options` flag to the kubelet to support fine tuning the topology manager policies. The first policy option, `prefer-closest-numa-nodes`, allows these policies to favor sets of NUMA nodes with shorter distance between nodes when making admission decisions. ([kubernetes/kubernetes#112914](https://github.com/kubernetes/kubernetes/pull/112914), [@PiotrProkop](https://github.com/PiotrProkop)) @@ -856,22 +1816,22 @@ Kubernetes API Version: v1.26.1 - `apiserver_flowcontrol_target_seats`: Seat allocation targets - `apiserver_flowcontrol_seat_fair_frac`: Fair fraction of server's concurrency to allocate to each priority level that can use it - `apiserver_flowcontrol_current_limit_seats`: current derived number of execution seats available to each priority level - + The possibility of borrowing means that the old metric apiserver_flowcontrol_request_concurrency_limit can no longer mean both the configured concurrency limit and the enforced concurrency limit. Henceforth it means the configured concurrency limit. ([kubernetes/kubernetes#113485](https://github.com/kubernetes/kubernetes/pull/113485), [@MikeSpreitzer](https://github.com/MikeSpreitzer)) [SIG API Machinery and Testing] - The EndpointSliceTerminatingCondition feature gate has graduated to GA. The gate is now locked and will be removed in v1.28. ([kubernetes/kubernetes#113351](https://github.com/kubernetes/kubernetes/pull/113351), [@andrewsykim](https://github.com/andrewsykim)) [SIG API Machinery, Apps, Network and Testing] - Yes, aggregated discovery will be alpha and can be toggled with the AggregatedDiscoveryEndpoint feature flag ([kubernetes/kubernetes#113171](https://github.com/kubernetes/kubernetes/pull/113171), [@Jefftree](https://github.com/Jefftree)) [SIG API Machinery, Apps, Architecture, Auth, Autoscaling, CLI, Cloud Provider, Cluster Lifecycle, Network, Node, Release, Scalability, Scheduling, Storage and Testing] - **Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.**: - + (#104782, @kerthcet) [SIG Scheduling and Testing] - Ephemeral containers have reached beta maturity and are now available by default. (#105405, @verb) [SIG API Machinery, Apps, Node and Testing] - Introduce OS field in the Pod Spec (#104693, @ravisantoshgudimetla) [SIG API Machinery and Apps] -- Introduce v1beta3 api for scheduler. This version +- Introduce v1beta3 api for scheduler. This version - increases the weight of user specifiable priorities. The weights of following priority plugins are increased - TaintTolerations to 3 - as leveraging node tainting to group nodes in the cluster is becoming a widely-adopted practice - NodeAffinity to 2 - InterPodAffinity to 2 - + - Won't have HealthzBindAddress, MetricsBindAddress fields (#104251, @ravisantoshgudimetla) [SIG Scheduling and Testing] - JSON log output is configurable and now supports writing info messages to stdout and error messages to stderr. Info messages can be buffered in memory. The default is to write both to stdout without buffering, as before. (#104873, @pohly) [SIG API Machinery, Architecture, CLI, Cluster Lifecycle, Instrumentation, Node and Scheduling] - JobTrackingWithFinalizers graduates to beta. Feature is enabled by default. (#105687, @alculquicondor) [SIG Apps and Testing] @@ -1354,7 +2314,7 @@ Kubernetes API Version: v1.22.6 - Kube-scheduler: a plugin enabled in a v1beta2 configuration file takes precedence over the default configuration for that plugin. This simplifies enabling default plugins with custom configuration without needing to explicitly disable those default plugins. ([kubernetes/kubernetes#99582](https://github.com/kubernetes/kubernetes/pull/99582), [@chendave](https://github.com/chendave)) - New `node-high` priority-level has been added to Suggested API Priority and ([kubernetes/kubernetes#101151](https://github.com/kubernetes/kubernetes/pull/101151), [@mborsz](https://github.com/mborsz)) - NodeSwapEnabled feature flag was renamed to NodeSwap - + The flag was only available in the 1.22.0-beta.1 release, and the new flag should be used going forward. ([kubernetes/kubernetes#103553](https://github.com/kubernetes/kubernetes/pull/103553), [@ehashman](https://github.com/ehashman)) [SIG Node] - Omit comparison with boolean constant ([kubernetes/kubernetes#101523](https://github.com/kubernetes/kubernetes/pull/101523), [@chuntaochen](https://github.com/chuntaochen)) [SIG CLI and Cloud Provider] - Removed the feature flag for probe-level termination grace period from Kubelet. If a user wants to disable this feature on already created pods, they will have to delete and recreate the pods. ([kubernetes/kubernetes#103168](https://github.com/kubernetes/kubernetes/pull/103168), [@raisaat](https://github.com/raisaat)) [SIG Apps and Node] @@ -1383,18 +2343,18 @@ Kubernetes API Version: v1.22.6 - Track ownership of scale subresource for all scalable resources i.e. Deployment, ReplicaSet, StatefulSet, ReplicationController, and Custom Resources. ([kubernetes/kubernetes#98377](https://github.com/kubernetes/kubernetes/pull/98377), [@nodo](https://github.com/nodo)) [SIG API Machinery and Testing] - Revert addition of Add PersistentVolumeClaimDeletePoilcy to StatefulSet API. ([kubernetes/kubernetes#103747](https://github.com/kubernetes/kubernetes/pull/103747), [@mattcary](https://github.com/mattcary)) [SIG API Machinery and Apps] - Added field .status.uncountedTerminatedPods to the Job resource. This field is used by the job controller to keep track of finished pods before adding them to the Job status counters. - + Pods created by the job controller get the finalizer batch.kubernetes.io/job-tracking - + Jobs that are tracked using this mechanism get the annotation batch.kubernetes.io/job-tracking. This is a temporary measure. Two releases after this feature graduates to beta, the annotation won't be added to Jobs anymore. ([kubernetes/kubernetes#98817](https://github.com/kubernetes/kubernetes/pull/98817), [@alculquicondor](https://github.com/alculquicondor)) [SIG API Machinery, Apps, Auth and CLI] - Ephemeral containers are now allowed to configure a securityContext that differs from that of the Pod. - + Cluster administrators should ensure that security policy controllers support EphemeralContainers before enabling this feature in clusters. ([kubernetes/kubernetes#99023](https://github.com/kubernetes/kubernetes/pull/99023), [@verb](https://github.com/verb)) [SIG API Machinery, Apps, Auth and Node] - If someone had the ProbeTerminationGracePeriod alpha feature enabled in 1.21, they should update/delete any workloads/pods with probe terminationGracePeriods < 1 before upgrading ([kubernetes/kubernetes#103245](https://github.com/kubernetes/kubernetes/pull/103245), [@wzshiming](https://github.com/wzshiming)) [SIG Apps and Node] - Introducing Memory QoS support with cgroups v2 (Alpha) The MemoryQoS feature is now in Alpha. This allows kubelet running with cgroups v2 to set memory QoS at container, pod and QoS level to protect and guarantee better memory quality. This feature can be enabled through feature gate MemoryQoS. ([kubernetes/kubernetes#102970](https://github.com/kubernetes/kubernetes/pull/102970), [@borgerli](https://github.com/borgerli)) [SIG Node and Storage] - NodeSwapEnabled feature flag was renamed to NodeSwap - + The flag was only available in the 1.22.0-beta.1 release, and the new flag should be used going forward. ([kubernetes/kubernetes#103553](https://github.com/kubernetes/kubernetes/pull/103553), [@ehashman](https://github.com/ehashman)) [SIG Node] - Removed the feature flag for probe-level termination grace period from Kubelet. If a user wants to disable this feature on already created pods, they will have to delete and recreate the pods. ([kubernetes/kubernetes#103168](https://github.com/kubernetes/kubernetes/pull/103168), [@raisaat](https://github.com/raisaat)) [SIG Apps and Node] - Track Job completion through status and Pod finalizers, removing dependency on Pod tombstones. ([kubernetes/kubernetes#98238](https://github.com/kubernetes/kubernetes/pull/98238), [@alculquicondor](https://github.com/alculquicondor)) [SIG API Machinery, Apps, Auth and Testing] @@ -1420,7 +2380,7 @@ Kubernetes API Version: v1.22.6 Added the "action" label to Job controller sync metrics job_sync_total and job_sync_duration_seconds ([kubernetes/kubernetes#102022](https://github.com/kubernetes/kubernetes/pull/102022), [@adtac](https://github.com/adtac)) [SIG Apps, Instrumentation and Testing] - TerminationGracePeriodSeconds on pod specs and container probes should not be negative. Negative values of TerminationGracePeriodSeconds will be treated as the value `1s` on the delete path. - Immutable field validation will be relaxed in order to update negative values. + Immutable field validation will be relaxed in order to update negative values. In a future release, negative values will not be permitted. ([kubernetes/kubernetes#98866](https://github.com/kubernetes/kubernetes/pull/98866), [@wzshiming](https://github.com/wzshiming)) [SIG API Machinery, Apps and Node] - The API documentation for the DaemonSet's spec.updateStrategy.rollingUpdate.maxUnavailable field was corrected to state that the value is rounded up. ([kubernetes/kubernetes#101296](https://github.com/kubernetes/kubernetes/pull/101296), [@Miciah](https://github.com/Miciah)) [SIG Apps and CLI] - The CertificateSigningRequest.certificates.k8s.io API supports an optional expirationSeconds field to allow the client to request a particular duration for the issued certificate. The default signer implementations provided by the Kubernetes controller manager will honor this field as long as it does not exceed the --cluster-signing-duration flag. ([kubernetes/kubernetes#99494](https://github.com/kubernetes/kubernetes/pull/99494), [@enj](https://github.com/enj)) [SIG API Machinery, Apps, Auth, CLI, Instrumentation, Node, Security and Testing] @@ -1452,7 +2412,7 @@ Kubernetes API Version: v1.22.6 - The `pods/ephemeralcontainers` API now returns and expects a `Pod` object instead of `EphemeralContainers`. This is incompatible with the previous alpha-level API. ([kubernetes/kubernetes#101034](https://github.com/kubernetes/kubernetes/pull/101034), [@verb](https://github.com/verb)) [SIG Apps, Auth, CLI and Testing] - The pod/eviction subresource now accepts policy/v1 Eviction requests in addition to policy/v1beta1 Eviction requests ([kubernetes/kubernetes#100724](https://github.com/kubernetes/kubernetes/pull/100724), [@liggitt](https://github.com/liggitt)) [SIG API Machinery, Apps, Architecture, Auth, CLI, Storage and Testing] - Track ownership of scale subresource for all scalable resources i.e. Deployment, ReplicaSet, StatefulSet, ReplicationController, and Custom Resources. ([kubernetes/kubernetes#98377](https://github.com/kubernetes/kubernetes/pull/98377), [@nodo](https://github.com/nodo)) [SIG API Machinery and Testing] -- We have added a new Priority & Fairness rule that exempts all probes (/readyz, /healthz, /livez) to prevent +- We have added a new Priority & Fairness rule that exempts all probes (/readyz, /healthz, /livez) to prevent restarting of "healthy" kube-apiserver instance(s) by kubelet. ([kubernetes/kubernetes#100678](https://github.com/kubernetes/kubernetes/pull/100678), [@tkashem](https://github.com/tkashem)) [SIG API Machinery] @@ -1476,9 +2436,9 @@ Kubernetes API Version: v1.21.7 ### API Change - Kube-apiserver: Fixes handling of CRD schemas containing literal null values in enums (#104989, @liggitt) [SIG API Machinery, Apps and Network] - "Auto" is now a valid value for the `service.kubernetes.io/topology-aware-hints` annotation. ([kubernetes/kubernetes#100728](https://github.com/kubernetes/kubernetes/pull/100728), [@robscott](https://github.com/robscott)) [SIG Apps, Instrumentation and Network] -- We have added a new Priority & Fairness rule that exempts all probes (/readyz, /healthz, /livez) to prevent +- We have added a new Priority & Fairness rule that exempts all probes (/readyz, /healthz, /livez) to prevent restarting of "healthy" kube-apiserver instance(s) by kubelet. ([kubernetes/kubernetes#101111](https://github.com/kubernetes/kubernetes/pull/101111), [@tkashem](https://github.com/tkashem)) [SIG API Machinery] -- 1. PodAffinityTerm includes a namespaceSelector field to allow selecting eligible namespaces based on their labels. +- 1. PodAffinityTerm includes a namespaceSelector field to allow selecting eligible namespaces based on their labels. 2. A new CrossNamespacePodAffinity quota scope API that allows restricting which namespaces allowed to use PodAffinityTerm with corss-namespace reference via namespaceSelector or namespaces fields. ([kubernetes/kubernetes#98582](https://github.com/kubernetes/kubernetes/pull/98582), [@ahg-g](https://github.com/ahg-g)) [SIG API Machinery, Apps, Auth and Testing] - Add Probe-level terminationGracePeriodSeconds field ([kubernetes/kubernetes#99375](https://github.com/kubernetes/kubernetes/pull/99375), [@ehashman](https://github.com/ehashman)) [SIG API Machinery, Apps, Node and Testing] - Added `.spec.completionMode` field to Job, with accepted values `NonIndexed` (default) and `Indexed`. This is an alpha field and is only honored by servers with the `IndexedJob` feature gate enabled. ([kubernetes/kubernetes#98441](https://github.com/kubernetes/kubernetes/pull/98441), [@alculquicondor](https://github.com/alculquicondor)) [SIG Apps and CLI] @@ -1492,8 +2452,8 @@ Kubernetes API Version: v1.21.7 - Generic ephemeral volumes are beta. ([kubernetes/kubernetes#99643](https://github.com/kubernetes/kubernetes/pull/99643), [@pohly](https://github.com/pohly)) [SIG API Machinery, Apps, Auth, CLI, Node, Storage and Testing] - Hugepages request values are limited to integer multiples of the page size. ([kubernetes/kubernetes#98515](https://github.com/kubernetes/kubernetes/pull/98515), [@lala123912](https://github.com/lala123912)) [SIG Apps] - Implement the GetAvailableResources in the podresources API. ([kubernetes/kubernetes#95734](https://github.com/kubernetes/kubernetes/pull/95734), [@fromanirh](https://github.com/fromanirh)) [SIG Instrumentation, Node and Testing] -- IngressClass resource can now reference a resource in a specific namespace - for implementation-specific configuration (previously only Cluster-level resources were allowed). +- IngressClass resource can now reference a resource in a specific namespace + for implementation-specific configuration (previously only Cluster-level resources were allowed). This feature can be enabled using the IngressClassNamespacedParams feature gate. ([kubernetes/kubernetes#99275](https://github.com/kubernetes/kubernetes/pull/99275), [@hbagdi](https://github.com/hbagdi)) - Jobs API has a new `.spec.suspend` field that can be used to suspend and resume Jobs. This is an alpha field which is only honored by servers with the `SuspendJob` feature gate enabled. ([kubernetes/kubernetes#98727](https://github.com/kubernetes/kubernetes/pull/98727), [@adtac](https://github.com/adtac)) - Kubelet Graceful Node Shutdown feature graduates to Beta and enabled by default. ([kubernetes/kubernetes#99735](https://github.com/kubernetes/kubernetes/pull/99735), [@bobbypage](https://github.com/bobbypage)) @@ -1534,7 +2494,7 @@ Kubernetes API Version: v1.21.7 - The Endpoints controller will now set the `endpoints.kubernetes.io/over-capacity` annotation to "warning" when an Endpoints resource contains more than 1000 addresses. In a future release, the controller will truncate Endpoints that exceed this limit. The EndpointSlice API can be used to support significantly larger number of addresses. ([kubernetes/kubernetes#99975](https://github.com/kubernetes/kubernetes/pull/99975), [@robscott](https://github.com/robscott)) [SIG Apps and Network] - The PodDisruptionBudget API has been promoted to policy/v1 with no schema changes. The only functional change is that an empty selector (`{}`) written to a policy/v1 PodDisruptionBudget now selects all pods in the namespace. The behavior of the policy/v1beta1 API remains unchanged. The policy/v1beta1 PodDisruptionBudget API is deprecated and will no longer be served in 1.25+. ([kubernetes/kubernetes#99290](https://github.com/kubernetes/kubernetes/pull/99290), [@mortent](https://github.com/mortent)) [SIG API Machinery, Apps, Auth, Autoscaling, CLI, Cloud Provider, Cluster Lifecycle, Instrumentation, Scheduling and Testing] - Topology Aware Hints are now available in alpha and can be enabled with the `TopologyAwareHints` feature gate. ([kubernetes/kubernetes#99522](https://github.com/kubernetes/kubernetes/pull/99522), [@robscott](https://github.com/robscott)) [SIG API Machinery, Apps, Auth, Instrumentation, Network and Testing] -- 1. PodAffinityTerm includes a namespaceSelector field to allow selecting eligible namespaces based on their labels. +- 1. PodAffinityTerm includes a namespaceSelector field to allow selecting eligible namespaces based on their labels. 2. A new CrossNamespacePodAffinity quota scope API that allows restricting which namespaces allowed to use PodAffinityTerm with corss-namespace reference via namespaceSelector or namespaces fields. ([kubernetes/kubernetes#98582](https://github.com/kubernetes/kubernetes/pull/98582), [@ahg-g](https://github.com/ahg-g)) [SIG API Machinery, Apps, Auth and Testing] - Add a default metadata name labels for selecting any namespace by its name. ([kubernetes/kubernetes#96968](https://github.com/kubernetes/kubernetes/pull/96968), [@jayunit100](https://github.com/jayunit100)) [SIG API Machinery, Apps, Cloud Provider, Storage and Testing] - Added `.spec.completionMode` field to Job, with accepted values `NonIndexed` (default) and `Indexed` ([kubernetes/kubernetes#98441](https://github.com/kubernetes/kubernetes/pull/98441), [@alculquicondor](https://github.com/alculquicondor)) [SIG Apps and CLI] @@ -1542,8 +2502,8 @@ Kubernetes API Version: v1.21.7 - DaemonSets accept a MaxSurge integer or percent on their rolling update strategy that will launch the updated pod on nodes and wait for those pods to go ready before marking the old out-of-date pods as deleted. This allows workloads to avoid downtime during upgrades when deployed using DaemonSets. This feature is alpha and is behind the DaemonSetUpdateSurge feature gate. ([kubernetes/kubernetes#96441](https://github.com/kubernetes/kubernetes/pull/96441), [@smarterclayton](https://github.com/smarterclayton)) [SIG Apps and Testing] - EndpointSlice API is now GA. The EndpointSlice topology field has been removed from the GA API and will be replaced by a new per Endpoint Zone field. If the topology field was previously used, it will be converted into an annotation in the v1 Resource. The discovery.k8s.io/v1alpha1 API is removed. ([kubernetes/kubernetes#99662](https://github.com/kubernetes/kubernetes/pull/99662), [@swetharepakula](https://github.com/swetharepakula)) [SIG API Machinery, CLI, Cloud Provider, Cluster Lifecycle, Instrumentation, Network and Testing] - EndpointSlice Controllers are now GA. The EndpointSlice Controller will not populate the `deprecatedTopology` field and will only provide topology information through the `zone` and `nodeName` fields. ([kubernetes/kubernetes#99870](https://github.com/kubernetes/kubernetes/pull/99870), [@swetharepakula](https://github.com/swetharepakula)) [SIG API Machinery, Apps, Auth, Network and Testing] -- IngressClass resource can now reference a resource in a specific namespace - for implementation-specific configuration(previously only Cluster-level resources were allowed). +- IngressClass resource can now reference a resource in a specific namespace + for implementation-specific configuration(previously only Cluster-level resources were allowed). This feature can be enabled using the IngressClassNamespacedParams feature gate. ([kubernetes/kubernetes#99275](https://github.com/kubernetes/kubernetes/pull/99275), [@hbagdi](https://github.com/hbagdi)) [SIG API Machinery, CLI and Network] - Introduce conditions for PodDisruptionBudget ([kubernetes/kubernetes#98127](https://github.com/kubernetes/kubernetes/pull/98127), [@mortent](https://github.com/mortent)) [SIG API Machinery, Apps, Auth, CLI, Cloud Provider, Cluster Lifecycle and Instrumentation] - Jobs API has a new .spec.suspend field that can be used to suspend and resume Jobs ([kubernetes/kubernetes#98727](https://github.com/kubernetes/kubernetes/pull/98727), [@adtac](https://github.com/adtac)) [SIG API Machinery, Apps, Node, Scheduling and Testing] @@ -1557,7 +2517,7 @@ Kubernetes API Version: v1.21.7 - PodSecurityPolicy only stores "generic" as allowed volume type if the GenericEphemeralVolume feature gate is enabled ([kubernetes/kubernetes#98918](https://github.com/kubernetes/kubernetes/pull/98918), [@pohly](https://github.com/pohly)) [SIG Auth and Security] - Promote CronJobs to batch/v1 ([kubernetes/kubernetes#99423](https://github.com/kubernetes/kubernetes/pull/99423), [@soltysh](https://github.com/soltysh)) [SIG API Machinery, Apps, CLI and Testing] - Remove support for building Kubernetes with bazel. ([kubernetes/kubernetes#99561](https://github.com/kubernetes/kubernetes/pull/99561), [@BenTheElder](https://github.com/BenTheElder)) [SIG API Machinery, Apps, Architecture, Auth, Autoscaling, CLI, Cloud Provider, Cluster Lifecycle, Instrumentation, Network, Node, Release, Scalability, Scheduling, Storage, Testing and Windows] -- Setting loadBalancerClass in load balancer type of service is available with this PR. +- Setting loadBalancerClass in load balancer type of service is available with this PR. Users who want to use a custom load balancer can specify loadBalancerClass to achieve it. ([kubernetes/kubernetes#98277](https://github.com/kubernetes/kubernetes/pull/98277), [@XudongLiuHarold](https://github.com/XudongLiuHarold)) [SIG API Machinery, Apps, Cloud Provider and Network] - Storage capacity tracking (= the CSIStorageCapacity feature) is beta, storage.k8s.io/v1alpha1/VolumeAttachment and storage.k8s.io/v1alpha1/CSIStorageCapacity objects are deprecated ([kubernetes/kubernetes#99641](https://github.com/kubernetes/kubernetes/pull/99641), [@pohly](https://github.com/pohly)) [SIG API Machinery, Apps, Auth, Scheduling, Storage and Testing] - Support for Indexed Job: a Job that is considered completed when Pods associated to indexes from 0 to (.spec.completions-1) have succeeded. ([kubernetes/kubernetes#98812](https://github.com/kubernetes/kubernetes/pull/98812), [@alculquicondor](https://github.com/alculquicondor)) [SIG Apps and CLI] @@ -1596,7 +2556,7 @@ Kubernetes API Version: v1.20.12 Kubernetes API Version: v1.20.11 ### API Change -- We have added a new Priority & Fairness rule that exempts all probes (/readyz, /healthz, /livez) to prevent +- We have added a new Priority & Fairness rule that exempts all probes (/readyz, /healthz, /livez) to prevent restarting of "healthy" kube-apiserver instance(s) by kubelet. ([kubernetes/kubernetes#101112](https://github.com/kubernetes/kubernetes/pull/101112), [@tkashem](https://github.com/tkashem)) [SIG API Machinery] - Fixes using server-side apply with APIService resources ([kubernetes/kubernetes#100714](https://github.com/kubernetes/kubernetes/pull/100714), [@kevindelgado](https://github.com/kevindelgado)) [SIG API Machinery, Apps and Testing] - Regenerate protobuf code to fix CVE-2021-3121 ([kubernetes/kubernetes#100501](https://github.com/kubernetes/kubernetes/pull/100501), [@joelsmith](https://github.com/joelsmith)) [SIG API Machinery, Apps, Auth, CLI, Cloud Provider, Cluster Lifecycle, Instrumentation, Node and Storage] @@ -1606,7 +2566,7 @@ Kubernetes API Version: v1.20.11 - A new `nofuzz` go build tag now disables gofuzz support. Release binaries enable this. ([kubernetes/kubernetes#92491](https://github.com/kubernetes/kubernetes/pull/92491), [@BenTheElder](https://github.com/BenTheElder)) [SIG API Machinery] - Add WindowsContainerResources and Annotations to CRI-API UpdateContainerResourcesRequest ([kubernetes/kubernetes#95741](https://github.com/kubernetes/kubernetes/pull/95741), [@katiewasnothere](https://github.com/katiewasnothere)) [SIG Node] - Add a `serving` and `terminating` condition to the EndpointSlice API. - `serving` tracks the readiness of endpoints regardless of their terminating state. This is distinct from `ready` since `ready` is only true when pods are not terminating. + `serving` tracks the readiness of endpoints regardless of their terminating state. This is distinct from `ready` since `ready` is only true when pods are not terminating. `terminating` is true when an endpoint is terminating. For pods this is any endpoint with a deletion timestamp. ([kubernetes/kubernetes#92968](https://github.com/kubernetes/kubernetes/pull/92968), [@andrewsykim](https://github.com/andrewsykim)) [SIG Apps and Network] - Add dual-stack Services (alpha). This is a BREAKING CHANGE to an alpha API. It changes the dual-stack API wrt Service from a single ipFamily field to 3 @@ -1640,7 +2600,7 @@ Kubernetes API Version: v1.20.11 - Migrate scheduler, controller-manager and cloud-controller-manager to use LeaseLock ([kubernetes/kubernetes#94603](https://github.com/kubernetes/kubernetes/pull/94603), [@wojtek-t](https://github.com/wojtek-t)) [SIG API Machinery, Apps, Cloud Provider and Scheduling] - Modify DNS-1123 error messages to indicate that RFC 1123 is not followed exactly ([kubernetes/kubernetes#94182](https://github.com/kubernetes/kubernetes/pull/94182), [@mattfenwick](https://github.com/mattfenwick)) [SIG API Machinery, Apps, Auth, Network and Node] - Move configurable fsgroup change policy for pods to beta ([kubernetes/kubernetes#96376](https://github.com/kubernetes/kubernetes/pull/96376), [@gnufied](https://github.com/gnufied)) [SIG Apps and Storage] -- New flag is introduced, i.e. --topology-manager-scope=container|pod. +- New flag is introduced, i.e. --topology-manager-scope=container|pod. The default value is the "container" scope. ([kubernetes/kubernetes#92967](https://github.com/kubernetes/kubernetes/pull/92967), [@cezaryzukowski](https://github.com/cezaryzukowski)) [SIG Instrumentation, Node and Testing] - New parameter `defaultingType` for `PodTopologySpread` plugin allows to use k8s defined or user provided default constraints ([kubernetes/kubernetes#95048](https://github.com/kubernetes/kubernetes/pull/95048), [@alculquicondor](https://github.com/alculquicondor)) [SIG Scheduling] - NodeAffinity plugin can be configured with AddedAffinity. ([kubernetes/kubernetes#96202](https://github.com/kubernetes/kubernetes/pull/96202), [@alculquicondor](https://github.com/alculquicondor)) [SIG Node, Scheduling and Testing] @@ -1661,8 +2621,8 @@ Kubernetes API Version: v1.20.11 - Add LoadBalancerIPMode feature gate ([kubernetes/kubernetes#92312](https://github.com/kubernetes/kubernetes/pull/92312), [@Sh4d1](https://github.com/Sh4d1)) [SIG Apps, CLI, Cloud Provider and Network] - Add WindowsContainerResources and Annotations to CRI-API UpdateContainerResourcesRequest ([kubernetes/kubernetes#95741](https://github.com/kubernetes/kubernetes/pull/95741), [@katiewasnothere](https://github.com/katiewasnothere)) [SIG Node] - Add a 'serving' and `terminating` condition to the EndpointSlice API. - - `serving` tracks the readiness of endpoints regardless of their terminating state. This is distinct from `ready` since `ready` is only true when pods are not terminating. + + `serving` tracks the readiness of endpoints regardless of their terminating state. This is distinct from `ready` since `ready` is only true when pods are not terminating. `terminating` is true when an endpoint is terminating. For pods this is any endpoint with a deletion timestamp. ([kubernetes/kubernetes#92968](https://github.com/kubernetes/kubernetes/pull/92968), [@andrewsykim](https://github.com/andrewsykim)) [SIG Apps and Network] - Add support for hugepages to downward API ([kubernetes/kubernetes#86102](https://github.com/kubernetes/kubernetes/pull/86102), [@derekwaynecarr](https://github.com/derekwaynecarr)) [SIG API Machinery, Apps, CLI, Network, Node, Scheduling and Testing] - Adds kubelet alpha feature, `GracefulNodeShutdown` which makes kubelet aware of node system shutdowns and result in graceful termination of pods during a system shutdown. ([kubernetes/kubernetes#96129](https://github.com/kubernetes/kubernetes/pull/96129), [@bobbypage](https://github.com/bobbypage)) [SIG Node] @@ -1681,7 +2641,7 @@ Kubernetes API Version: v1.20.11 - The feature is under feature gate `APIServerIdentity`. - A flag is added to kube-apiserver: `identity-lease-garbage-collection-check-period-seconds` ([kubernetes/kubernetes#95895](https://github.com/kubernetes/kubernetes/pull/95895), [@roycaihw](https://github.com/roycaihw)) [SIG API Machinery, Apps, Auth and Testing] - Move configurable fsgroup change policy for pods to beta ([kubernetes/kubernetes#96376](https://github.com/kubernetes/kubernetes/pull/96376), [@gnufied](https://github.com/gnufied)) [SIG Apps and Storage] -- New flag is introduced, i.e. --topology-manager-scope=container|pod. +- New flag is introduced, i.e. --topology-manager-scope=container|pod. The default value is the "container" scope. ([kubernetes/kubernetes#92967](https://github.com/kubernetes/kubernetes/pull/92967), [@cezaryzukowski](https://github.com/cezaryzukowski)) [SIG Instrumentation, Node and Testing] - NodeAffinity plugin can be configured with AddedAffinity. ([kubernetes/kubernetes#96202](https://github.com/kubernetes/kubernetes/pull/96202), [@alculquicondor](https://github.com/alculquicondor)) [SIG Node, Scheduling and Testing] - Promote RuntimeClass feature to GA. @@ -1754,7 +2714,7 @@ Kubernetes API Version: v1.19.15 - Support for the dryRun parameter has been added to the dynamic client. ([kubernetes-client/python-base#247](https://github.com/kubernetes-client/python-base/pull/247), [@gravesm](https://github.com/gravesm)) ### API Change -- We have added a new Priority & Fairness rule that exempts all probes (/readyz, /healthz, /livez) to prevent +- We have added a new Priority & Fairness rule that exempts all probes (/readyz, /healthz, /livez) to prevent restarting of "healthy" kube-apiserver instance(s) by kubelet. ([kubernetes/kubernetes#101113](https://github.com/kubernetes/kubernetes/pull/101113), [@tkashem](https://github.com/tkashem)) [SIG API Machinery] - Fixes using server-side apply with APIService resources ([kubernetes/kubernetes#100713](https://github.com/kubernetes/kubernetes/pull/100713), [@kevindelgado](https://github.com/kevindelgado)) [SIG API Machinery, Apps, Scheduling and Testing] - Regenerate protobuf code to fix CVE-2021-3121 ([kubernetes/kubernetes#100515](https://github.com/kubernetes/kubernetes/pull/100515), [@joelsmith](https://github.com/joelsmith)) [SIG API Machinery, Auth, CLI, Cloud Provider, Cluster Lifecycle, Instrumentation, Node and Storage] @@ -1795,11 +2755,11 @@ Kubernetes API Version: v1.19.15 - Scheduler: optionally check for available storage capacity before scheduling pods which have unbound volumes (alpha feature with the new `CSIStorageCapacity` feature gate, only works for CSI drivers and depends on support for the feature in a CSI driver deployment) ([kubernetes/kubernetes#92387](https://github.com/kubernetes/kubernetes/pull/92387), [@pohly](https://github.com/pohly)) [SIG API Machinery, Apps, Auth, Scheduling, Storage and Testing] - Seccomp support has graduated to GA. A new `seccompProfile` field is added to pod and container securityContext objects. Support for `seccomp.security.alpha.kubernetes.io/pod` and `container.seccomp.security.alpha.kubernetes.io/...` annotations is deprecated, and will be removed in v1.22. ([kubernetes/kubernetes#91381](https://github.com/kubernetes/kubernetes/pull/91381), [@pjbgf](https://github.com/pjbgf)) [SIG Apps, Auth, Node, Release, Scheduling and Testing] - ServiceAppProtocol feature gate is now beta and enabled by default, adding new AppProtocol field to Services and Endpoints. ([kubernetes/kubernetes#90023](https://github.com/kubernetes/kubernetes/pull/90023), [@robscott](https://github.com/robscott)) [SIG Apps and Network] -- SetHostnameAsFQDN is a new field in PodSpec. When set to true, the fully - qualified domain name (FQDN) of a Pod is set as hostname of its containers. - In Linux containers, this means setting the FQDN in the hostname field of the +- SetHostnameAsFQDN is a new field in PodSpec. When set to true, the fully + qualified domain name (FQDN) of a Pod is set as hostname of its containers. + In Linux containers, this means setting the FQDN in the hostname field of the kernel (the nodename field of struct utsname). In Windows containers, this - means setting the this means setting the registry value of hostname for the registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters to FQDN. + means setting the this means setting the registry value of hostname for the registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters to FQDN. If a pod does not have FQDN, this has no effect. ([kubernetes/kubernetes#91699](https://github.com/kubernetes/kubernetes/pull/91699), [@javidiaz](https://github.com/javidiaz)) [SIG Apps, Network, Node and Testing] - The CertificateSigningRequest API is promoted to certificates.k8s.io/v1 with the following changes: - `spec.signerName` is now required, and requests for `kubernetes.io/legacy-unknown` are not allowed to be created via the `certificates.k8s.io/v1` API @@ -1900,8 +2860,8 @@ Kubernetes API Version: v1.19.15 - Ingress: Add Exact and Prefix matching to Ingress PathTypes ([kubernetes/kubernetes#88587](https://github.com/kubernetes/kubernetes/pull/88587), [@cmluciano](https://github.com/cmluciano)) [SIG Apps, Cluster Lifecycle and Network] - Ingress: Add alternate backends via TypedLocalObjectReference ([kubernetes/kubernetes#88775](https://github.com/kubernetes/kubernetes/pull/88775), [@cmluciano](https://github.com/cmluciano)) [SIG Apps and Network] - Ingress: allow wildcard hosts in IngressRule ([kubernetes/kubernetes#88858](https://github.com/kubernetes/kubernetes/pull/88858), [@cmluciano](https://github.com/cmluciano)) [SIG Network] -- Introduces optional --detect-local flag to kube-proxy. - Currently the only supported value is "cluster-cidr", +- Introduces optional --detect-local flag to kube-proxy. + Currently the only supported value is "cluster-cidr", which is the default if not specified. ([kubernetes/kubernetes#87748](https://github.com/kubernetes/kubernetes/pull/87748), [@satyasm](https://github.com/satyasm)) [SIG Cluster Lifecycle, Network and Scheduling] - Kube-controller-manager and kube-scheduler expose profiling by default to match the kube-apiserver. Use `--profiling=false` to disable. ([kubernetes/kubernetes#88663](https://github.com/kubernetes/kubernetes/pull/88663), [@deads2k](https://github.com/deads2k)) [SIG API Machinery, Cloud Provider and Scheduling] - Kube-scheduler can run more than one scheduling profile. Given a pod, the profile is selected by using its `.spec.SchedulerName`. ([kubernetes/kubernetes#88285](https://github.com/kubernetes/kubernetes/pull/88285), [@alculquicondor](https://github.com/alculquicondor)) [SIG Apps, Scheduling and Testing] diff --git a/README.md b/README.md index c85e670f97..9066f7a6e2 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ # Kubernetes Python Client -[![Build Status](https://travis-ci.org/kubernetes-client/python.svg?branch=master)](https://travis-ci.org/kubernetes-client/python) +[![CI](https://github.com/kubernetes-client/python/workflows/Kubernetes%20Python%20Client%20-%20Validation/badge.svg)](https://github.com/kubernetes-client/python/actions/workflows/test.yaml) [![PyPI version](https://badge.fury.io/py/kubernetes.svg)](https://badge.fury.io/py/kubernetes) [![codecov](https://codecov.io/gh/kubernetes-client/python/branch/master/graph/badge.svg)](https://codecov.io/gh/kubernetes-client/python "Non-generated packages only") [![pypi supported versions](https://img.shields.io/pypi/pyversions/kubernetes.svg)](https://pypi.python.org/pypi/kubernetes) -[![Client Capabilities](https://img.shields.io/badge/Kubernetes%20client-Silver-blue.svg?style=flat&colorB=C0C0C0&colorA=306CE8)](http://bit.ly/kubernetes-client-capabilities-badge) -[![Client Support Level](https://img.shields.io/badge/kubernetes%20client-beta-green.svg?style=flat&colorA=306CE8)](http://bit.ly/kubernetes-client-support-badge) +[![Client Capabilities](https://img.shields.io/badge/Kubernetes%20client-Silver-blue.svg?style=flat&colorB=C0C0C0&colorA=306CE8)](https://github.com/kubernetes/design-proposals-archive/blob/main/api-machinery/csi-new-client-library-procedure.md) +[![Client Support Level](https://img.shields.io/badge/kubernetes%20client-beta-green.svg?style=flat&colorA=306CE8)](https://github.com/kubernetes/design-proposals-archive/blob/main/api-machinery/csi-new-client-library-procedure.md) Python client for the [kubernetes](http://kubernetes.io/) API. @@ -16,7 +16,7 @@ From source: ``` git clone --recursive https://github.com/kubernetes-client/python.git cd python -python setup.py install +python -m pip install --upgrade . ``` From [PyPI](https://pypi.python.org/pypi/kubernetes/) directly: @@ -100,6 +100,11 @@ supported versions of Kubernetes clusters. - [client 28.y.z](https://pypi.org/project/kubernetes/28.1.0/): Kubernetes 1.27 or below (+-), Kubernetes 1.28 (✓), Kubernetes 1.29 or above (+-) - [client 29.y.z](https://pypi.org/project/kubernetes/29.0.0/): Kubernetes 1.28 or below (+-), Kubernetes 1.29 (✓), Kubernetes 1.30 or above (+-) - [client 30.y.z](https://pypi.org/project/kubernetes/30.1.0/): Kubernetes 1.29 or below (+-), Kubernetes 1.30 (✓), Kubernetes 1.31 or above (+-) +- [client 31.y.z](https://pypi.org/project/kubernetes/31.0.0/): Kubernetes 1.30 or below (+-), Kubernetes 1.31 (✓), Kubernetes 1.32 or above (+-) +- [client 32.y.z](https://pypi.org/project/kubernetes/32.0.1/): Kubernetes 1.31 or below (+-), Kubernetes 1.32 (✓), Kubernetes 1.33 or above (+-) +- [client 33.y.z](https://pypi.org/project/kubernetes/33.1.0/): Kubernetes 1.32 or below (+-), Kubernetes 1.33 (✓), Kubernetes 1.34 or above (+-) +- [client 34.y.z](https://pypi.org/project/kubernetes/34.1.0/): Kubernetes 1.33 or below (+-), Kubernetes 1.34 (✓), Kubernetes 1.35 or above (+-) +- [client 35.y.z](https://pypi.org/project/kubernetes/35.0.0/): Kubernetes 1.34 or below (+-), Kubernetes 1.35 (✓), Kubernetes 1.36 or above (+-) > See [here](#homogenizing-the-kubernetes-python-client-versions) for an explanation of why there is no v13-v16 release. @@ -160,11 +165,21 @@ between client-python versions. | 27.0 Alpha/Beta | Kubernetes main repo, 1.27 branch | ✗ | | 27.0 | Kubernetes main repo, 1.27 branch | ✗ | | 28.0 Alpha/Beta | Kubernetes main repo, 1.28 branch | ✗ | -| 28.0 | Kubernetes main repo, 1.28 branch | ✓ | +| 28.0 | Kubernetes main repo, 1.28 branch | ✗ | | 29.0 Alpha/Beta | Kubernetes main repo, 1.29 branch | ✗ | -| 29.0 | Kubernetes main repo, 1.29 branch | ✓ | +| 29.0 | Kubernetes main repo, 1.29 branch | ✗ | | 30.0 Alpha/Beta | Kubernetes main repo, 1.30 branch | ✗ | -| 30.0 | Kubernetes main repo, 1.30 branch | ✓ | +| 30.0 | Kubernetes main repo, 1.30 branch | ✗ | +| 31.0 Alpha/Beta | Kubernetes main repo, 1.31 branch | ✗ | +| 31.0 | Kubernetes main repo, 1.31 branch | ✗ | +| 32.0 Alpha/Beta | Kubernetes main repo, 1.32 branch | ✗ | +| 32.1 | Kubernetes main repo, 1.32 branch | ✗ | +| 33.1 Alpha/Beta | Kubernetes main repo, 1.33 branch | ✗ | +| 33.1 | Kubernetes main repo, 1.33 branch | ✓ | +| 34.1 Alpha/Beta | Kubernetes main repo, 1.34 branch | ✗ | +| 34.1 | Kubernetes main repo, 1.34 branch | ✓ | +| 35.0 Alpha/Beta | Kubernetes main repo, 1.35 branch | ✗ | +| 35.0 | Kubernetes main repo, 1.35 branch | ✓ | > See [here](#homogenizing-the-kubernetes-python-client-versions) for an explanation of why there is no v13-v16 release. @@ -183,7 +198,7 @@ Note: There would be no maintenance for alpha/beta releases except the latest on The client releases v12 and before following a versioning schema where the major version was 4 integer positions behind the Kubernetes minor on which the client is based on. For example, v12.0.0 is based on Kubernetes v1.16, v11.0.0 is based on Kubernetes v1.15 and so on. -This created a lot of confusion tracking two different version numbers for each client release. It was decided to homogenize the version scheme starting from the Kubernetes Python client based on Kubernetes v1.17. The versioning scheme of the client from this release would be vY.Z.P where Y and Z are the Kubernetes minor and patch release numbers from Kubernets v1.Y.Z and P is the client specific patch release numbers to accommodate changes and fixes done specifically to the client. For more details, refer [this issue](https://github.com/kubernetes-client/python/issues/1244). +This created a lot of confusion tracking two different version numbers for each client release. It was decided to homogenize the version scheme starting from the Kubernetes Python client based on Kubernetes v1.17. The versioning scheme of the client from this release would be vY.Z.P where Y and Z are the Kubernetes minor and patch release numbers from Kubernetes v1.Y.Z and P is the client specific patch release numbers to accommodate changes and fixes done specifically to the client. For more details, refer [this issue](https://github.com/kubernetes-client/python/issues/1244). ## Community, Support, Discussion @@ -230,4 +245,20 @@ recreate it between api calls that use _stream_ and other api calls. See more at [exec example](examples/pod_exec.py). +## Enabling Debug Logging + +To enable debug logging in the Kubernetes Python client, follow these steps: + +### 1. Import the `logging` module + +```python +import logging + +# Set the logging level to DEBUG +logging.basicConfig(level=logging.DEBUG) + +# To see the HTTP requests and responses sent to the Kubernetes API (for debugging network-related issues), configure the urllib3 logger: +logging.getLogger("urllib3").setLevel(logging.DEBUG) +``` + **[⬆ back to top](#Installation)** diff --git a/devel/debug_logging.md b/devel/debug_logging.md new file mode 100644 index 0000000000..966e3d38e4 --- /dev/null +++ b/devel/debug_logging.md @@ -0,0 +1,34 @@ +# Enabling Debug Logging in Kubernetes Python Client + +This document describes how to enable debug logging, view logged information, and provides examples for creating, patching, and deleting Kubernetes resources. + +## 1. Why Enable Debug Logging? + +Debug logging is useful for troubleshooting as it shows details like HTTP request and response headers and bodies. These details can help identify issues during interactions with the Kubernetes API server. + +--- + +## 2. Enabling Debug Logging + +To enable debug logging in the Kubernetes Python client, follow these steps: + +1. **Modify the Configuration Object:** + Enable debug mode by setting the `debug` attribute of the `client.Configuration` object to `True`. + +2. **Example Code to Enable Debug Logging:** + Below is an example showing how to enable debug logging: + ```python + from kubernetes import client, config + + # Load kube config + config.load_kube_config() + + # Enable debug logging + c = client.Configuration() + c.debug = True + + # Pass the updated configuration to the API client + api_client = client.ApiClient(configuration=c) + + # Use the API client with debug logging enabled + apps_v1 = client.AppsV1Api(api_client=api_client) diff --git a/devel/patch_types.md b/devel/patch_types.md new file mode 100644 index 0000000000..ac1395934a --- /dev/null +++ b/devel/patch_types.md @@ -0,0 +1,315 @@ +# Introduction to Kubernetes Patch Types +In Kubernetes, patches are a way to make updates or changes to resources (like Pods, ConfigMaps, Deployments, etc.) without having to replace the entire resource. Patches allow you to modify specific parts of a resource while leaving the rest unchanged. + +## Types of Kubernetes Patches + +There are several types of patches that Kubernetes supports: + +1. JSON Merge Patch (Standard JSON Patch) +2. Strategic Merge Patch +3. JSON Patch +4. Apply Patch (Server-Side Apply) + +## 1. JSON Merge Patch +- JSON Merge Patch is based on the concept of merging JSON objects. When you apply a patch, you only need to specify the changes you want to make. Kubernetes will take your partial update and merge it with the existing resource. + +- This patch type is simple and works well when you need to update fields, such as changing a value or adding a new key. + + +### Example Scenario: +Imagine you have a Kubernetes Pod resource that looks like this: + +``` +apiVersion: v1 +kind: Pod +metadata: + name: mypod +spec: + containers: + - name: nginx + image: nginx:1.14 + - name: redis + image: redis:5 +``` +Now, you want to change the image of the nginx container from nginx:1.14 to nginx:1.16. Instead of sending the entire resource, you can send only the part you want to change, like this: +``` +{ + "spec": { + "containers": [ + { + "name": "nginx", + "image": "nginx:1.16" + } + ] + } +} +``` + +When you send this patch to Kubernetes: + +It will replace the image of the nginx container with the new one (nginx:1.16). +It will leave the redis container unchanged, because it's not included in the patch. + +### Example Code (Python): +``` +from kubernetes import client, config + +def main(): + config.load_kube_config() + v1 = client.CoreV1Api() + + namespace = "default" + name = "mypod" + + patch = { + "spec": { + "containers": [ + { + "name": "nginx", + "image": "nginx:1.16" + } + ] + } + } + + v1.patch_namespaced_pod(name=name, namespace=namespace, body=patch, content_type="application/merge-patch+json") + +if __name__ == "__main__": + main() + +``` + +### After the JSON Merge patch + +``` +apiVersion: v1 +kind: Pod +metadata: + name: mypod +spec: + containers: + - name: nginx + image: nginx:1.16 # Updated image version + - name: redis + image: redis:5 # Unchanged +``` + + +## 2. Strategic Merge Patch +Strategic Merge Patch is another type of patching mechanism, mostly used in Kubernetes, that allows updates to objects in a way that is more aware of the structure and semantics of the resource being modified. It is strategic because it understands the structure of the object, rather than blindly replacing it, and applies the changes in a smart way. +- The patch itself is typically a JSON or YAML object, which contains the fields to be updated +- **Adds New Fields:** You can use it to add new fields or modify existing ones without affecting the rest of the object. +- **Handle Lists or Arrays:** When dealing with lists (e.g., arrays or dictionaries), Strategic Merge Patch handles merging and updates intelligently. + +### Example of Strategic Merge Patch: +let's suppose we have a yaml file Target Resource (Kubernetes ConfigMap): + +``` +apiVersion: v1 +kind: ConfigMap +metadata: + name: my-configmap +data: + key1: value1 + key2: value2 + list1: + - item1 + - item2 + +``` + +Strategic Merge Patch +``` +data: + key1: updated_value1 # Update key1 + key3: value3 # Add new key3 + list1: + - item1 + - item2 + - item3 # Add item3 to list1 + +``` + +Result after Strategic Merge Patch + +``` +apiVersion: v1 +kind: ConfigMap +metadata: + name: my-configmap +data: + key1: updated_value1 # key1 is updated + key2: value2 # key2 is unchanged + key3: value3 # key3 is added + list1: + - item1 + - item2 + - item3 # item3 is added to list1 + + +``` + + +## 3. JSON Patch +- JSON Patch is a standard format that specifies a way to apply updates to a JSON document. Instead of sending a new or merged version of the object, JSON Patch describes how to modify the object step-by-step. +- Operation-Based: A JSON Patch is an array of operations that describe modifications to a target JSON object. +- Ideal when you need to perform multiple, specific operations on resource fields (e.g., replacing a value, adding new fields, or deleting specific values). + +### Patch Structure: +A JSON Patch is an array of operations. Each operation is an object with: +• op: The operation type (e.g., add, remove, replace, etc.). +• path: A JSON Pointer string (defined in RFC 6901) that specifies the location in the document to apply the operation. +• value: (Optional) The new value to apply (used with operations like add, replace, or test). +• from: (Optional) Used in operations like move and copy to specify the source path. + +### Supported Operations for JSON Patch + +#### 1. **add** +- Adds a value to a specified path. +- If the path already exists, it adds the value to a list or object. + +Example: +```json +{ "op": "add", "path": "/a/b/c", "value": "foo" } +``` + +#### 2. **remove** +- Removes the value at the specified path. + +Example: +```json +{ "op": "remove", "path": "/a/b/c" } +``` + +#### 3. **replace** +- Replaces the value at the specified path. +- Functionally similar to remove followed by add. + +Example: +```json +{ "op": "replace", "path": "/a/b/c", "value": "bar" } +``` + +#### 4. **move** +- Moves a value from one path to another. + +Example: +```json +{ "op": "move", "from": "/a/b/c", "path": "/x/y/z" } +``` + +#### 5. **copy** +- Copies a value from one path to another. + +Example: +```json +{ "op": "copy", "from": "/a/b/c", "path": "/x/y/z" } +``` + +#### 6. **test** +- Tests whether a value at a specified path matches a given value. +- Used for validation in transactional updates. + +Example: +```json +{ "op": "test", "path": "/a/b/c", "value": "foo" } +``` + +--- + +#### Example: Applying a JSON Patch + +##### Target JSON Document: +```json +{ + "a": { + "b": { + "c": "foo" + } + }, + "x": { + "y": "bar" + } +} +``` + +##### JSON Patch: +```json +[ + { "op": "replace", "path": "/a/b/c", "value": "baz" }, + { "op": "add", "path": "/a/d", "value": ["new", "value"] }, + { "op": "remove", "path": "/x/y" } +] +``` + +##### Result: +```json +{ + "a": { + "b": { + "c": "baz" + }, + "d": ["new", "value"] + }, + "x": {} +} +``` + + +## 4. Apply Patch (Server-Side Apply) +Server-Side Apply is a feature in Kubernetes that allows you to declaratively update resources by specifying their desired state. It provides an intuitive and robust way to manage resources without having to manually modify every field. It tracks which fields belong to which manager, which helps prevent conflicts when multiple clients (such as different controllers or users) update the same resource. + +Key Features: +- Declarative Management: You provide the desired final state, and Kubernetes ensures the actual state matches it. +- Conflict Detection: Ensures changes from different clients don’t conflict with each other. +- Field Ownership: Kubernetes tracks which client or manager owns which fields of a resource. + +##### Example Scenario: + +You have a ConfigMap and want to update certain keys but leave others unchanged. +``` +apiVersion: v1 +kind: ConfigMap +metadata: + name: example-config + namespace: default +data: + key1: value1 + key2: value2 +``` +**Goal:** +- You want to update key2 to new_value2 and +- add a new key key3 with a value value3. +- leave key1 unchanged + +##### Apply Patch YAML(Desired State): +``` +apiVersion: v1 +kind: ConfigMap +metadata: + name: example-config + namespace: default +data: + key2: new_value2 # Update existing key + key3: value3 # Add new key + +``` + +##### Resulting ConfigMap (after apply): +``` +apiVersion: v1 +kind: ConfigMap +metadata: + name: example-config + namespace: default +data: + key1: value1 # Remains unchanged + key2: new_value2 # Updated value + key3: value3 # New key added + +``` + + + + + diff --git a/doc/Makefile b/doc/Makefile index 2a47429fc4..43a65ce4be 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -15,13 +15,8 @@ help: .PHONY: help Makefile -# additional step to use sphinx-apidoc to generate rst files for APIs -rst: - rm -f $(SOURCEDIR)/kubernetes.*.rst - $(SPHINXAPIDOC) -o "$(SOURCEDIR)" ../kubernetes/ -e -f - # Catch-all target: route all unknown targets to Sphinx using the new # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). -html: rst +html: $(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) @echo "\nDocs rendered successfully, open _/build/html/index.html to view" diff --git a/doc/patch_types.md b/doc/patch_types.md new file mode 100644 index 0000000000..ac1395934a --- /dev/null +++ b/doc/patch_types.md @@ -0,0 +1,315 @@ +# Introduction to Kubernetes Patch Types +In Kubernetes, patches are a way to make updates or changes to resources (like Pods, ConfigMaps, Deployments, etc.) without having to replace the entire resource. Patches allow you to modify specific parts of a resource while leaving the rest unchanged. + +## Types of Kubernetes Patches + +There are several types of patches that Kubernetes supports: + +1. JSON Merge Patch (Standard JSON Patch) +2. Strategic Merge Patch +3. JSON Patch +4. Apply Patch (Server-Side Apply) + +## 1. JSON Merge Patch +- JSON Merge Patch is based on the concept of merging JSON objects. When you apply a patch, you only need to specify the changes you want to make. Kubernetes will take your partial update and merge it with the existing resource. + +- This patch type is simple and works well when you need to update fields, such as changing a value or adding a new key. + + +### Example Scenario: +Imagine you have a Kubernetes Pod resource that looks like this: + +``` +apiVersion: v1 +kind: Pod +metadata: + name: mypod +spec: + containers: + - name: nginx + image: nginx:1.14 + - name: redis + image: redis:5 +``` +Now, you want to change the image of the nginx container from nginx:1.14 to nginx:1.16. Instead of sending the entire resource, you can send only the part you want to change, like this: +``` +{ + "spec": { + "containers": [ + { + "name": "nginx", + "image": "nginx:1.16" + } + ] + } +} +``` + +When you send this patch to Kubernetes: + +It will replace the image of the nginx container with the new one (nginx:1.16). +It will leave the redis container unchanged, because it's not included in the patch. + +### Example Code (Python): +``` +from kubernetes import client, config + +def main(): + config.load_kube_config() + v1 = client.CoreV1Api() + + namespace = "default" + name = "mypod" + + patch = { + "spec": { + "containers": [ + { + "name": "nginx", + "image": "nginx:1.16" + } + ] + } + } + + v1.patch_namespaced_pod(name=name, namespace=namespace, body=patch, content_type="application/merge-patch+json") + +if __name__ == "__main__": + main() + +``` + +### After the JSON Merge patch + +``` +apiVersion: v1 +kind: Pod +metadata: + name: mypod +spec: + containers: + - name: nginx + image: nginx:1.16 # Updated image version + - name: redis + image: redis:5 # Unchanged +``` + + +## 2. Strategic Merge Patch +Strategic Merge Patch is another type of patching mechanism, mostly used in Kubernetes, that allows updates to objects in a way that is more aware of the structure and semantics of the resource being modified. It is strategic because it understands the structure of the object, rather than blindly replacing it, and applies the changes in a smart way. +- The patch itself is typically a JSON or YAML object, which contains the fields to be updated +- **Adds New Fields:** You can use it to add new fields or modify existing ones without affecting the rest of the object. +- **Handle Lists or Arrays:** When dealing with lists (e.g., arrays or dictionaries), Strategic Merge Patch handles merging and updates intelligently. + +### Example of Strategic Merge Patch: +let's suppose we have a yaml file Target Resource (Kubernetes ConfigMap): + +``` +apiVersion: v1 +kind: ConfigMap +metadata: + name: my-configmap +data: + key1: value1 + key2: value2 + list1: + - item1 + - item2 + +``` + +Strategic Merge Patch +``` +data: + key1: updated_value1 # Update key1 + key3: value3 # Add new key3 + list1: + - item1 + - item2 + - item3 # Add item3 to list1 + +``` + +Result after Strategic Merge Patch + +``` +apiVersion: v1 +kind: ConfigMap +metadata: + name: my-configmap +data: + key1: updated_value1 # key1 is updated + key2: value2 # key2 is unchanged + key3: value3 # key3 is added + list1: + - item1 + - item2 + - item3 # item3 is added to list1 + + +``` + + +## 3. JSON Patch +- JSON Patch is a standard format that specifies a way to apply updates to a JSON document. Instead of sending a new or merged version of the object, JSON Patch describes how to modify the object step-by-step. +- Operation-Based: A JSON Patch is an array of operations that describe modifications to a target JSON object. +- Ideal when you need to perform multiple, specific operations on resource fields (e.g., replacing a value, adding new fields, or deleting specific values). + +### Patch Structure: +A JSON Patch is an array of operations. Each operation is an object with: +• op: The operation type (e.g., add, remove, replace, etc.). +• path: A JSON Pointer string (defined in RFC 6901) that specifies the location in the document to apply the operation. +• value: (Optional) The new value to apply (used with operations like add, replace, or test). +• from: (Optional) Used in operations like move and copy to specify the source path. + +### Supported Operations for JSON Patch + +#### 1. **add** +- Adds a value to a specified path. +- If the path already exists, it adds the value to a list or object. + +Example: +```json +{ "op": "add", "path": "/a/b/c", "value": "foo" } +``` + +#### 2. **remove** +- Removes the value at the specified path. + +Example: +```json +{ "op": "remove", "path": "/a/b/c" } +``` + +#### 3. **replace** +- Replaces the value at the specified path. +- Functionally similar to remove followed by add. + +Example: +```json +{ "op": "replace", "path": "/a/b/c", "value": "bar" } +``` + +#### 4. **move** +- Moves a value from one path to another. + +Example: +```json +{ "op": "move", "from": "/a/b/c", "path": "/x/y/z" } +``` + +#### 5. **copy** +- Copies a value from one path to another. + +Example: +```json +{ "op": "copy", "from": "/a/b/c", "path": "/x/y/z" } +``` + +#### 6. **test** +- Tests whether a value at a specified path matches a given value. +- Used for validation in transactional updates. + +Example: +```json +{ "op": "test", "path": "/a/b/c", "value": "foo" } +``` + +--- + +#### Example: Applying a JSON Patch + +##### Target JSON Document: +```json +{ + "a": { + "b": { + "c": "foo" + } + }, + "x": { + "y": "bar" + } +} +``` + +##### JSON Patch: +```json +[ + { "op": "replace", "path": "/a/b/c", "value": "baz" }, + { "op": "add", "path": "/a/d", "value": ["new", "value"] }, + { "op": "remove", "path": "/x/y" } +] +``` + +##### Result: +```json +{ + "a": { + "b": { + "c": "baz" + }, + "d": ["new", "value"] + }, + "x": {} +} +``` + + +## 4. Apply Patch (Server-Side Apply) +Server-Side Apply is a feature in Kubernetes that allows you to declaratively update resources by specifying their desired state. It provides an intuitive and robust way to manage resources without having to manually modify every field. It tracks which fields belong to which manager, which helps prevent conflicts when multiple clients (such as different controllers or users) update the same resource. + +Key Features: +- Declarative Management: You provide the desired final state, and Kubernetes ensures the actual state matches it. +- Conflict Detection: Ensures changes from different clients don’t conflict with each other. +- Field Ownership: Kubernetes tracks which client or manager owns which fields of a resource. + +##### Example Scenario: + +You have a ConfigMap and want to update certain keys but leave others unchanged. +``` +apiVersion: v1 +kind: ConfigMap +metadata: + name: example-config + namespace: default +data: + key1: value1 + key2: value2 +``` +**Goal:** +- You want to update key2 to new_value2 and +- add a new key key3 with a value value3. +- leave key1 unchanged + +##### Apply Patch YAML(Desired State): +``` +apiVersion: v1 +kind: ConfigMap +metadata: + name: example-config + namespace: default +data: + key2: new_value2 # Update existing key + key3: value3 # Add new key + +``` + +##### Resulting ConfigMap (after apply): +``` +apiVersion: v1 +kind: ConfigMap +metadata: + name: example-config + namespace: default +data: + key1: value1 # Remains unchanged + key2: new_value2 # Updated value + key3: value3 # New key added + +``` + + + + + diff --git a/doc/source/installation.rst b/doc/source/installation.rst deleted file mode 100644 index dccc298ee5..0000000000 --- a/doc/source/installation.rst +++ /dev/null @@ -1,12 +0,0 @@ -============ -Installation -============ - -At the command line:: - - $ pip install kubernetes - -Or, if you have virtualenvwrapper installed:: - - $ mkvirtualenv kubernetes - $ pip install kubernetes diff --git a/doc/source/kubernetes.client.api.admissionregistration_api.rst b/doc/source/kubernetes.client.api.admissionregistration_api.rst deleted file mode 100644 index 20efccce67..0000000000 --- a/doc/source/kubernetes.client.api.admissionregistration_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.api.admissionregistration\_api module -======================================================= - -.. automodule:: kubernetes.client.api.admissionregistration_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.api.admissionregistration_v1_api.rst b/doc/source/kubernetes.client.api.admissionregistration_v1_api.rst deleted file mode 100644 index 2765477e1c..0000000000 --- a/doc/source/kubernetes.client.api.admissionregistration_v1_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.api.admissionregistration\_v1\_api module -=========================================================== - -.. automodule:: kubernetes.client.api.admissionregistration_v1_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.api.admissionregistration_v1alpha1_api.rst b/doc/source/kubernetes.client.api.admissionregistration_v1alpha1_api.rst deleted file mode 100644 index 0cdfbd64ae..0000000000 --- a/doc/source/kubernetes.client.api.admissionregistration_v1alpha1_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.api.admissionregistration\_v1alpha1\_api module -================================================================= - -.. automodule:: kubernetes.client.api.admissionregistration_v1alpha1_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.api.admissionregistration_v1beta1_api.rst b/doc/source/kubernetes.client.api.admissionregistration_v1beta1_api.rst deleted file mode 100644 index ac86e1c673..0000000000 --- a/doc/source/kubernetes.client.api.admissionregistration_v1beta1_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.api.admissionregistration\_v1beta1\_api module -================================================================ - -.. automodule:: kubernetes.client.api.admissionregistration_v1beta1_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.api.apiextensions_api.rst b/doc/source/kubernetes.client.api.apiextensions_api.rst deleted file mode 100644 index cfb0c19336..0000000000 --- a/doc/source/kubernetes.client.api.apiextensions_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.api.apiextensions\_api module -=============================================== - -.. automodule:: kubernetes.client.api.apiextensions_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.api.apiextensions_v1_api.rst b/doc/source/kubernetes.client.api.apiextensions_v1_api.rst deleted file mode 100644 index 054fac937d..0000000000 --- a/doc/source/kubernetes.client.api.apiextensions_v1_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.api.apiextensions\_v1\_api module -=================================================== - -.. automodule:: kubernetes.client.api.apiextensions_v1_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.api.apiregistration_api.rst b/doc/source/kubernetes.client.api.apiregistration_api.rst deleted file mode 100644 index 87f79d675f..0000000000 --- a/doc/source/kubernetes.client.api.apiregistration_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.api.apiregistration\_api module -================================================= - -.. automodule:: kubernetes.client.api.apiregistration_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.api.apiregistration_v1_api.rst b/doc/source/kubernetes.client.api.apiregistration_v1_api.rst deleted file mode 100644 index 21afdd3c1b..0000000000 --- a/doc/source/kubernetes.client.api.apiregistration_v1_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.api.apiregistration\_v1\_api module -===================================================== - -.. automodule:: kubernetes.client.api.apiregistration_v1_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.api.apis_api.rst b/doc/source/kubernetes.client.api.apis_api.rst deleted file mode 100644 index 25bac26369..0000000000 --- a/doc/source/kubernetes.client.api.apis_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.api.apis\_api module -====================================== - -.. automodule:: kubernetes.client.api.apis_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.api.apps_api.rst b/doc/source/kubernetes.client.api.apps_api.rst deleted file mode 100644 index 77155bc073..0000000000 --- a/doc/source/kubernetes.client.api.apps_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.api.apps\_api module -====================================== - -.. automodule:: kubernetes.client.api.apps_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.api.apps_v1_api.rst b/doc/source/kubernetes.client.api.apps_v1_api.rst deleted file mode 100644 index 8232a0cc7c..0000000000 --- a/doc/source/kubernetes.client.api.apps_v1_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.api.apps\_v1\_api module -========================================== - -.. automodule:: kubernetes.client.api.apps_v1_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.api.authentication_api.rst b/doc/source/kubernetes.client.api.authentication_api.rst deleted file mode 100644 index 49aa1dad55..0000000000 --- a/doc/source/kubernetes.client.api.authentication_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.api.authentication\_api module -================================================ - -.. automodule:: kubernetes.client.api.authentication_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.api.authentication_v1_api.rst b/doc/source/kubernetes.client.api.authentication_v1_api.rst deleted file mode 100644 index 897ab4d964..0000000000 --- a/doc/source/kubernetes.client.api.authentication_v1_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.api.authentication\_v1\_api module -==================================================== - -.. automodule:: kubernetes.client.api.authentication_v1_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.api.authentication_v1alpha1_api.rst b/doc/source/kubernetes.client.api.authentication_v1alpha1_api.rst deleted file mode 100644 index ab2a5f5e60..0000000000 --- a/doc/source/kubernetes.client.api.authentication_v1alpha1_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.api.authentication\_v1alpha1\_api module -========================================================== - -.. automodule:: kubernetes.client.api.authentication_v1alpha1_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.api.authentication_v1beta1_api.rst b/doc/source/kubernetes.client.api.authentication_v1beta1_api.rst deleted file mode 100644 index 120457cb0f..0000000000 --- a/doc/source/kubernetes.client.api.authentication_v1beta1_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.api.authentication\_v1beta1\_api module -========================================================= - -.. automodule:: kubernetes.client.api.authentication_v1beta1_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.api.authorization_api.rst b/doc/source/kubernetes.client.api.authorization_api.rst deleted file mode 100644 index 7d2342f8da..0000000000 --- a/doc/source/kubernetes.client.api.authorization_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.api.authorization\_api module -=============================================== - -.. automodule:: kubernetes.client.api.authorization_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.api.authorization_v1_api.rst b/doc/source/kubernetes.client.api.authorization_v1_api.rst deleted file mode 100644 index ecbdc35018..0000000000 --- a/doc/source/kubernetes.client.api.authorization_v1_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.api.authorization\_v1\_api module -=================================================== - -.. automodule:: kubernetes.client.api.authorization_v1_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.api.autoscaling_api.rst b/doc/source/kubernetes.client.api.autoscaling_api.rst deleted file mode 100644 index 2a9c195004..0000000000 --- a/doc/source/kubernetes.client.api.autoscaling_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.api.autoscaling\_api module -============================================= - -.. automodule:: kubernetes.client.api.autoscaling_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.api.autoscaling_v1_api.rst b/doc/source/kubernetes.client.api.autoscaling_v1_api.rst deleted file mode 100644 index 4d49f26b10..0000000000 --- a/doc/source/kubernetes.client.api.autoscaling_v1_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.api.autoscaling\_v1\_api module -================================================= - -.. automodule:: kubernetes.client.api.autoscaling_v1_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.api.autoscaling_v2_api.rst b/doc/source/kubernetes.client.api.autoscaling_v2_api.rst deleted file mode 100644 index 658f5ab679..0000000000 --- a/doc/source/kubernetes.client.api.autoscaling_v2_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.api.autoscaling\_v2\_api module -================================================= - -.. automodule:: kubernetes.client.api.autoscaling_v2_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.api.batch_api.rst b/doc/source/kubernetes.client.api.batch_api.rst deleted file mode 100644 index a5f150d6d5..0000000000 --- a/doc/source/kubernetes.client.api.batch_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.api.batch\_api module -======================================= - -.. automodule:: kubernetes.client.api.batch_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.api.batch_v1_api.rst b/doc/source/kubernetes.client.api.batch_v1_api.rst deleted file mode 100644 index 485d246c19..0000000000 --- a/doc/source/kubernetes.client.api.batch_v1_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.api.batch\_v1\_api module -=========================================== - -.. automodule:: kubernetes.client.api.batch_v1_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.api.certificates_api.rst b/doc/source/kubernetes.client.api.certificates_api.rst deleted file mode 100644 index d1b5dd412d..0000000000 --- a/doc/source/kubernetes.client.api.certificates_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.api.certificates\_api module -============================================== - -.. automodule:: kubernetes.client.api.certificates_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.api.certificates_v1_api.rst b/doc/source/kubernetes.client.api.certificates_v1_api.rst deleted file mode 100644 index c384274850..0000000000 --- a/doc/source/kubernetes.client.api.certificates_v1_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.api.certificates\_v1\_api module -================================================== - -.. automodule:: kubernetes.client.api.certificates_v1_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.api.certificates_v1alpha1_api.rst b/doc/source/kubernetes.client.api.certificates_v1alpha1_api.rst deleted file mode 100644 index aee90ba99f..0000000000 --- a/doc/source/kubernetes.client.api.certificates_v1alpha1_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.api.certificates\_v1alpha1\_api module -======================================================== - -.. automodule:: kubernetes.client.api.certificates_v1alpha1_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.api.coordination_api.rst b/doc/source/kubernetes.client.api.coordination_api.rst deleted file mode 100644 index f0fdc27c4f..0000000000 --- a/doc/source/kubernetes.client.api.coordination_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.api.coordination\_api module -============================================== - -.. automodule:: kubernetes.client.api.coordination_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.api.coordination_v1_api.rst b/doc/source/kubernetes.client.api.coordination_v1_api.rst deleted file mode 100644 index eddd3861dc..0000000000 --- a/doc/source/kubernetes.client.api.coordination_v1_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.api.coordination\_v1\_api module -================================================== - -.. automodule:: kubernetes.client.api.coordination_v1_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.api.core_api.rst b/doc/source/kubernetes.client.api.core_api.rst deleted file mode 100644 index 5499d14efc..0000000000 --- a/doc/source/kubernetes.client.api.core_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.api.core\_api module -====================================== - -.. automodule:: kubernetes.client.api.core_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.api.core_v1_api.rst b/doc/source/kubernetes.client.api.core_v1_api.rst deleted file mode 100644 index 5ffd09bcae..0000000000 --- a/doc/source/kubernetes.client.api.core_v1_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.api.core\_v1\_api module -========================================== - -.. automodule:: kubernetes.client.api.core_v1_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.api.custom_objects_api.rst b/doc/source/kubernetes.client.api.custom_objects_api.rst deleted file mode 100644 index 439765fba1..0000000000 --- a/doc/source/kubernetes.client.api.custom_objects_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.api.custom\_objects\_api module -================================================= - -.. automodule:: kubernetes.client.api.custom_objects_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.api.discovery_api.rst b/doc/source/kubernetes.client.api.discovery_api.rst deleted file mode 100644 index 334f12fff7..0000000000 --- a/doc/source/kubernetes.client.api.discovery_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.api.discovery\_api module -=========================================== - -.. automodule:: kubernetes.client.api.discovery_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.api.discovery_v1_api.rst b/doc/source/kubernetes.client.api.discovery_v1_api.rst deleted file mode 100644 index a3757a39bd..0000000000 --- a/doc/source/kubernetes.client.api.discovery_v1_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.api.discovery\_v1\_api module -=============================================== - -.. automodule:: kubernetes.client.api.discovery_v1_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.api.events_api.rst b/doc/source/kubernetes.client.api.events_api.rst deleted file mode 100644 index 33ebe3556a..0000000000 --- a/doc/source/kubernetes.client.api.events_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.api.events\_api module -======================================== - -.. automodule:: kubernetes.client.api.events_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.api.events_v1_api.rst b/doc/source/kubernetes.client.api.events_v1_api.rst deleted file mode 100644 index 9769a854b0..0000000000 --- a/doc/source/kubernetes.client.api.events_v1_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.api.events\_v1\_api module -============================================ - -.. automodule:: kubernetes.client.api.events_v1_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.api.flowcontrol_apiserver_api.rst b/doc/source/kubernetes.client.api.flowcontrol_apiserver_api.rst deleted file mode 100644 index f5bd6e2a44..0000000000 --- a/doc/source/kubernetes.client.api.flowcontrol_apiserver_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.api.flowcontrol\_apiserver\_api module -======================================================== - -.. automodule:: kubernetes.client.api.flowcontrol_apiserver_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.api.flowcontrol_apiserver_v1_api.rst b/doc/source/kubernetes.client.api.flowcontrol_apiserver_v1_api.rst deleted file mode 100644 index aafec6ad74..0000000000 --- a/doc/source/kubernetes.client.api.flowcontrol_apiserver_v1_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.api.flowcontrol\_apiserver\_v1\_api module -============================================================ - -.. automodule:: kubernetes.client.api.flowcontrol_apiserver_v1_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.api.flowcontrol_apiserver_v1beta3_api.rst b/doc/source/kubernetes.client.api.flowcontrol_apiserver_v1beta3_api.rst deleted file mode 100644 index 38bbf8fad5..0000000000 --- a/doc/source/kubernetes.client.api.flowcontrol_apiserver_v1beta3_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.api.flowcontrol\_apiserver\_v1beta3\_api module -================================================================= - -.. automodule:: kubernetes.client.api.flowcontrol_apiserver_v1beta3_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.api.internal_apiserver_api.rst b/doc/source/kubernetes.client.api.internal_apiserver_api.rst deleted file mode 100644 index 58a5c05d35..0000000000 --- a/doc/source/kubernetes.client.api.internal_apiserver_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.api.internal\_apiserver\_api module -===================================================== - -.. automodule:: kubernetes.client.api.internal_apiserver_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.api.internal_apiserver_v1alpha1_api.rst b/doc/source/kubernetes.client.api.internal_apiserver_v1alpha1_api.rst deleted file mode 100644 index daa18ba681..0000000000 --- a/doc/source/kubernetes.client.api.internal_apiserver_v1alpha1_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.api.internal\_apiserver\_v1alpha1\_api module -=============================================================== - -.. automodule:: kubernetes.client.api.internal_apiserver_v1alpha1_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.api.logs_api.rst b/doc/source/kubernetes.client.api.logs_api.rst deleted file mode 100644 index 616ecc2b18..0000000000 --- a/doc/source/kubernetes.client.api.logs_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.api.logs\_api module -====================================== - -.. automodule:: kubernetes.client.api.logs_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.api.networking_api.rst b/doc/source/kubernetes.client.api.networking_api.rst deleted file mode 100644 index 71dacf6dd6..0000000000 --- a/doc/source/kubernetes.client.api.networking_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.api.networking\_api module -============================================ - -.. automodule:: kubernetes.client.api.networking_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.api.networking_v1_api.rst b/doc/source/kubernetes.client.api.networking_v1_api.rst deleted file mode 100644 index ab034ab996..0000000000 --- a/doc/source/kubernetes.client.api.networking_v1_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.api.networking\_v1\_api module -================================================ - -.. automodule:: kubernetes.client.api.networking_v1_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.api.networking_v1alpha1_api.rst b/doc/source/kubernetes.client.api.networking_v1alpha1_api.rst deleted file mode 100644 index a56c690182..0000000000 --- a/doc/source/kubernetes.client.api.networking_v1alpha1_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.api.networking\_v1alpha1\_api module -====================================================== - -.. automodule:: kubernetes.client.api.networking_v1alpha1_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.api.node_api.rst b/doc/source/kubernetes.client.api.node_api.rst deleted file mode 100644 index 979d025e77..0000000000 --- a/doc/source/kubernetes.client.api.node_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.api.node\_api module -====================================== - -.. automodule:: kubernetes.client.api.node_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.api.node_v1_api.rst b/doc/source/kubernetes.client.api.node_v1_api.rst deleted file mode 100644 index 8b9707f11c..0000000000 --- a/doc/source/kubernetes.client.api.node_v1_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.api.node\_v1\_api module -========================================== - -.. automodule:: kubernetes.client.api.node_v1_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.api.openid_api.rst b/doc/source/kubernetes.client.api.openid_api.rst deleted file mode 100644 index 56937d58c9..0000000000 --- a/doc/source/kubernetes.client.api.openid_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.api.openid\_api module -======================================== - -.. automodule:: kubernetes.client.api.openid_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.api.policy_api.rst b/doc/source/kubernetes.client.api.policy_api.rst deleted file mode 100644 index e5c7e7ab3e..0000000000 --- a/doc/source/kubernetes.client.api.policy_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.api.policy\_api module -======================================== - -.. automodule:: kubernetes.client.api.policy_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.api.policy_v1_api.rst b/doc/source/kubernetes.client.api.policy_v1_api.rst deleted file mode 100644 index a0cc47fa5b..0000000000 --- a/doc/source/kubernetes.client.api.policy_v1_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.api.policy\_v1\_api module -============================================ - -.. automodule:: kubernetes.client.api.policy_v1_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.api.rbac_authorization_api.rst b/doc/source/kubernetes.client.api.rbac_authorization_api.rst deleted file mode 100644 index 595d834a8a..0000000000 --- a/doc/source/kubernetes.client.api.rbac_authorization_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.api.rbac\_authorization\_api module -===================================================== - -.. automodule:: kubernetes.client.api.rbac_authorization_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.api.rbac_authorization_v1_api.rst b/doc/source/kubernetes.client.api.rbac_authorization_v1_api.rst deleted file mode 100644 index 695a694f8c..0000000000 --- a/doc/source/kubernetes.client.api.rbac_authorization_v1_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.api.rbac\_authorization\_v1\_api module -========================================================= - -.. automodule:: kubernetes.client.api.rbac_authorization_v1_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.api.resource_api.rst b/doc/source/kubernetes.client.api.resource_api.rst deleted file mode 100644 index 5ea0e699be..0000000000 --- a/doc/source/kubernetes.client.api.resource_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.api.resource\_api module -========================================== - -.. automodule:: kubernetes.client.api.resource_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.api.resource_v1alpha2_api.rst b/doc/source/kubernetes.client.api.resource_v1alpha2_api.rst deleted file mode 100644 index a3df8f4b28..0000000000 --- a/doc/source/kubernetes.client.api.resource_v1alpha2_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.api.resource\_v1alpha2\_api module -==================================================== - -.. automodule:: kubernetes.client.api.resource_v1alpha2_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.api.rst b/doc/source/kubernetes.client.api.rst deleted file mode 100644 index fa2a6965e8..0000000000 --- a/doc/source/kubernetes.client.api.rst +++ /dev/null @@ -1,78 +0,0 @@ -kubernetes.client.api package -============================= - -Submodules ----------- - -.. toctree:: - :maxdepth: 4 - - kubernetes.client.api.admissionregistration_api - kubernetes.client.api.admissionregistration_v1_api - kubernetes.client.api.admissionregistration_v1alpha1_api - kubernetes.client.api.admissionregistration_v1beta1_api - kubernetes.client.api.apiextensions_api - kubernetes.client.api.apiextensions_v1_api - kubernetes.client.api.apiregistration_api - kubernetes.client.api.apiregistration_v1_api - kubernetes.client.api.apis_api - kubernetes.client.api.apps_api - kubernetes.client.api.apps_v1_api - kubernetes.client.api.authentication_api - kubernetes.client.api.authentication_v1_api - kubernetes.client.api.authentication_v1alpha1_api - kubernetes.client.api.authentication_v1beta1_api - kubernetes.client.api.authorization_api - kubernetes.client.api.authorization_v1_api - kubernetes.client.api.autoscaling_api - kubernetes.client.api.autoscaling_v1_api - kubernetes.client.api.autoscaling_v2_api - kubernetes.client.api.batch_api - kubernetes.client.api.batch_v1_api - kubernetes.client.api.certificates_api - kubernetes.client.api.certificates_v1_api - kubernetes.client.api.certificates_v1alpha1_api - kubernetes.client.api.coordination_api - kubernetes.client.api.coordination_v1_api - kubernetes.client.api.core_api - kubernetes.client.api.core_v1_api - kubernetes.client.api.custom_objects_api - kubernetes.client.api.discovery_api - kubernetes.client.api.discovery_v1_api - kubernetes.client.api.events_api - kubernetes.client.api.events_v1_api - kubernetes.client.api.flowcontrol_apiserver_api - kubernetes.client.api.flowcontrol_apiserver_v1_api - kubernetes.client.api.flowcontrol_apiserver_v1beta3_api - kubernetes.client.api.internal_apiserver_api - kubernetes.client.api.internal_apiserver_v1alpha1_api - kubernetes.client.api.logs_api - kubernetes.client.api.networking_api - kubernetes.client.api.networking_v1_api - kubernetes.client.api.networking_v1alpha1_api - kubernetes.client.api.node_api - kubernetes.client.api.node_v1_api - kubernetes.client.api.openid_api - kubernetes.client.api.policy_api - kubernetes.client.api.policy_v1_api - kubernetes.client.api.rbac_authorization_api - kubernetes.client.api.rbac_authorization_v1_api - kubernetes.client.api.resource_api - kubernetes.client.api.resource_v1alpha2_api - kubernetes.client.api.scheduling_api - kubernetes.client.api.scheduling_v1_api - kubernetes.client.api.storage_api - kubernetes.client.api.storage_v1_api - kubernetes.client.api.storage_v1alpha1_api - kubernetes.client.api.storagemigration_api - kubernetes.client.api.storagemigration_v1alpha1_api - kubernetes.client.api.version_api - kubernetes.client.api.well_known_api - -Module contents ---------------- - -.. automodule:: kubernetes.client.api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.api.scheduling_api.rst b/doc/source/kubernetes.client.api.scheduling_api.rst deleted file mode 100644 index 60fe21cf85..0000000000 --- a/doc/source/kubernetes.client.api.scheduling_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.api.scheduling\_api module -============================================ - -.. automodule:: kubernetes.client.api.scheduling_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.api.scheduling_v1_api.rst b/doc/source/kubernetes.client.api.scheduling_v1_api.rst deleted file mode 100644 index 562aaf58c6..0000000000 --- a/doc/source/kubernetes.client.api.scheduling_v1_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.api.scheduling\_v1\_api module -================================================ - -.. automodule:: kubernetes.client.api.scheduling_v1_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.api.storage_api.rst b/doc/source/kubernetes.client.api.storage_api.rst deleted file mode 100644 index 260be31da8..0000000000 --- a/doc/source/kubernetes.client.api.storage_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.api.storage\_api module -========================================= - -.. automodule:: kubernetes.client.api.storage_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.api.storage_v1_api.rst b/doc/source/kubernetes.client.api.storage_v1_api.rst deleted file mode 100644 index e616fcdcc6..0000000000 --- a/doc/source/kubernetes.client.api.storage_v1_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.api.storage\_v1\_api module -============================================= - -.. automodule:: kubernetes.client.api.storage_v1_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.api.storage_v1alpha1_api.rst b/doc/source/kubernetes.client.api.storage_v1alpha1_api.rst deleted file mode 100644 index e109037457..0000000000 --- a/doc/source/kubernetes.client.api.storage_v1alpha1_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.api.storage\_v1alpha1\_api module -=================================================== - -.. automodule:: kubernetes.client.api.storage_v1alpha1_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.api.storagemigration_api.rst b/doc/source/kubernetes.client.api.storagemigration_api.rst deleted file mode 100644 index e9fcffe604..0000000000 --- a/doc/source/kubernetes.client.api.storagemigration_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.api.storagemigration\_api module -================================================== - -.. automodule:: kubernetes.client.api.storagemigration_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.api.storagemigration_v1alpha1_api.rst b/doc/source/kubernetes.client.api.storagemigration_v1alpha1_api.rst deleted file mode 100644 index 94fbdb58d9..0000000000 --- a/doc/source/kubernetes.client.api.storagemigration_v1alpha1_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.api.storagemigration\_v1alpha1\_api module -============================================================ - -.. automodule:: kubernetes.client.api.storagemigration_v1alpha1_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.api.version_api.rst b/doc/source/kubernetes.client.api.version_api.rst deleted file mode 100644 index ff53187c30..0000000000 --- a/doc/source/kubernetes.client.api.version_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.api.version\_api module -========================================= - -.. automodule:: kubernetes.client.api.version_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.api.well_known_api.rst b/doc/source/kubernetes.client.api.well_known_api.rst deleted file mode 100644 index a007d91ef2..0000000000 --- a/doc/source/kubernetes.client.api.well_known_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.api.well\_known\_api module -============================================= - -.. automodule:: kubernetes.client.api.well_known_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.api_client.rst b/doc/source/kubernetes.client.api_client.rst deleted file mode 100644 index 3ade9414e6..0000000000 --- a/doc/source/kubernetes.client.api_client.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.api\_client module -==================================== - -.. automodule:: kubernetes.client.api_client - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.configuration.rst b/doc/source/kubernetes.client.configuration.rst deleted file mode 100644 index f3772b0c4a..0000000000 --- a/doc/source/kubernetes.client.configuration.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.configuration module -====================================== - -.. automodule:: kubernetes.client.configuration - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.exceptions.rst b/doc/source/kubernetes.client.exceptions.rst deleted file mode 100644 index 156d128123..0000000000 --- a/doc/source/kubernetes.client.exceptions.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.exceptions module -=================================== - -.. automodule:: kubernetes.client.exceptions - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.admissionregistration_v1_service_reference.rst b/doc/source/kubernetes.client.models.admissionregistration_v1_service_reference.rst deleted file mode 100644 index c0cecfb019..0000000000 --- a/doc/source/kubernetes.client.models.admissionregistration_v1_service_reference.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.admissionregistration\_v1\_service\_reference module -============================================================================= - -.. automodule:: kubernetes.client.models.admissionregistration_v1_service_reference - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.admissionregistration_v1_webhook_client_config.rst b/doc/source/kubernetes.client.models.admissionregistration_v1_webhook_client_config.rst deleted file mode 100644 index a5ead7c03d..0000000000 --- a/doc/source/kubernetes.client.models.admissionregistration_v1_webhook_client_config.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.admissionregistration\_v1\_webhook\_client\_config module -================================================================================== - -.. automodule:: kubernetes.client.models.admissionregistration_v1_webhook_client_config - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.apiextensions_v1_service_reference.rst b/doc/source/kubernetes.client.models.apiextensions_v1_service_reference.rst deleted file mode 100644 index 06fddf614f..0000000000 --- a/doc/source/kubernetes.client.models.apiextensions_v1_service_reference.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.apiextensions\_v1\_service\_reference module -===================================================================== - -.. automodule:: kubernetes.client.models.apiextensions_v1_service_reference - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.apiextensions_v1_webhook_client_config.rst b/doc/source/kubernetes.client.models.apiextensions_v1_webhook_client_config.rst deleted file mode 100644 index 7e22c10ec1..0000000000 --- a/doc/source/kubernetes.client.models.apiextensions_v1_webhook_client_config.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.apiextensions\_v1\_webhook\_client\_config module -========================================================================== - -.. automodule:: kubernetes.client.models.apiextensions_v1_webhook_client_config - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.apiregistration_v1_service_reference.rst b/doc/source/kubernetes.client.models.apiregistration_v1_service_reference.rst deleted file mode 100644 index 49370189f3..0000000000 --- a/doc/source/kubernetes.client.models.apiregistration_v1_service_reference.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.apiregistration\_v1\_service\_reference module -======================================================================= - -.. automodule:: kubernetes.client.models.apiregistration_v1_service_reference - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.authentication_v1_token_request.rst b/doc/source/kubernetes.client.models.authentication_v1_token_request.rst deleted file mode 100644 index 22dbff81aa..0000000000 --- a/doc/source/kubernetes.client.models.authentication_v1_token_request.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.authentication\_v1\_token\_request module -================================================================== - -.. automodule:: kubernetes.client.models.authentication_v1_token_request - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.core_v1_endpoint_port.rst b/doc/source/kubernetes.client.models.core_v1_endpoint_port.rst deleted file mode 100644 index f9f0bdfbd6..0000000000 --- a/doc/source/kubernetes.client.models.core_v1_endpoint_port.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.core\_v1\_endpoint\_port module -======================================================== - -.. automodule:: kubernetes.client.models.core_v1_endpoint_port - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.core_v1_event.rst b/doc/source/kubernetes.client.models.core_v1_event.rst deleted file mode 100644 index 9b1344edde..0000000000 --- a/doc/source/kubernetes.client.models.core_v1_event.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.core\_v1\_event module -=============================================== - -.. automodule:: kubernetes.client.models.core_v1_event - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.core_v1_event_list.rst b/doc/source/kubernetes.client.models.core_v1_event_list.rst deleted file mode 100644 index 8464dda4d4..0000000000 --- a/doc/source/kubernetes.client.models.core_v1_event_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.core\_v1\_event\_list module -===================================================== - -.. automodule:: kubernetes.client.models.core_v1_event_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.core_v1_event_series.rst b/doc/source/kubernetes.client.models.core_v1_event_series.rst deleted file mode 100644 index d7cadbd959..0000000000 --- a/doc/source/kubernetes.client.models.core_v1_event_series.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.core\_v1\_event\_series module -======================================================= - -.. automodule:: kubernetes.client.models.core_v1_event_series - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.discovery_v1_endpoint_port.rst b/doc/source/kubernetes.client.models.discovery_v1_endpoint_port.rst deleted file mode 100644 index 26b3359eed..0000000000 --- a/doc/source/kubernetes.client.models.discovery_v1_endpoint_port.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.discovery\_v1\_endpoint\_port module -============================================================= - -.. automodule:: kubernetes.client.models.discovery_v1_endpoint_port - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.events_v1_event.rst b/doc/source/kubernetes.client.models.events_v1_event.rst deleted file mode 100644 index 8f2ed248ea..0000000000 --- a/doc/source/kubernetes.client.models.events_v1_event.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.events\_v1\_event module -================================================= - -.. automodule:: kubernetes.client.models.events_v1_event - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.events_v1_event_list.rst b/doc/source/kubernetes.client.models.events_v1_event_list.rst deleted file mode 100644 index 20a51ae927..0000000000 --- a/doc/source/kubernetes.client.models.events_v1_event_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.events\_v1\_event\_list module -======================================================= - -.. automodule:: kubernetes.client.models.events_v1_event_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.events_v1_event_series.rst b/doc/source/kubernetes.client.models.events_v1_event_series.rst deleted file mode 100644 index 3415a73976..0000000000 --- a/doc/source/kubernetes.client.models.events_v1_event_series.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.events\_v1\_event\_series module -========================================================= - -.. automodule:: kubernetes.client.models.events_v1_event_series - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.flowcontrol_v1_subject.rst b/doc/source/kubernetes.client.models.flowcontrol_v1_subject.rst deleted file mode 100644 index c2a2604593..0000000000 --- a/doc/source/kubernetes.client.models.flowcontrol_v1_subject.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.flowcontrol\_v1\_subject module -======================================================== - -.. automodule:: kubernetes.client.models.flowcontrol_v1_subject - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.rbac_v1_subject.rst b/doc/source/kubernetes.client.models.rbac_v1_subject.rst deleted file mode 100644 index 1b37f849a5..0000000000 --- a/doc/source/kubernetes.client.models.rbac_v1_subject.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.rbac\_v1\_subject module -================================================= - -.. automodule:: kubernetes.client.models.rbac_v1_subject - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.rst b/doc/source/kubernetes.client.models.rst deleted file mode 100644 index 5b9b3a1357..0000000000 --- a/doc/source/kubernetes.client.models.rst +++ /dev/null @@ -1,630 +0,0 @@ -kubernetes.client.models package -================================ - -Submodules ----------- - -.. toctree:: - :maxdepth: 4 - - kubernetes.client.models.admissionregistration_v1_service_reference - kubernetes.client.models.admissionregistration_v1_webhook_client_config - kubernetes.client.models.apiextensions_v1_service_reference - kubernetes.client.models.apiextensions_v1_webhook_client_config - kubernetes.client.models.apiregistration_v1_service_reference - kubernetes.client.models.authentication_v1_token_request - kubernetes.client.models.core_v1_endpoint_port - kubernetes.client.models.core_v1_event - kubernetes.client.models.core_v1_event_list - kubernetes.client.models.core_v1_event_series - kubernetes.client.models.discovery_v1_endpoint_port - kubernetes.client.models.events_v1_event - kubernetes.client.models.events_v1_event_list - kubernetes.client.models.events_v1_event_series - kubernetes.client.models.flowcontrol_v1_subject - kubernetes.client.models.rbac_v1_subject - kubernetes.client.models.storage_v1_token_request - kubernetes.client.models.v1_affinity - kubernetes.client.models.v1_aggregation_rule - kubernetes.client.models.v1_api_group - kubernetes.client.models.v1_api_group_list - kubernetes.client.models.v1_api_resource - kubernetes.client.models.v1_api_resource_list - kubernetes.client.models.v1_api_service - kubernetes.client.models.v1_api_service_condition - kubernetes.client.models.v1_api_service_list - kubernetes.client.models.v1_api_service_spec - kubernetes.client.models.v1_api_service_status - kubernetes.client.models.v1_api_versions - kubernetes.client.models.v1_app_armor_profile - kubernetes.client.models.v1_attached_volume - kubernetes.client.models.v1_audit_annotation - kubernetes.client.models.v1_aws_elastic_block_store_volume_source - kubernetes.client.models.v1_azure_disk_volume_source - kubernetes.client.models.v1_azure_file_persistent_volume_source - kubernetes.client.models.v1_azure_file_volume_source - kubernetes.client.models.v1_binding - kubernetes.client.models.v1_bound_object_reference - kubernetes.client.models.v1_capabilities - kubernetes.client.models.v1_ceph_fs_persistent_volume_source - kubernetes.client.models.v1_ceph_fs_volume_source - kubernetes.client.models.v1_certificate_signing_request - kubernetes.client.models.v1_certificate_signing_request_condition - kubernetes.client.models.v1_certificate_signing_request_list - kubernetes.client.models.v1_certificate_signing_request_spec - kubernetes.client.models.v1_certificate_signing_request_status - kubernetes.client.models.v1_cinder_persistent_volume_source - kubernetes.client.models.v1_cinder_volume_source - kubernetes.client.models.v1_claim_source - kubernetes.client.models.v1_client_ip_config - kubernetes.client.models.v1_cluster_role - kubernetes.client.models.v1_cluster_role_binding - kubernetes.client.models.v1_cluster_role_binding_list - kubernetes.client.models.v1_cluster_role_list - kubernetes.client.models.v1_cluster_trust_bundle_projection - kubernetes.client.models.v1_component_condition - kubernetes.client.models.v1_component_status - kubernetes.client.models.v1_component_status_list - kubernetes.client.models.v1_condition - kubernetes.client.models.v1_config_map - kubernetes.client.models.v1_config_map_env_source - kubernetes.client.models.v1_config_map_key_selector - kubernetes.client.models.v1_config_map_list - kubernetes.client.models.v1_config_map_node_config_source - kubernetes.client.models.v1_config_map_projection - kubernetes.client.models.v1_config_map_volume_source - kubernetes.client.models.v1_container - kubernetes.client.models.v1_container_image - kubernetes.client.models.v1_container_port - kubernetes.client.models.v1_container_resize_policy - kubernetes.client.models.v1_container_state - kubernetes.client.models.v1_container_state_running - kubernetes.client.models.v1_container_state_terminated - kubernetes.client.models.v1_container_state_waiting - kubernetes.client.models.v1_container_status - kubernetes.client.models.v1_controller_revision - kubernetes.client.models.v1_controller_revision_list - kubernetes.client.models.v1_cron_job - kubernetes.client.models.v1_cron_job_list - kubernetes.client.models.v1_cron_job_spec - kubernetes.client.models.v1_cron_job_status - kubernetes.client.models.v1_cross_version_object_reference - kubernetes.client.models.v1_csi_driver - kubernetes.client.models.v1_csi_driver_list - kubernetes.client.models.v1_csi_driver_spec - kubernetes.client.models.v1_csi_node - kubernetes.client.models.v1_csi_node_driver - kubernetes.client.models.v1_csi_node_list - kubernetes.client.models.v1_csi_node_spec - kubernetes.client.models.v1_csi_persistent_volume_source - kubernetes.client.models.v1_csi_storage_capacity - kubernetes.client.models.v1_csi_storage_capacity_list - kubernetes.client.models.v1_csi_volume_source - kubernetes.client.models.v1_custom_resource_column_definition - kubernetes.client.models.v1_custom_resource_conversion - kubernetes.client.models.v1_custom_resource_definition - kubernetes.client.models.v1_custom_resource_definition_condition - kubernetes.client.models.v1_custom_resource_definition_list - kubernetes.client.models.v1_custom_resource_definition_names - kubernetes.client.models.v1_custom_resource_definition_spec - kubernetes.client.models.v1_custom_resource_definition_status - kubernetes.client.models.v1_custom_resource_definition_version - kubernetes.client.models.v1_custom_resource_subresource_scale - kubernetes.client.models.v1_custom_resource_subresources - kubernetes.client.models.v1_custom_resource_validation - kubernetes.client.models.v1_daemon_endpoint - kubernetes.client.models.v1_daemon_set - kubernetes.client.models.v1_daemon_set_condition - kubernetes.client.models.v1_daemon_set_list - kubernetes.client.models.v1_daemon_set_spec - kubernetes.client.models.v1_daemon_set_status - kubernetes.client.models.v1_daemon_set_update_strategy - kubernetes.client.models.v1_delete_options - kubernetes.client.models.v1_deployment - kubernetes.client.models.v1_deployment_condition - kubernetes.client.models.v1_deployment_list - kubernetes.client.models.v1_deployment_spec - kubernetes.client.models.v1_deployment_status - kubernetes.client.models.v1_deployment_strategy - kubernetes.client.models.v1_downward_api_projection - kubernetes.client.models.v1_downward_api_volume_file - kubernetes.client.models.v1_downward_api_volume_source - kubernetes.client.models.v1_empty_dir_volume_source - kubernetes.client.models.v1_endpoint - kubernetes.client.models.v1_endpoint_address - kubernetes.client.models.v1_endpoint_conditions - kubernetes.client.models.v1_endpoint_hints - kubernetes.client.models.v1_endpoint_slice - kubernetes.client.models.v1_endpoint_slice_list - kubernetes.client.models.v1_endpoint_subset - kubernetes.client.models.v1_endpoints - kubernetes.client.models.v1_endpoints_list - kubernetes.client.models.v1_env_from_source - kubernetes.client.models.v1_env_var - kubernetes.client.models.v1_env_var_source - kubernetes.client.models.v1_ephemeral_container - kubernetes.client.models.v1_ephemeral_volume_source - kubernetes.client.models.v1_event_source - kubernetes.client.models.v1_eviction - kubernetes.client.models.v1_exec_action - kubernetes.client.models.v1_exempt_priority_level_configuration - kubernetes.client.models.v1_expression_warning - kubernetes.client.models.v1_external_documentation - kubernetes.client.models.v1_fc_volume_source - kubernetes.client.models.v1_flex_persistent_volume_source - kubernetes.client.models.v1_flex_volume_source - kubernetes.client.models.v1_flocker_volume_source - kubernetes.client.models.v1_flow_distinguisher_method - kubernetes.client.models.v1_flow_schema - kubernetes.client.models.v1_flow_schema_condition - kubernetes.client.models.v1_flow_schema_list - kubernetes.client.models.v1_flow_schema_spec - kubernetes.client.models.v1_flow_schema_status - kubernetes.client.models.v1_for_zone - kubernetes.client.models.v1_gce_persistent_disk_volume_source - kubernetes.client.models.v1_git_repo_volume_source - kubernetes.client.models.v1_glusterfs_persistent_volume_source - kubernetes.client.models.v1_glusterfs_volume_source - kubernetes.client.models.v1_group_subject - kubernetes.client.models.v1_group_version_for_discovery - kubernetes.client.models.v1_grpc_action - kubernetes.client.models.v1_horizontal_pod_autoscaler - kubernetes.client.models.v1_horizontal_pod_autoscaler_list - kubernetes.client.models.v1_horizontal_pod_autoscaler_spec - kubernetes.client.models.v1_horizontal_pod_autoscaler_status - kubernetes.client.models.v1_host_alias - kubernetes.client.models.v1_host_ip - kubernetes.client.models.v1_host_path_volume_source - kubernetes.client.models.v1_http_get_action - kubernetes.client.models.v1_http_header - kubernetes.client.models.v1_http_ingress_path - kubernetes.client.models.v1_http_ingress_rule_value - kubernetes.client.models.v1_ingress - kubernetes.client.models.v1_ingress_backend - kubernetes.client.models.v1_ingress_class - kubernetes.client.models.v1_ingress_class_list - kubernetes.client.models.v1_ingress_class_parameters_reference - kubernetes.client.models.v1_ingress_class_spec - kubernetes.client.models.v1_ingress_list - kubernetes.client.models.v1_ingress_load_balancer_ingress - kubernetes.client.models.v1_ingress_load_balancer_status - kubernetes.client.models.v1_ingress_port_status - kubernetes.client.models.v1_ingress_rule - kubernetes.client.models.v1_ingress_service_backend - kubernetes.client.models.v1_ingress_spec - kubernetes.client.models.v1_ingress_status - kubernetes.client.models.v1_ingress_tls - kubernetes.client.models.v1_ip_block - kubernetes.client.models.v1_iscsi_persistent_volume_source - kubernetes.client.models.v1_iscsi_volume_source - kubernetes.client.models.v1_job - kubernetes.client.models.v1_job_condition - kubernetes.client.models.v1_job_list - kubernetes.client.models.v1_job_spec - kubernetes.client.models.v1_job_status - kubernetes.client.models.v1_job_template_spec - kubernetes.client.models.v1_json_schema_props - kubernetes.client.models.v1_key_to_path - kubernetes.client.models.v1_label_selector - kubernetes.client.models.v1_label_selector_requirement - kubernetes.client.models.v1_lease - kubernetes.client.models.v1_lease_list - kubernetes.client.models.v1_lease_spec - kubernetes.client.models.v1_lifecycle - kubernetes.client.models.v1_lifecycle_handler - kubernetes.client.models.v1_limit_range - kubernetes.client.models.v1_limit_range_item - kubernetes.client.models.v1_limit_range_list - kubernetes.client.models.v1_limit_range_spec - kubernetes.client.models.v1_limit_response - kubernetes.client.models.v1_limited_priority_level_configuration - kubernetes.client.models.v1_list_meta - kubernetes.client.models.v1_load_balancer_ingress - kubernetes.client.models.v1_load_balancer_status - kubernetes.client.models.v1_local_object_reference - kubernetes.client.models.v1_local_subject_access_review - kubernetes.client.models.v1_local_volume_source - kubernetes.client.models.v1_managed_fields_entry - kubernetes.client.models.v1_match_condition - kubernetes.client.models.v1_match_resources - kubernetes.client.models.v1_modify_volume_status - kubernetes.client.models.v1_mutating_webhook - kubernetes.client.models.v1_mutating_webhook_configuration - kubernetes.client.models.v1_mutating_webhook_configuration_list - kubernetes.client.models.v1_named_rule_with_operations - kubernetes.client.models.v1_namespace - kubernetes.client.models.v1_namespace_condition - kubernetes.client.models.v1_namespace_list - kubernetes.client.models.v1_namespace_spec - kubernetes.client.models.v1_namespace_status - kubernetes.client.models.v1_network_policy - kubernetes.client.models.v1_network_policy_egress_rule - kubernetes.client.models.v1_network_policy_ingress_rule - kubernetes.client.models.v1_network_policy_list - kubernetes.client.models.v1_network_policy_peer - kubernetes.client.models.v1_network_policy_port - kubernetes.client.models.v1_network_policy_spec - kubernetes.client.models.v1_nfs_volume_source - kubernetes.client.models.v1_node - kubernetes.client.models.v1_node_address - kubernetes.client.models.v1_node_affinity - kubernetes.client.models.v1_node_condition - kubernetes.client.models.v1_node_config_source - kubernetes.client.models.v1_node_config_status - kubernetes.client.models.v1_node_daemon_endpoints - kubernetes.client.models.v1_node_list - kubernetes.client.models.v1_node_runtime_handler - kubernetes.client.models.v1_node_runtime_handler_features - kubernetes.client.models.v1_node_selector - kubernetes.client.models.v1_node_selector_requirement - kubernetes.client.models.v1_node_selector_term - kubernetes.client.models.v1_node_spec - kubernetes.client.models.v1_node_status - kubernetes.client.models.v1_node_system_info - kubernetes.client.models.v1_non_resource_attributes - kubernetes.client.models.v1_non_resource_policy_rule - kubernetes.client.models.v1_non_resource_rule - kubernetes.client.models.v1_object_field_selector - kubernetes.client.models.v1_object_meta - kubernetes.client.models.v1_object_reference - kubernetes.client.models.v1_overhead - kubernetes.client.models.v1_owner_reference - kubernetes.client.models.v1_param_kind - kubernetes.client.models.v1_param_ref - kubernetes.client.models.v1_persistent_volume - kubernetes.client.models.v1_persistent_volume_claim - kubernetes.client.models.v1_persistent_volume_claim_condition - kubernetes.client.models.v1_persistent_volume_claim_list - kubernetes.client.models.v1_persistent_volume_claim_spec - kubernetes.client.models.v1_persistent_volume_claim_status - kubernetes.client.models.v1_persistent_volume_claim_template - kubernetes.client.models.v1_persistent_volume_claim_volume_source - kubernetes.client.models.v1_persistent_volume_list - kubernetes.client.models.v1_persistent_volume_spec - kubernetes.client.models.v1_persistent_volume_status - kubernetes.client.models.v1_photon_persistent_disk_volume_source - kubernetes.client.models.v1_pod - kubernetes.client.models.v1_pod_affinity - kubernetes.client.models.v1_pod_affinity_term - kubernetes.client.models.v1_pod_anti_affinity - kubernetes.client.models.v1_pod_condition - kubernetes.client.models.v1_pod_disruption_budget - kubernetes.client.models.v1_pod_disruption_budget_list - kubernetes.client.models.v1_pod_disruption_budget_spec - kubernetes.client.models.v1_pod_disruption_budget_status - kubernetes.client.models.v1_pod_dns_config - kubernetes.client.models.v1_pod_dns_config_option - kubernetes.client.models.v1_pod_failure_policy - kubernetes.client.models.v1_pod_failure_policy_on_exit_codes_requirement - kubernetes.client.models.v1_pod_failure_policy_on_pod_conditions_pattern - kubernetes.client.models.v1_pod_failure_policy_rule - kubernetes.client.models.v1_pod_ip - kubernetes.client.models.v1_pod_list - kubernetes.client.models.v1_pod_os - kubernetes.client.models.v1_pod_readiness_gate - kubernetes.client.models.v1_pod_resource_claim - kubernetes.client.models.v1_pod_resource_claim_status - kubernetes.client.models.v1_pod_scheduling_gate - kubernetes.client.models.v1_pod_security_context - kubernetes.client.models.v1_pod_spec - kubernetes.client.models.v1_pod_status - kubernetes.client.models.v1_pod_template - kubernetes.client.models.v1_pod_template_list - kubernetes.client.models.v1_pod_template_spec - kubernetes.client.models.v1_policy_rule - kubernetes.client.models.v1_policy_rules_with_subjects - kubernetes.client.models.v1_port_status - kubernetes.client.models.v1_portworx_volume_source - kubernetes.client.models.v1_preconditions - kubernetes.client.models.v1_preferred_scheduling_term - kubernetes.client.models.v1_priority_class - kubernetes.client.models.v1_priority_class_list - kubernetes.client.models.v1_priority_level_configuration - kubernetes.client.models.v1_priority_level_configuration_condition - kubernetes.client.models.v1_priority_level_configuration_list - kubernetes.client.models.v1_priority_level_configuration_reference - kubernetes.client.models.v1_priority_level_configuration_spec - kubernetes.client.models.v1_priority_level_configuration_status - kubernetes.client.models.v1_probe - kubernetes.client.models.v1_projected_volume_source - kubernetes.client.models.v1_queuing_configuration - kubernetes.client.models.v1_quobyte_volume_source - kubernetes.client.models.v1_rbd_persistent_volume_source - kubernetes.client.models.v1_rbd_volume_source - kubernetes.client.models.v1_replica_set - kubernetes.client.models.v1_replica_set_condition - kubernetes.client.models.v1_replica_set_list - kubernetes.client.models.v1_replica_set_spec - kubernetes.client.models.v1_replica_set_status - kubernetes.client.models.v1_replication_controller - kubernetes.client.models.v1_replication_controller_condition - kubernetes.client.models.v1_replication_controller_list - kubernetes.client.models.v1_replication_controller_spec - kubernetes.client.models.v1_replication_controller_status - kubernetes.client.models.v1_resource_attributes - kubernetes.client.models.v1_resource_claim - kubernetes.client.models.v1_resource_field_selector - kubernetes.client.models.v1_resource_policy_rule - kubernetes.client.models.v1_resource_quota - kubernetes.client.models.v1_resource_quota_list - kubernetes.client.models.v1_resource_quota_spec - kubernetes.client.models.v1_resource_quota_status - kubernetes.client.models.v1_resource_requirements - kubernetes.client.models.v1_resource_rule - kubernetes.client.models.v1_role - kubernetes.client.models.v1_role_binding - kubernetes.client.models.v1_role_binding_list - kubernetes.client.models.v1_role_list - kubernetes.client.models.v1_role_ref - kubernetes.client.models.v1_rolling_update_daemon_set - kubernetes.client.models.v1_rolling_update_deployment - kubernetes.client.models.v1_rolling_update_stateful_set_strategy - kubernetes.client.models.v1_rule_with_operations - kubernetes.client.models.v1_runtime_class - kubernetes.client.models.v1_runtime_class_list - kubernetes.client.models.v1_scale - kubernetes.client.models.v1_scale_io_persistent_volume_source - kubernetes.client.models.v1_scale_io_volume_source - kubernetes.client.models.v1_scale_spec - kubernetes.client.models.v1_scale_status - kubernetes.client.models.v1_scheduling - kubernetes.client.models.v1_scope_selector - kubernetes.client.models.v1_scoped_resource_selector_requirement - kubernetes.client.models.v1_se_linux_options - kubernetes.client.models.v1_seccomp_profile - kubernetes.client.models.v1_secret - kubernetes.client.models.v1_secret_env_source - kubernetes.client.models.v1_secret_key_selector - kubernetes.client.models.v1_secret_list - kubernetes.client.models.v1_secret_projection - kubernetes.client.models.v1_secret_reference - kubernetes.client.models.v1_secret_volume_source - kubernetes.client.models.v1_security_context - kubernetes.client.models.v1_selectable_field - kubernetes.client.models.v1_self_subject_access_review - kubernetes.client.models.v1_self_subject_access_review_spec - kubernetes.client.models.v1_self_subject_review - kubernetes.client.models.v1_self_subject_review_status - kubernetes.client.models.v1_self_subject_rules_review - kubernetes.client.models.v1_self_subject_rules_review_spec - kubernetes.client.models.v1_server_address_by_client_cidr - kubernetes.client.models.v1_service - kubernetes.client.models.v1_service_account - kubernetes.client.models.v1_service_account_list - kubernetes.client.models.v1_service_account_subject - kubernetes.client.models.v1_service_account_token_projection - kubernetes.client.models.v1_service_backend_port - kubernetes.client.models.v1_service_list - kubernetes.client.models.v1_service_port - kubernetes.client.models.v1_service_spec - kubernetes.client.models.v1_service_status - kubernetes.client.models.v1_session_affinity_config - kubernetes.client.models.v1_sleep_action - kubernetes.client.models.v1_stateful_set - kubernetes.client.models.v1_stateful_set_condition - kubernetes.client.models.v1_stateful_set_list - kubernetes.client.models.v1_stateful_set_ordinals - kubernetes.client.models.v1_stateful_set_persistent_volume_claim_retention_policy - kubernetes.client.models.v1_stateful_set_spec - kubernetes.client.models.v1_stateful_set_status - kubernetes.client.models.v1_stateful_set_update_strategy - kubernetes.client.models.v1_status - kubernetes.client.models.v1_status_cause - kubernetes.client.models.v1_status_details - kubernetes.client.models.v1_storage_class - kubernetes.client.models.v1_storage_class_list - kubernetes.client.models.v1_storage_os_persistent_volume_source - kubernetes.client.models.v1_storage_os_volume_source - kubernetes.client.models.v1_subject_access_review - kubernetes.client.models.v1_subject_access_review_spec - kubernetes.client.models.v1_subject_access_review_status - kubernetes.client.models.v1_subject_rules_review_status - kubernetes.client.models.v1_success_policy - kubernetes.client.models.v1_success_policy_rule - kubernetes.client.models.v1_sysctl - kubernetes.client.models.v1_taint - kubernetes.client.models.v1_tcp_socket_action - kubernetes.client.models.v1_token_request_spec - kubernetes.client.models.v1_token_request_status - kubernetes.client.models.v1_token_review - kubernetes.client.models.v1_token_review_spec - kubernetes.client.models.v1_token_review_status - kubernetes.client.models.v1_toleration - kubernetes.client.models.v1_topology_selector_label_requirement - kubernetes.client.models.v1_topology_selector_term - kubernetes.client.models.v1_topology_spread_constraint - kubernetes.client.models.v1_type_checking - kubernetes.client.models.v1_typed_local_object_reference - kubernetes.client.models.v1_typed_object_reference - kubernetes.client.models.v1_uncounted_terminated_pods - kubernetes.client.models.v1_user_info - kubernetes.client.models.v1_user_subject - kubernetes.client.models.v1_validating_admission_policy - kubernetes.client.models.v1_validating_admission_policy_binding - kubernetes.client.models.v1_validating_admission_policy_binding_list - kubernetes.client.models.v1_validating_admission_policy_binding_spec - kubernetes.client.models.v1_validating_admission_policy_list - kubernetes.client.models.v1_validating_admission_policy_spec - kubernetes.client.models.v1_validating_admission_policy_status - kubernetes.client.models.v1_validating_webhook - kubernetes.client.models.v1_validating_webhook_configuration - kubernetes.client.models.v1_validating_webhook_configuration_list - kubernetes.client.models.v1_validation - kubernetes.client.models.v1_validation_rule - kubernetes.client.models.v1_variable - kubernetes.client.models.v1_volume - kubernetes.client.models.v1_volume_attachment - kubernetes.client.models.v1_volume_attachment_list - kubernetes.client.models.v1_volume_attachment_source - kubernetes.client.models.v1_volume_attachment_spec - kubernetes.client.models.v1_volume_attachment_status - kubernetes.client.models.v1_volume_device - kubernetes.client.models.v1_volume_error - kubernetes.client.models.v1_volume_mount - kubernetes.client.models.v1_volume_mount_status - kubernetes.client.models.v1_volume_node_affinity - kubernetes.client.models.v1_volume_node_resources - kubernetes.client.models.v1_volume_projection - kubernetes.client.models.v1_volume_resource_requirements - kubernetes.client.models.v1_vsphere_virtual_disk_volume_source - kubernetes.client.models.v1_watch_event - kubernetes.client.models.v1_webhook_conversion - kubernetes.client.models.v1_weighted_pod_affinity_term - kubernetes.client.models.v1_windows_security_context_options - kubernetes.client.models.v1alpha1_audit_annotation - kubernetes.client.models.v1alpha1_cluster_trust_bundle - kubernetes.client.models.v1alpha1_cluster_trust_bundle_list - kubernetes.client.models.v1alpha1_cluster_trust_bundle_spec - kubernetes.client.models.v1alpha1_expression_warning - kubernetes.client.models.v1alpha1_group_version_resource - kubernetes.client.models.v1alpha1_ip_address - kubernetes.client.models.v1alpha1_ip_address_list - kubernetes.client.models.v1alpha1_ip_address_spec - kubernetes.client.models.v1alpha1_match_condition - kubernetes.client.models.v1alpha1_match_resources - kubernetes.client.models.v1alpha1_migration_condition - kubernetes.client.models.v1alpha1_named_rule_with_operations - kubernetes.client.models.v1alpha1_param_kind - kubernetes.client.models.v1alpha1_param_ref - kubernetes.client.models.v1alpha1_parent_reference - kubernetes.client.models.v1alpha1_self_subject_review - kubernetes.client.models.v1alpha1_self_subject_review_status - kubernetes.client.models.v1alpha1_server_storage_version - kubernetes.client.models.v1alpha1_service_cidr - kubernetes.client.models.v1alpha1_service_cidr_list - kubernetes.client.models.v1alpha1_service_cidr_spec - kubernetes.client.models.v1alpha1_service_cidr_status - kubernetes.client.models.v1alpha1_storage_version - kubernetes.client.models.v1alpha1_storage_version_condition - kubernetes.client.models.v1alpha1_storage_version_list - kubernetes.client.models.v1alpha1_storage_version_migration - kubernetes.client.models.v1alpha1_storage_version_migration_list - kubernetes.client.models.v1alpha1_storage_version_migration_spec - kubernetes.client.models.v1alpha1_storage_version_migration_status - kubernetes.client.models.v1alpha1_storage_version_status - kubernetes.client.models.v1alpha1_type_checking - kubernetes.client.models.v1alpha1_validating_admission_policy - kubernetes.client.models.v1alpha1_validating_admission_policy_binding - kubernetes.client.models.v1alpha1_validating_admission_policy_binding_list - kubernetes.client.models.v1alpha1_validating_admission_policy_binding_spec - kubernetes.client.models.v1alpha1_validating_admission_policy_list - kubernetes.client.models.v1alpha1_validating_admission_policy_spec - kubernetes.client.models.v1alpha1_validating_admission_policy_status - kubernetes.client.models.v1alpha1_validation - kubernetes.client.models.v1alpha1_variable - kubernetes.client.models.v1alpha1_volume_attributes_class - kubernetes.client.models.v1alpha1_volume_attributes_class_list - kubernetes.client.models.v1alpha2_allocation_result - kubernetes.client.models.v1alpha2_driver_allocation_result - kubernetes.client.models.v1alpha2_driver_requests - kubernetes.client.models.v1alpha2_named_resources_allocation_result - kubernetes.client.models.v1alpha2_named_resources_attribute - kubernetes.client.models.v1alpha2_named_resources_filter - kubernetes.client.models.v1alpha2_named_resources_instance - kubernetes.client.models.v1alpha2_named_resources_int_slice - kubernetes.client.models.v1alpha2_named_resources_request - kubernetes.client.models.v1alpha2_named_resources_resources - kubernetes.client.models.v1alpha2_named_resources_string_slice - kubernetes.client.models.v1alpha2_pod_scheduling_context - kubernetes.client.models.v1alpha2_pod_scheduling_context_list - kubernetes.client.models.v1alpha2_pod_scheduling_context_spec - kubernetes.client.models.v1alpha2_pod_scheduling_context_status - kubernetes.client.models.v1alpha2_resource_claim - kubernetes.client.models.v1alpha2_resource_claim_consumer_reference - kubernetes.client.models.v1alpha2_resource_claim_list - kubernetes.client.models.v1alpha2_resource_claim_parameters - kubernetes.client.models.v1alpha2_resource_claim_parameters_list - kubernetes.client.models.v1alpha2_resource_claim_parameters_reference - kubernetes.client.models.v1alpha2_resource_claim_scheduling_status - kubernetes.client.models.v1alpha2_resource_claim_spec - kubernetes.client.models.v1alpha2_resource_claim_status - kubernetes.client.models.v1alpha2_resource_claim_template - kubernetes.client.models.v1alpha2_resource_claim_template_list - kubernetes.client.models.v1alpha2_resource_claim_template_spec - kubernetes.client.models.v1alpha2_resource_class - kubernetes.client.models.v1alpha2_resource_class_list - kubernetes.client.models.v1alpha2_resource_class_parameters - kubernetes.client.models.v1alpha2_resource_class_parameters_list - kubernetes.client.models.v1alpha2_resource_class_parameters_reference - kubernetes.client.models.v1alpha2_resource_filter - kubernetes.client.models.v1alpha2_resource_handle - kubernetes.client.models.v1alpha2_resource_request - kubernetes.client.models.v1alpha2_resource_slice - kubernetes.client.models.v1alpha2_resource_slice_list - kubernetes.client.models.v1alpha2_structured_resource_handle - kubernetes.client.models.v1alpha2_vendor_parameters - kubernetes.client.models.v1beta1_audit_annotation - kubernetes.client.models.v1beta1_expression_warning - kubernetes.client.models.v1beta1_match_condition - kubernetes.client.models.v1beta1_match_resources - kubernetes.client.models.v1beta1_named_rule_with_operations - kubernetes.client.models.v1beta1_param_kind - kubernetes.client.models.v1beta1_param_ref - kubernetes.client.models.v1beta1_self_subject_review - kubernetes.client.models.v1beta1_self_subject_review_status - kubernetes.client.models.v1beta1_type_checking - kubernetes.client.models.v1beta1_validating_admission_policy - kubernetes.client.models.v1beta1_validating_admission_policy_binding - kubernetes.client.models.v1beta1_validating_admission_policy_binding_list - kubernetes.client.models.v1beta1_validating_admission_policy_binding_spec - kubernetes.client.models.v1beta1_validating_admission_policy_list - kubernetes.client.models.v1beta1_validating_admission_policy_spec - kubernetes.client.models.v1beta1_validating_admission_policy_status - kubernetes.client.models.v1beta1_validation - kubernetes.client.models.v1beta1_variable - kubernetes.client.models.v1beta3_exempt_priority_level_configuration - kubernetes.client.models.v1beta3_flow_distinguisher_method - kubernetes.client.models.v1beta3_flow_schema - kubernetes.client.models.v1beta3_flow_schema_condition - kubernetes.client.models.v1beta3_flow_schema_list - kubernetes.client.models.v1beta3_flow_schema_spec - kubernetes.client.models.v1beta3_flow_schema_status - kubernetes.client.models.v1beta3_group_subject - kubernetes.client.models.v1beta3_limit_response - kubernetes.client.models.v1beta3_limited_priority_level_configuration - kubernetes.client.models.v1beta3_non_resource_policy_rule - kubernetes.client.models.v1beta3_policy_rules_with_subjects - kubernetes.client.models.v1beta3_priority_level_configuration - kubernetes.client.models.v1beta3_priority_level_configuration_condition - kubernetes.client.models.v1beta3_priority_level_configuration_list - kubernetes.client.models.v1beta3_priority_level_configuration_reference - kubernetes.client.models.v1beta3_priority_level_configuration_spec - kubernetes.client.models.v1beta3_priority_level_configuration_status - kubernetes.client.models.v1beta3_queuing_configuration - kubernetes.client.models.v1beta3_resource_policy_rule - kubernetes.client.models.v1beta3_service_account_subject - kubernetes.client.models.v1beta3_subject - kubernetes.client.models.v1beta3_user_subject - kubernetes.client.models.v2_container_resource_metric_source - kubernetes.client.models.v2_container_resource_metric_status - kubernetes.client.models.v2_cross_version_object_reference - kubernetes.client.models.v2_external_metric_source - kubernetes.client.models.v2_external_metric_status - kubernetes.client.models.v2_horizontal_pod_autoscaler - kubernetes.client.models.v2_horizontal_pod_autoscaler_behavior - kubernetes.client.models.v2_horizontal_pod_autoscaler_condition - kubernetes.client.models.v2_horizontal_pod_autoscaler_list - kubernetes.client.models.v2_horizontal_pod_autoscaler_spec - kubernetes.client.models.v2_horizontal_pod_autoscaler_status - kubernetes.client.models.v2_hpa_scaling_policy - kubernetes.client.models.v2_hpa_scaling_rules - kubernetes.client.models.v2_metric_identifier - kubernetes.client.models.v2_metric_spec - kubernetes.client.models.v2_metric_status - kubernetes.client.models.v2_metric_target - kubernetes.client.models.v2_metric_value_status - kubernetes.client.models.v2_object_metric_source - kubernetes.client.models.v2_object_metric_status - kubernetes.client.models.v2_pods_metric_source - kubernetes.client.models.v2_pods_metric_status - kubernetes.client.models.v2_resource_metric_source - kubernetes.client.models.v2_resource_metric_status - kubernetes.client.models.version_info - -Module contents ---------------- - -.. automodule:: kubernetes.client.models - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.storage_v1_token_request.rst b/doc/source/kubernetes.client.models.storage_v1_token_request.rst deleted file mode 100644 index 97e0bd3887..0000000000 --- a/doc/source/kubernetes.client.models.storage_v1_token_request.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.storage\_v1\_token\_request module -=========================================================== - -.. automodule:: kubernetes.client.models.storage_v1_token_request - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_affinity.rst b/doc/source/kubernetes.client.models.v1_affinity.rst deleted file mode 100644 index e37f3c4143..0000000000 --- a/doc/source/kubernetes.client.models.v1_affinity.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_affinity module -============================================ - -.. automodule:: kubernetes.client.models.v1_affinity - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_aggregation_rule.rst b/doc/source/kubernetes.client.models.v1_aggregation_rule.rst deleted file mode 100644 index 41fe352883..0000000000 --- a/doc/source/kubernetes.client.models.v1_aggregation_rule.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_aggregation\_rule module -===================================================== - -.. automodule:: kubernetes.client.models.v1_aggregation_rule - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_api_group.rst b/doc/source/kubernetes.client.models.v1_api_group.rst deleted file mode 100644 index 735e183e01..0000000000 --- a/doc/source/kubernetes.client.models.v1_api_group.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_api\_group module -============================================== - -.. automodule:: kubernetes.client.models.v1_api_group - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_api_group_list.rst b/doc/source/kubernetes.client.models.v1_api_group_list.rst deleted file mode 100644 index 7ffb16fba5..0000000000 --- a/doc/source/kubernetes.client.models.v1_api_group_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_api\_group\_list module -==================================================== - -.. automodule:: kubernetes.client.models.v1_api_group_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_api_resource.rst b/doc/source/kubernetes.client.models.v1_api_resource.rst deleted file mode 100644 index e63faf5582..0000000000 --- a/doc/source/kubernetes.client.models.v1_api_resource.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_api\_resource module -================================================= - -.. automodule:: kubernetes.client.models.v1_api_resource - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_api_resource_list.rst b/doc/source/kubernetes.client.models.v1_api_resource_list.rst deleted file mode 100644 index 18dd76c5ed..0000000000 --- a/doc/source/kubernetes.client.models.v1_api_resource_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_api\_resource\_list module -======================================================= - -.. automodule:: kubernetes.client.models.v1_api_resource_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_api_service.rst b/doc/source/kubernetes.client.models.v1_api_service.rst deleted file mode 100644 index 1771f8d7f4..0000000000 --- a/doc/source/kubernetes.client.models.v1_api_service.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_api\_service module -================================================ - -.. automodule:: kubernetes.client.models.v1_api_service - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_api_service_condition.rst b/doc/source/kubernetes.client.models.v1_api_service_condition.rst deleted file mode 100644 index ea9e580283..0000000000 --- a/doc/source/kubernetes.client.models.v1_api_service_condition.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_api\_service\_condition module -=========================================================== - -.. automodule:: kubernetes.client.models.v1_api_service_condition - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_api_service_list.rst b/doc/source/kubernetes.client.models.v1_api_service_list.rst deleted file mode 100644 index 61109a2487..0000000000 --- a/doc/source/kubernetes.client.models.v1_api_service_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_api\_service\_list module -====================================================== - -.. automodule:: kubernetes.client.models.v1_api_service_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_api_service_spec.rst b/doc/source/kubernetes.client.models.v1_api_service_spec.rst deleted file mode 100644 index 67a1238092..0000000000 --- a/doc/source/kubernetes.client.models.v1_api_service_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_api\_service\_spec module -====================================================== - -.. automodule:: kubernetes.client.models.v1_api_service_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_api_service_status.rst b/doc/source/kubernetes.client.models.v1_api_service_status.rst deleted file mode 100644 index ed0487adc1..0000000000 --- a/doc/source/kubernetes.client.models.v1_api_service_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_api\_service\_status module -======================================================== - -.. automodule:: kubernetes.client.models.v1_api_service_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_api_versions.rst b/doc/source/kubernetes.client.models.v1_api_versions.rst deleted file mode 100644 index eea17f0069..0000000000 --- a/doc/source/kubernetes.client.models.v1_api_versions.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_api\_versions module -================================================= - -.. automodule:: kubernetes.client.models.v1_api_versions - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_app_armor_profile.rst b/doc/source/kubernetes.client.models.v1_app_armor_profile.rst deleted file mode 100644 index 67922ad3d2..0000000000 --- a/doc/source/kubernetes.client.models.v1_app_armor_profile.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_app\_armor\_profile module -======================================================= - -.. automodule:: kubernetes.client.models.v1_app_armor_profile - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_attached_volume.rst b/doc/source/kubernetes.client.models.v1_attached_volume.rst deleted file mode 100644 index 5bebb1d03a..0000000000 --- a/doc/source/kubernetes.client.models.v1_attached_volume.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_attached\_volume module -==================================================== - -.. automodule:: kubernetes.client.models.v1_attached_volume - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_audit_annotation.rst b/doc/source/kubernetes.client.models.v1_audit_annotation.rst deleted file mode 100644 index 37d23f5684..0000000000 --- a/doc/source/kubernetes.client.models.v1_audit_annotation.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_audit\_annotation module -===================================================== - -.. automodule:: kubernetes.client.models.v1_audit_annotation - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_aws_elastic_block_store_volume_source.rst b/doc/source/kubernetes.client.models.v1_aws_elastic_block_store_volume_source.rst deleted file mode 100644 index 591378d452..0000000000 --- a/doc/source/kubernetes.client.models.v1_aws_elastic_block_store_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_aws\_elastic\_block\_store\_volume\_source module -============================================================================== - -.. automodule:: kubernetes.client.models.v1_aws_elastic_block_store_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_azure_disk_volume_source.rst b/doc/source/kubernetes.client.models.v1_azure_disk_volume_source.rst deleted file mode 100644 index 7ea6db9ee8..0000000000 --- a/doc/source/kubernetes.client.models.v1_azure_disk_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_azure\_disk\_volume\_source module -=============================================================== - -.. automodule:: kubernetes.client.models.v1_azure_disk_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_azure_file_persistent_volume_source.rst b/doc/source/kubernetes.client.models.v1_azure_file_persistent_volume_source.rst deleted file mode 100644 index 3d893312bf..0000000000 --- a/doc/source/kubernetes.client.models.v1_azure_file_persistent_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_azure\_file\_persistent\_volume\_source module -=========================================================================== - -.. automodule:: kubernetes.client.models.v1_azure_file_persistent_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_azure_file_volume_source.rst b/doc/source/kubernetes.client.models.v1_azure_file_volume_source.rst deleted file mode 100644 index 60eec32738..0000000000 --- a/doc/source/kubernetes.client.models.v1_azure_file_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_azure\_file\_volume\_source module -=============================================================== - -.. automodule:: kubernetes.client.models.v1_azure_file_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_binding.rst b/doc/source/kubernetes.client.models.v1_binding.rst deleted file mode 100644 index 75e1b04362..0000000000 --- a/doc/source/kubernetes.client.models.v1_binding.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_binding module -=========================================== - -.. automodule:: kubernetes.client.models.v1_binding - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_bound_object_reference.rst b/doc/source/kubernetes.client.models.v1_bound_object_reference.rst deleted file mode 100644 index 5e1e4e252d..0000000000 --- a/doc/source/kubernetes.client.models.v1_bound_object_reference.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_bound\_object\_reference module -============================================================ - -.. automodule:: kubernetes.client.models.v1_bound_object_reference - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_capabilities.rst b/doc/source/kubernetes.client.models.v1_capabilities.rst deleted file mode 100644 index 0224d979e7..0000000000 --- a/doc/source/kubernetes.client.models.v1_capabilities.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_capabilities module -================================================ - -.. automodule:: kubernetes.client.models.v1_capabilities - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_ceph_fs_persistent_volume_source.rst b/doc/source/kubernetes.client.models.v1_ceph_fs_persistent_volume_source.rst deleted file mode 100644 index 5576bc0925..0000000000 --- a/doc/source/kubernetes.client.models.v1_ceph_fs_persistent_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_ceph\_fs\_persistent\_volume\_source module -======================================================================== - -.. automodule:: kubernetes.client.models.v1_ceph_fs_persistent_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_ceph_fs_volume_source.rst b/doc/source/kubernetes.client.models.v1_ceph_fs_volume_source.rst deleted file mode 100644 index 414fd92e05..0000000000 --- a/doc/source/kubernetes.client.models.v1_ceph_fs_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_ceph\_fs\_volume\_source module -============================================================ - -.. automodule:: kubernetes.client.models.v1_ceph_fs_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_certificate_signing_request.rst b/doc/source/kubernetes.client.models.v1_certificate_signing_request.rst deleted file mode 100644 index 75ee679984..0000000000 --- a/doc/source/kubernetes.client.models.v1_certificate_signing_request.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_certificate\_signing\_request module -================================================================= - -.. automodule:: kubernetes.client.models.v1_certificate_signing_request - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_certificate_signing_request_condition.rst b/doc/source/kubernetes.client.models.v1_certificate_signing_request_condition.rst deleted file mode 100644 index ba846dbb1b..0000000000 --- a/doc/source/kubernetes.client.models.v1_certificate_signing_request_condition.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_certificate\_signing\_request\_condition module -============================================================================ - -.. automodule:: kubernetes.client.models.v1_certificate_signing_request_condition - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_certificate_signing_request_list.rst b/doc/source/kubernetes.client.models.v1_certificate_signing_request_list.rst deleted file mode 100644 index a95a6e9a74..0000000000 --- a/doc/source/kubernetes.client.models.v1_certificate_signing_request_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_certificate\_signing\_request\_list module -======================================================================= - -.. automodule:: kubernetes.client.models.v1_certificate_signing_request_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_certificate_signing_request_spec.rst b/doc/source/kubernetes.client.models.v1_certificate_signing_request_spec.rst deleted file mode 100644 index 95366cd8e0..0000000000 --- a/doc/source/kubernetes.client.models.v1_certificate_signing_request_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_certificate\_signing\_request\_spec module -======================================================================= - -.. automodule:: kubernetes.client.models.v1_certificate_signing_request_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_certificate_signing_request_status.rst b/doc/source/kubernetes.client.models.v1_certificate_signing_request_status.rst deleted file mode 100644 index e3a9ab1175..0000000000 --- a/doc/source/kubernetes.client.models.v1_certificate_signing_request_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_certificate\_signing\_request\_status module -========================================================================= - -.. automodule:: kubernetes.client.models.v1_certificate_signing_request_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_cinder_persistent_volume_source.rst b/doc/source/kubernetes.client.models.v1_cinder_persistent_volume_source.rst deleted file mode 100644 index 42000f40d8..0000000000 --- a/doc/source/kubernetes.client.models.v1_cinder_persistent_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_cinder\_persistent\_volume\_source module -====================================================================== - -.. automodule:: kubernetes.client.models.v1_cinder_persistent_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_cinder_volume_source.rst b/doc/source/kubernetes.client.models.v1_cinder_volume_source.rst deleted file mode 100644 index cd2dec4ba6..0000000000 --- a/doc/source/kubernetes.client.models.v1_cinder_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_cinder\_volume\_source module -========================================================== - -.. automodule:: kubernetes.client.models.v1_cinder_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_claim_source.rst b/doc/source/kubernetes.client.models.v1_claim_source.rst deleted file mode 100644 index 53cf35e046..0000000000 --- a/doc/source/kubernetes.client.models.v1_claim_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_claim\_source module -================================================= - -.. automodule:: kubernetes.client.models.v1_claim_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_client_ip_config.rst b/doc/source/kubernetes.client.models.v1_client_ip_config.rst deleted file mode 100644 index 5aeaed5d7f..0000000000 --- a/doc/source/kubernetes.client.models.v1_client_ip_config.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_client\_ip\_config module -====================================================== - -.. automodule:: kubernetes.client.models.v1_client_ip_config - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_cluster_role.rst b/doc/source/kubernetes.client.models.v1_cluster_role.rst deleted file mode 100644 index a7ce90294c..0000000000 --- a/doc/source/kubernetes.client.models.v1_cluster_role.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_cluster\_role module -================================================= - -.. automodule:: kubernetes.client.models.v1_cluster_role - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_cluster_role_binding.rst b/doc/source/kubernetes.client.models.v1_cluster_role_binding.rst deleted file mode 100644 index 7a161ba73d..0000000000 --- a/doc/source/kubernetes.client.models.v1_cluster_role_binding.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_cluster\_role\_binding module -========================================================== - -.. automodule:: kubernetes.client.models.v1_cluster_role_binding - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_cluster_role_binding_list.rst b/doc/source/kubernetes.client.models.v1_cluster_role_binding_list.rst deleted file mode 100644 index 668d13b5dc..0000000000 --- a/doc/source/kubernetes.client.models.v1_cluster_role_binding_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_cluster\_role\_binding\_list module -================================================================ - -.. automodule:: kubernetes.client.models.v1_cluster_role_binding_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_cluster_role_list.rst b/doc/source/kubernetes.client.models.v1_cluster_role_list.rst deleted file mode 100644 index 93be3956eb..0000000000 --- a/doc/source/kubernetes.client.models.v1_cluster_role_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_cluster\_role\_list module -======================================================= - -.. automodule:: kubernetes.client.models.v1_cluster_role_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_cluster_trust_bundle_projection.rst b/doc/source/kubernetes.client.models.v1_cluster_trust_bundle_projection.rst deleted file mode 100644 index 84e027ffab..0000000000 --- a/doc/source/kubernetes.client.models.v1_cluster_trust_bundle_projection.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_cluster\_trust\_bundle\_projection module -====================================================================== - -.. automodule:: kubernetes.client.models.v1_cluster_trust_bundle_projection - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_component_condition.rst b/doc/source/kubernetes.client.models.v1_component_condition.rst deleted file mode 100644 index e54950080a..0000000000 --- a/doc/source/kubernetes.client.models.v1_component_condition.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_component\_condition module -======================================================== - -.. automodule:: kubernetes.client.models.v1_component_condition - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_component_status.rst b/doc/source/kubernetes.client.models.v1_component_status.rst deleted file mode 100644 index 79dac8cf98..0000000000 --- a/doc/source/kubernetes.client.models.v1_component_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_component\_status module -===================================================== - -.. automodule:: kubernetes.client.models.v1_component_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_component_status_list.rst b/doc/source/kubernetes.client.models.v1_component_status_list.rst deleted file mode 100644 index 8f0554a341..0000000000 --- a/doc/source/kubernetes.client.models.v1_component_status_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_component\_status\_list module -=========================================================== - -.. automodule:: kubernetes.client.models.v1_component_status_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_condition.rst b/doc/source/kubernetes.client.models.v1_condition.rst deleted file mode 100644 index 49c0474de2..0000000000 --- a/doc/source/kubernetes.client.models.v1_condition.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_condition module -============================================= - -.. automodule:: kubernetes.client.models.v1_condition - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_config_map.rst b/doc/source/kubernetes.client.models.v1_config_map.rst deleted file mode 100644 index 935418fff0..0000000000 --- a/doc/source/kubernetes.client.models.v1_config_map.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_config\_map module -=============================================== - -.. automodule:: kubernetes.client.models.v1_config_map - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_config_map_env_source.rst b/doc/source/kubernetes.client.models.v1_config_map_env_source.rst deleted file mode 100644 index 0c3a3c5ae2..0000000000 --- a/doc/source/kubernetes.client.models.v1_config_map_env_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_config\_map\_env\_source module -============================================================ - -.. automodule:: kubernetes.client.models.v1_config_map_env_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_config_map_key_selector.rst b/doc/source/kubernetes.client.models.v1_config_map_key_selector.rst deleted file mode 100644 index 406f87f1df..0000000000 --- a/doc/source/kubernetes.client.models.v1_config_map_key_selector.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_config\_map\_key\_selector module -============================================================== - -.. automodule:: kubernetes.client.models.v1_config_map_key_selector - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_config_map_list.rst b/doc/source/kubernetes.client.models.v1_config_map_list.rst deleted file mode 100644 index 9cb27aa9e5..0000000000 --- a/doc/source/kubernetes.client.models.v1_config_map_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_config\_map\_list module -===================================================== - -.. automodule:: kubernetes.client.models.v1_config_map_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_config_map_node_config_source.rst b/doc/source/kubernetes.client.models.v1_config_map_node_config_source.rst deleted file mode 100644 index 13fb03fe54..0000000000 --- a/doc/source/kubernetes.client.models.v1_config_map_node_config_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_config\_map\_node\_config\_source module -===================================================================== - -.. automodule:: kubernetes.client.models.v1_config_map_node_config_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_config_map_projection.rst b/doc/source/kubernetes.client.models.v1_config_map_projection.rst deleted file mode 100644 index e7ab88c003..0000000000 --- a/doc/source/kubernetes.client.models.v1_config_map_projection.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_config\_map\_projection module -=========================================================== - -.. automodule:: kubernetes.client.models.v1_config_map_projection - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_config_map_volume_source.rst b/doc/source/kubernetes.client.models.v1_config_map_volume_source.rst deleted file mode 100644 index 97e7958ab4..0000000000 --- a/doc/source/kubernetes.client.models.v1_config_map_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_config\_map\_volume\_source module -=============================================================== - -.. automodule:: kubernetes.client.models.v1_config_map_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_container.rst b/doc/source/kubernetes.client.models.v1_container.rst deleted file mode 100644 index f4156fbbb5..0000000000 --- a/doc/source/kubernetes.client.models.v1_container.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_container module -============================================= - -.. automodule:: kubernetes.client.models.v1_container - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_container_image.rst b/doc/source/kubernetes.client.models.v1_container_image.rst deleted file mode 100644 index c655edb623..0000000000 --- a/doc/source/kubernetes.client.models.v1_container_image.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_container\_image module -==================================================== - -.. automodule:: kubernetes.client.models.v1_container_image - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_container_port.rst b/doc/source/kubernetes.client.models.v1_container_port.rst deleted file mode 100644 index 73be976d05..0000000000 --- a/doc/source/kubernetes.client.models.v1_container_port.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_container\_port module -=================================================== - -.. automodule:: kubernetes.client.models.v1_container_port - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_container_resize_policy.rst b/doc/source/kubernetes.client.models.v1_container_resize_policy.rst deleted file mode 100644 index eec06fac79..0000000000 --- a/doc/source/kubernetes.client.models.v1_container_resize_policy.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_container\_resize\_policy module -============================================================= - -.. automodule:: kubernetes.client.models.v1_container_resize_policy - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_container_state.rst b/doc/source/kubernetes.client.models.v1_container_state.rst deleted file mode 100644 index 59b0ccbd53..0000000000 --- a/doc/source/kubernetes.client.models.v1_container_state.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_container\_state module -==================================================== - -.. automodule:: kubernetes.client.models.v1_container_state - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_container_state_running.rst b/doc/source/kubernetes.client.models.v1_container_state_running.rst deleted file mode 100644 index a2538528da..0000000000 --- a/doc/source/kubernetes.client.models.v1_container_state_running.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_container\_state\_running module -============================================================= - -.. automodule:: kubernetes.client.models.v1_container_state_running - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_container_state_terminated.rst b/doc/source/kubernetes.client.models.v1_container_state_terminated.rst deleted file mode 100644 index 9c666c2bbd..0000000000 --- a/doc/source/kubernetes.client.models.v1_container_state_terminated.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_container\_state\_terminated module -================================================================ - -.. automodule:: kubernetes.client.models.v1_container_state_terminated - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_container_state_waiting.rst b/doc/source/kubernetes.client.models.v1_container_state_waiting.rst deleted file mode 100644 index d57773d302..0000000000 --- a/doc/source/kubernetes.client.models.v1_container_state_waiting.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_container\_state\_waiting module -============================================================= - -.. automodule:: kubernetes.client.models.v1_container_state_waiting - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_container_status.rst b/doc/source/kubernetes.client.models.v1_container_status.rst deleted file mode 100644 index cdfa14dc40..0000000000 --- a/doc/source/kubernetes.client.models.v1_container_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_container\_status module -===================================================== - -.. automodule:: kubernetes.client.models.v1_container_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_controller_revision.rst b/doc/source/kubernetes.client.models.v1_controller_revision.rst deleted file mode 100644 index 55b87f5dbf..0000000000 --- a/doc/source/kubernetes.client.models.v1_controller_revision.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_controller\_revision module -======================================================== - -.. automodule:: kubernetes.client.models.v1_controller_revision - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_controller_revision_list.rst b/doc/source/kubernetes.client.models.v1_controller_revision_list.rst deleted file mode 100644 index 10cdc30a8f..0000000000 --- a/doc/source/kubernetes.client.models.v1_controller_revision_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_controller\_revision\_list module -============================================================== - -.. automodule:: kubernetes.client.models.v1_controller_revision_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_cron_job.rst b/doc/source/kubernetes.client.models.v1_cron_job.rst deleted file mode 100644 index a3f375bbef..0000000000 --- a/doc/source/kubernetes.client.models.v1_cron_job.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_cron\_job module -============================================= - -.. automodule:: kubernetes.client.models.v1_cron_job - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_cron_job_list.rst b/doc/source/kubernetes.client.models.v1_cron_job_list.rst deleted file mode 100644 index 93fb151159..0000000000 --- a/doc/source/kubernetes.client.models.v1_cron_job_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_cron\_job\_list module -=================================================== - -.. automodule:: kubernetes.client.models.v1_cron_job_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_cron_job_spec.rst b/doc/source/kubernetes.client.models.v1_cron_job_spec.rst deleted file mode 100644 index 6a4a98e69e..0000000000 --- a/doc/source/kubernetes.client.models.v1_cron_job_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_cron\_job\_spec module -=================================================== - -.. automodule:: kubernetes.client.models.v1_cron_job_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_cron_job_status.rst b/doc/source/kubernetes.client.models.v1_cron_job_status.rst deleted file mode 100644 index a77fa8ac95..0000000000 --- a/doc/source/kubernetes.client.models.v1_cron_job_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_cron\_job\_status module -===================================================== - -.. automodule:: kubernetes.client.models.v1_cron_job_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_cross_version_object_reference.rst b/doc/source/kubernetes.client.models.v1_cross_version_object_reference.rst deleted file mode 100644 index 3615386c4a..0000000000 --- a/doc/source/kubernetes.client.models.v1_cross_version_object_reference.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_cross\_version\_object\_reference module -===================================================================== - -.. automodule:: kubernetes.client.models.v1_cross_version_object_reference - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_csi_driver.rst b/doc/source/kubernetes.client.models.v1_csi_driver.rst deleted file mode 100644 index 97fad98ff6..0000000000 --- a/doc/source/kubernetes.client.models.v1_csi_driver.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_csi\_driver module -=============================================== - -.. automodule:: kubernetes.client.models.v1_csi_driver - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_csi_driver_list.rst b/doc/source/kubernetes.client.models.v1_csi_driver_list.rst deleted file mode 100644 index 62ec4b0a62..0000000000 --- a/doc/source/kubernetes.client.models.v1_csi_driver_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_csi\_driver\_list module -===================================================== - -.. automodule:: kubernetes.client.models.v1_csi_driver_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_csi_driver_spec.rst b/doc/source/kubernetes.client.models.v1_csi_driver_spec.rst deleted file mode 100644 index c8e4085d0a..0000000000 --- a/doc/source/kubernetes.client.models.v1_csi_driver_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_csi\_driver\_spec module -===================================================== - -.. automodule:: kubernetes.client.models.v1_csi_driver_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_csi_node.rst b/doc/source/kubernetes.client.models.v1_csi_node.rst deleted file mode 100644 index 46f0972f9e..0000000000 --- a/doc/source/kubernetes.client.models.v1_csi_node.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_csi\_node module -============================================= - -.. automodule:: kubernetes.client.models.v1_csi_node - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_csi_node_driver.rst b/doc/source/kubernetes.client.models.v1_csi_node_driver.rst deleted file mode 100644 index 6028175915..0000000000 --- a/doc/source/kubernetes.client.models.v1_csi_node_driver.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_csi\_node\_driver module -===================================================== - -.. automodule:: kubernetes.client.models.v1_csi_node_driver - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_csi_node_list.rst b/doc/source/kubernetes.client.models.v1_csi_node_list.rst deleted file mode 100644 index e00ef72e4d..0000000000 --- a/doc/source/kubernetes.client.models.v1_csi_node_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_csi\_node\_list module -=================================================== - -.. automodule:: kubernetes.client.models.v1_csi_node_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_csi_node_spec.rst b/doc/source/kubernetes.client.models.v1_csi_node_spec.rst deleted file mode 100644 index 11efa93b89..0000000000 --- a/doc/source/kubernetes.client.models.v1_csi_node_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_csi\_node\_spec module -=================================================== - -.. automodule:: kubernetes.client.models.v1_csi_node_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_csi_persistent_volume_source.rst b/doc/source/kubernetes.client.models.v1_csi_persistent_volume_source.rst deleted file mode 100644 index 6d0cf0e0d7..0000000000 --- a/doc/source/kubernetes.client.models.v1_csi_persistent_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_csi\_persistent\_volume\_source module -=================================================================== - -.. automodule:: kubernetes.client.models.v1_csi_persistent_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_csi_storage_capacity.rst b/doc/source/kubernetes.client.models.v1_csi_storage_capacity.rst deleted file mode 100644 index ced25fe788..0000000000 --- a/doc/source/kubernetes.client.models.v1_csi_storage_capacity.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_csi\_storage\_capacity module -========================================================== - -.. automodule:: kubernetes.client.models.v1_csi_storage_capacity - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_csi_storage_capacity_list.rst b/doc/source/kubernetes.client.models.v1_csi_storage_capacity_list.rst deleted file mode 100644 index 02a56c9870..0000000000 --- a/doc/source/kubernetes.client.models.v1_csi_storage_capacity_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_csi\_storage\_capacity\_list module -================================================================ - -.. automodule:: kubernetes.client.models.v1_csi_storage_capacity_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_csi_volume_source.rst b/doc/source/kubernetes.client.models.v1_csi_volume_source.rst deleted file mode 100644 index c20c4a4012..0000000000 --- a/doc/source/kubernetes.client.models.v1_csi_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_csi\_volume\_source module -======================================================= - -.. automodule:: kubernetes.client.models.v1_csi_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_custom_resource_column_definition.rst b/doc/source/kubernetes.client.models.v1_custom_resource_column_definition.rst deleted file mode 100644 index 3fc8f53857..0000000000 --- a/doc/source/kubernetes.client.models.v1_custom_resource_column_definition.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_custom\_resource\_column\_definition module -======================================================================== - -.. automodule:: kubernetes.client.models.v1_custom_resource_column_definition - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_custom_resource_conversion.rst b/doc/source/kubernetes.client.models.v1_custom_resource_conversion.rst deleted file mode 100644 index 369a047262..0000000000 --- a/doc/source/kubernetes.client.models.v1_custom_resource_conversion.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_custom\_resource\_conversion module -================================================================ - -.. automodule:: kubernetes.client.models.v1_custom_resource_conversion - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_custom_resource_definition.rst b/doc/source/kubernetes.client.models.v1_custom_resource_definition.rst deleted file mode 100644 index 3be2882059..0000000000 --- a/doc/source/kubernetes.client.models.v1_custom_resource_definition.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_custom\_resource\_definition module -================================================================ - -.. automodule:: kubernetes.client.models.v1_custom_resource_definition - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_custom_resource_definition_condition.rst b/doc/source/kubernetes.client.models.v1_custom_resource_definition_condition.rst deleted file mode 100644 index e3c7891674..0000000000 --- a/doc/source/kubernetes.client.models.v1_custom_resource_definition_condition.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_custom\_resource\_definition\_condition module -=========================================================================== - -.. automodule:: kubernetes.client.models.v1_custom_resource_definition_condition - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_custom_resource_definition_list.rst b/doc/source/kubernetes.client.models.v1_custom_resource_definition_list.rst deleted file mode 100644 index f42279f3f8..0000000000 --- a/doc/source/kubernetes.client.models.v1_custom_resource_definition_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_custom\_resource\_definition\_list module -====================================================================== - -.. automodule:: kubernetes.client.models.v1_custom_resource_definition_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_custom_resource_definition_names.rst b/doc/source/kubernetes.client.models.v1_custom_resource_definition_names.rst deleted file mode 100644 index 71a7a88380..0000000000 --- a/doc/source/kubernetes.client.models.v1_custom_resource_definition_names.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_custom\_resource\_definition\_names module -======================================================================= - -.. automodule:: kubernetes.client.models.v1_custom_resource_definition_names - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_custom_resource_definition_spec.rst b/doc/source/kubernetes.client.models.v1_custom_resource_definition_spec.rst deleted file mode 100644 index 923bfd72a3..0000000000 --- a/doc/source/kubernetes.client.models.v1_custom_resource_definition_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_custom\_resource\_definition\_spec module -====================================================================== - -.. automodule:: kubernetes.client.models.v1_custom_resource_definition_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_custom_resource_definition_status.rst b/doc/source/kubernetes.client.models.v1_custom_resource_definition_status.rst deleted file mode 100644 index 629eee59aa..0000000000 --- a/doc/source/kubernetes.client.models.v1_custom_resource_definition_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_custom\_resource\_definition\_status module -======================================================================== - -.. automodule:: kubernetes.client.models.v1_custom_resource_definition_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_custom_resource_definition_version.rst b/doc/source/kubernetes.client.models.v1_custom_resource_definition_version.rst deleted file mode 100644 index 86ad295b9a..0000000000 --- a/doc/source/kubernetes.client.models.v1_custom_resource_definition_version.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_custom\_resource\_definition\_version module -========================================================================= - -.. automodule:: kubernetes.client.models.v1_custom_resource_definition_version - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_custom_resource_subresource_scale.rst b/doc/source/kubernetes.client.models.v1_custom_resource_subresource_scale.rst deleted file mode 100644 index 509da6c21b..0000000000 --- a/doc/source/kubernetes.client.models.v1_custom_resource_subresource_scale.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_custom\_resource\_subresource\_scale module -======================================================================== - -.. automodule:: kubernetes.client.models.v1_custom_resource_subresource_scale - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_custom_resource_subresources.rst b/doc/source/kubernetes.client.models.v1_custom_resource_subresources.rst deleted file mode 100644 index 202683ce67..0000000000 --- a/doc/source/kubernetes.client.models.v1_custom_resource_subresources.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_custom\_resource\_subresources module -================================================================== - -.. automodule:: kubernetes.client.models.v1_custom_resource_subresources - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_custom_resource_validation.rst b/doc/source/kubernetes.client.models.v1_custom_resource_validation.rst deleted file mode 100644 index ec5cf0ab9b..0000000000 --- a/doc/source/kubernetes.client.models.v1_custom_resource_validation.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_custom\_resource\_validation module -================================================================ - -.. automodule:: kubernetes.client.models.v1_custom_resource_validation - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_daemon_endpoint.rst b/doc/source/kubernetes.client.models.v1_daemon_endpoint.rst deleted file mode 100644 index fbae105d0b..0000000000 --- a/doc/source/kubernetes.client.models.v1_daemon_endpoint.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_daemon\_endpoint module -==================================================== - -.. automodule:: kubernetes.client.models.v1_daemon_endpoint - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_daemon_set.rst b/doc/source/kubernetes.client.models.v1_daemon_set.rst deleted file mode 100644 index 83d6e49a4a..0000000000 --- a/doc/source/kubernetes.client.models.v1_daemon_set.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_daemon\_set module -=============================================== - -.. automodule:: kubernetes.client.models.v1_daemon_set - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_daemon_set_condition.rst b/doc/source/kubernetes.client.models.v1_daemon_set_condition.rst deleted file mode 100644 index 03aa2185b8..0000000000 --- a/doc/source/kubernetes.client.models.v1_daemon_set_condition.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_daemon\_set\_condition module -========================================================== - -.. automodule:: kubernetes.client.models.v1_daemon_set_condition - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_daemon_set_list.rst b/doc/source/kubernetes.client.models.v1_daemon_set_list.rst deleted file mode 100644 index d4568a0c6b..0000000000 --- a/doc/source/kubernetes.client.models.v1_daemon_set_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_daemon\_set\_list module -===================================================== - -.. automodule:: kubernetes.client.models.v1_daemon_set_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_daemon_set_spec.rst b/doc/source/kubernetes.client.models.v1_daemon_set_spec.rst deleted file mode 100644 index 978e1de955..0000000000 --- a/doc/source/kubernetes.client.models.v1_daemon_set_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_daemon\_set\_spec module -===================================================== - -.. automodule:: kubernetes.client.models.v1_daemon_set_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_daemon_set_status.rst b/doc/source/kubernetes.client.models.v1_daemon_set_status.rst deleted file mode 100644 index da7205bb10..0000000000 --- a/doc/source/kubernetes.client.models.v1_daemon_set_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_daemon\_set\_status module -======================================================= - -.. automodule:: kubernetes.client.models.v1_daemon_set_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_daemon_set_update_strategy.rst b/doc/source/kubernetes.client.models.v1_daemon_set_update_strategy.rst deleted file mode 100644 index 2c141f3ca0..0000000000 --- a/doc/source/kubernetes.client.models.v1_daemon_set_update_strategy.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_daemon\_set\_update\_strategy module -================================================================= - -.. automodule:: kubernetes.client.models.v1_daemon_set_update_strategy - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_delete_options.rst b/doc/source/kubernetes.client.models.v1_delete_options.rst deleted file mode 100644 index b4163b7b6d..0000000000 --- a/doc/source/kubernetes.client.models.v1_delete_options.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_delete\_options module -=================================================== - -.. automodule:: kubernetes.client.models.v1_delete_options - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_deployment.rst b/doc/source/kubernetes.client.models.v1_deployment.rst deleted file mode 100644 index 1dd1700ac6..0000000000 --- a/doc/source/kubernetes.client.models.v1_deployment.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_deployment module -============================================== - -.. automodule:: kubernetes.client.models.v1_deployment - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_deployment_condition.rst b/doc/source/kubernetes.client.models.v1_deployment_condition.rst deleted file mode 100644 index 41ca84d191..0000000000 --- a/doc/source/kubernetes.client.models.v1_deployment_condition.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_deployment\_condition module -========================================================= - -.. automodule:: kubernetes.client.models.v1_deployment_condition - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_deployment_list.rst b/doc/source/kubernetes.client.models.v1_deployment_list.rst deleted file mode 100644 index de8850bdf0..0000000000 --- a/doc/source/kubernetes.client.models.v1_deployment_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_deployment\_list module -==================================================== - -.. automodule:: kubernetes.client.models.v1_deployment_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_deployment_spec.rst b/doc/source/kubernetes.client.models.v1_deployment_spec.rst deleted file mode 100644 index 1e0ad6f0b1..0000000000 --- a/doc/source/kubernetes.client.models.v1_deployment_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_deployment\_spec module -==================================================== - -.. automodule:: kubernetes.client.models.v1_deployment_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_deployment_status.rst b/doc/source/kubernetes.client.models.v1_deployment_status.rst deleted file mode 100644 index 3fb7385fb7..0000000000 --- a/doc/source/kubernetes.client.models.v1_deployment_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_deployment\_status module -====================================================== - -.. automodule:: kubernetes.client.models.v1_deployment_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_deployment_strategy.rst b/doc/source/kubernetes.client.models.v1_deployment_strategy.rst deleted file mode 100644 index 98d2c9d233..0000000000 --- a/doc/source/kubernetes.client.models.v1_deployment_strategy.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_deployment\_strategy module -======================================================== - -.. automodule:: kubernetes.client.models.v1_deployment_strategy - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_downward_api_projection.rst b/doc/source/kubernetes.client.models.v1_downward_api_projection.rst deleted file mode 100644 index dae0103cbe..0000000000 --- a/doc/source/kubernetes.client.models.v1_downward_api_projection.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_downward\_api\_projection module -============================================================= - -.. automodule:: kubernetes.client.models.v1_downward_api_projection - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_downward_api_volume_file.rst b/doc/source/kubernetes.client.models.v1_downward_api_volume_file.rst deleted file mode 100644 index 84d0be6867..0000000000 --- a/doc/source/kubernetes.client.models.v1_downward_api_volume_file.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_downward\_api\_volume\_file module -=============================================================== - -.. automodule:: kubernetes.client.models.v1_downward_api_volume_file - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_downward_api_volume_source.rst b/doc/source/kubernetes.client.models.v1_downward_api_volume_source.rst deleted file mode 100644 index f862398506..0000000000 --- a/doc/source/kubernetes.client.models.v1_downward_api_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_downward\_api\_volume\_source module -================================================================= - -.. automodule:: kubernetes.client.models.v1_downward_api_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_empty_dir_volume_source.rst b/doc/source/kubernetes.client.models.v1_empty_dir_volume_source.rst deleted file mode 100644 index d257476b5f..0000000000 --- a/doc/source/kubernetes.client.models.v1_empty_dir_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_empty\_dir\_volume\_source module -============================================================== - -.. automodule:: kubernetes.client.models.v1_empty_dir_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_endpoint.rst b/doc/source/kubernetes.client.models.v1_endpoint.rst deleted file mode 100644 index 0836109b30..0000000000 --- a/doc/source/kubernetes.client.models.v1_endpoint.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_endpoint module -============================================ - -.. automodule:: kubernetes.client.models.v1_endpoint - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_endpoint_address.rst b/doc/source/kubernetes.client.models.v1_endpoint_address.rst deleted file mode 100644 index db6502d070..0000000000 --- a/doc/source/kubernetes.client.models.v1_endpoint_address.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_endpoint\_address module -===================================================== - -.. automodule:: kubernetes.client.models.v1_endpoint_address - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_endpoint_conditions.rst b/doc/source/kubernetes.client.models.v1_endpoint_conditions.rst deleted file mode 100644 index 30800372e4..0000000000 --- a/doc/source/kubernetes.client.models.v1_endpoint_conditions.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_endpoint\_conditions module -======================================================== - -.. automodule:: kubernetes.client.models.v1_endpoint_conditions - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_endpoint_hints.rst b/doc/source/kubernetes.client.models.v1_endpoint_hints.rst deleted file mode 100644 index 4e1c72e18d..0000000000 --- a/doc/source/kubernetes.client.models.v1_endpoint_hints.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_endpoint\_hints module -=================================================== - -.. automodule:: kubernetes.client.models.v1_endpoint_hints - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_endpoint_slice.rst b/doc/source/kubernetes.client.models.v1_endpoint_slice.rst deleted file mode 100644 index e7f0675852..0000000000 --- a/doc/source/kubernetes.client.models.v1_endpoint_slice.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_endpoint\_slice module -=================================================== - -.. automodule:: kubernetes.client.models.v1_endpoint_slice - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_endpoint_slice_list.rst b/doc/source/kubernetes.client.models.v1_endpoint_slice_list.rst deleted file mode 100644 index 9cde9e3acb..0000000000 --- a/doc/source/kubernetes.client.models.v1_endpoint_slice_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_endpoint\_slice\_list module -========================================================= - -.. automodule:: kubernetes.client.models.v1_endpoint_slice_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_endpoint_subset.rst b/doc/source/kubernetes.client.models.v1_endpoint_subset.rst deleted file mode 100644 index f6c0c18290..0000000000 --- a/doc/source/kubernetes.client.models.v1_endpoint_subset.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_endpoint\_subset module -==================================================== - -.. automodule:: kubernetes.client.models.v1_endpoint_subset - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_endpoints.rst b/doc/source/kubernetes.client.models.v1_endpoints.rst deleted file mode 100644 index b24c8f026b..0000000000 --- a/doc/source/kubernetes.client.models.v1_endpoints.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_endpoints module -============================================= - -.. automodule:: kubernetes.client.models.v1_endpoints - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_endpoints_list.rst b/doc/source/kubernetes.client.models.v1_endpoints_list.rst deleted file mode 100644 index 9ab95785e8..0000000000 --- a/doc/source/kubernetes.client.models.v1_endpoints_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_endpoints\_list module -=================================================== - -.. automodule:: kubernetes.client.models.v1_endpoints_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_env_from_source.rst b/doc/source/kubernetes.client.models.v1_env_from_source.rst deleted file mode 100644 index fea9fc6473..0000000000 --- a/doc/source/kubernetes.client.models.v1_env_from_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_env\_from\_source module -===================================================== - -.. automodule:: kubernetes.client.models.v1_env_from_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_env_var.rst b/doc/source/kubernetes.client.models.v1_env_var.rst deleted file mode 100644 index b9dc75b879..0000000000 --- a/doc/source/kubernetes.client.models.v1_env_var.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_env\_var module -============================================ - -.. automodule:: kubernetes.client.models.v1_env_var - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_env_var_source.rst b/doc/source/kubernetes.client.models.v1_env_var_source.rst deleted file mode 100644 index 90e5c2630a..0000000000 --- a/doc/source/kubernetes.client.models.v1_env_var_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_env\_var\_source module -==================================================== - -.. automodule:: kubernetes.client.models.v1_env_var_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_ephemeral_container.rst b/doc/source/kubernetes.client.models.v1_ephemeral_container.rst deleted file mode 100644 index 015a6f1bbe..0000000000 --- a/doc/source/kubernetes.client.models.v1_ephemeral_container.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_ephemeral\_container module -======================================================== - -.. automodule:: kubernetes.client.models.v1_ephemeral_container - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_ephemeral_volume_source.rst b/doc/source/kubernetes.client.models.v1_ephemeral_volume_source.rst deleted file mode 100644 index 6083bf55ae..0000000000 --- a/doc/source/kubernetes.client.models.v1_ephemeral_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_ephemeral\_volume\_source module -============================================================= - -.. automodule:: kubernetes.client.models.v1_ephemeral_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_event_source.rst b/doc/source/kubernetes.client.models.v1_event_source.rst deleted file mode 100644 index 0c9d37fa48..0000000000 --- a/doc/source/kubernetes.client.models.v1_event_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_event\_source module -================================================= - -.. automodule:: kubernetes.client.models.v1_event_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_eviction.rst b/doc/source/kubernetes.client.models.v1_eviction.rst deleted file mode 100644 index 3b2fbfd036..0000000000 --- a/doc/source/kubernetes.client.models.v1_eviction.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_eviction module -============================================ - -.. automodule:: kubernetes.client.models.v1_eviction - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_exec_action.rst b/doc/source/kubernetes.client.models.v1_exec_action.rst deleted file mode 100644 index 2d616ea5c6..0000000000 --- a/doc/source/kubernetes.client.models.v1_exec_action.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_exec\_action module -================================================ - -.. automodule:: kubernetes.client.models.v1_exec_action - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_exempt_priority_level_configuration.rst b/doc/source/kubernetes.client.models.v1_exempt_priority_level_configuration.rst deleted file mode 100644 index a0d691fdf4..0000000000 --- a/doc/source/kubernetes.client.models.v1_exempt_priority_level_configuration.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_exempt\_priority\_level\_configuration module -========================================================================== - -.. automodule:: kubernetes.client.models.v1_exempt_priority_level_configuration - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_expression_warning.rst b/doc/source/kubernetes.client.models.v1_expression_warning.rst deleted file mode 100644 index 21a9e2afdc..0000000000 --- a/doc/source/kubernetes.client.models.v1_expression_warning.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_expression\_warning module -======================================================= - -.. automodule:: kubernetes.client.models.v1_expression_warning - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_external_documentation.rst b/doc/source/kubernetes.client.models.v1_external_documentation.rst deleted file mode 100644 index 62e975e694..0000000000 --- a/doc/source/kubernetes.client.models.v1_external_documentation.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_external\_documentation module -=========================================================== - -.. automodule:: kubernetes.client.models.v1_external_documentation - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_fc_volume_source.rst b/doc/source/kubernetes.client.models.v1_fc_volume_source.rst deleted file mode 100644 index 322746d30b..0000000000 --- a/doc/source/kubernetes.client.models.v1_fc_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_fc\_volume\_source module -====================================================== - -.. automodule:: kubernetes.client.models.v1_fc_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_flex_persistent_volume_source.rst b/doc/source/kubernetes.client.models.v1_flex_persistent_volume_source.rst deleted file mode 100644 index 920e77f521..0000000000 --- a/doc/source/kubernetes.client.models.v1_flex_persistent_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_flex\_persistent\_volume\_source module -==================================================================== - -.. automodule:: kubernetes.client.models.v1_flex_persistent_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_flex_volume_source.rst b/doc/source/kubernetes.client.models.v1_flex_volume_source.rst deleted file mode 100644 index 18e0fd9c49..0000000000 --- a/doc/source/kubernetes.client.models.v1_flex_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_flex\_volume\_source module -======================================================== - -.. automodule:: kubernetes.client.models.v1_flex_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_flocker_volume_source.rst b/doc/source/kubernetes.client.models.v1_flocker_volume_source.rst deleted file mode 100644 index a238bffddb..0000000000 --- a/doc/source/kubernetes.client.models.v1_flocker_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_flocker\_volume\_source module -=========================================================== - -.. automodule:: kubernetes.client.models.v1_flocker_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_flow_distinguisher_method.rst b/doc/source/kubernetes.client.models.v1_flow_distinguisher_method.rst deleted file mode 100644 index 408786fb5e..0000000000 --- a/doc/source/kubernetes.client.models.v1_flow_distinguisher_method.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_flow\_distinguisher\_method module -=============================================================== - -.. automodule:: kubernetes.client.models.v1_flow_distinguisher_method - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_flow_schema.rst b/doc/source/kubernetes.client.models.v1_flow_schema.rst deleted file mode 100644 index 0727e05f3a..0000000000 --- a/doc/source/kubernetes.client.models.v1_flow_schema.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_flow\_schema module -================================================ - -.. automodule:: kubernetes.client.models.v1_flow_schema - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_flow_schema_condition.rst b/doc/source/kubernetes.client.models.v1_flow_schema_condition.rst deleted file mode 100644 index 068d0c561b..0000000000 --- a/doc/source/kubernetes.client.models.v1_flow_schema_condition.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_flow\_schema\_condition module -=========================================================== - -.. automodule:: kubernetes.client.models.v1_flow_schema_condition - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_flow_schema_list.rst b/doc/source/kubernetes.client.models.v1_flow_schema_list.rst deleted file mode 100644 index fcb7cc2b48..0000000000 --- a/doc/source/kubernetes.client.models.v1_flow_schema_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_flow\_schema\_list module -====================================================== - -.. automodule:: kubernetes.client.models.v1_flow_schema_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_flow_schema_spec.rst b/doc/source/kubernetes.client.models.v1_flow_schema_spec.rst deleted file mode 100644 index 89575e746e..0000000000 --- a/doc/source/kubernetes.client.models.v1_flow_schema_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_flow\_schema\_spec module -====================================================== - -.. automodule:: kubernetes.client.models.v1_flow_schema_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_flow_schema_status.rst b/doc/source/kubernetes.client.models.v1_flow_schema_status.rst deleted file mode 100644 index 5974648c0e..0000000000 --- a/doc/source/kubernetes.client.models.v1_flow_schema_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_flow\_schema\_status module -======================================================== - -.. automodule:: kubernetes.client.models.v1_flow_schema_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_for_zone.rst b/doc/source/kubernetes.client.models.v1_for_zone.rst deleted file mode 100644 index 2c844c98b6..0000000000 --- a/doc/source/kubernetes.client.models.v1_for_zone.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_for\_zone module -============================================= - -.. automodule:: kubernetes.client.models.v1_for_zone - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_gce_persistent_disk_volume_source.rst b/doc/source/kubernetes.client.models.v1_gce_persistent_disk_volume_source.rst deleted file mode 100644 index 0bec9c5137..0000000000 --- a/doc/source/kubernetes.client.models.v1_gce_persistent_disk_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_gce\_persistent\_disk\_volume\_source module -========================================================================= - -.. automodule:: kubernetes.client.models.v1_gce_persistent_disk_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_git_repo_volume_source.rst b/doc/source/kubernetes.client.models.v1_git_repo_volume_source.rst deleted file mode 100644 index 01b6489be5..0000000000 --- a/doc/source/kubernetes.client.models.v1_git_repo_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_git\_repo\_volume\_source module -============================================================= - -.. automodule:: kubernetes.client.models.v1_git_repo_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_glusterfs_persistent_volume_source.rst b/doc/source/kubernetes.client.models.v1_glusterfs_persistent_volume_source.rst deleted file mode 100644 index a7961e3998..0000000000 --- a/doc/source/kubernetes.client.models.v1_glusterfs_persistent_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_glusterfs\_persistent\_volume\_source module -========================================================================= - -.. automodule:: kubernetes.client.models.v1_glusterfs_persistent_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_glusterfs_volume_source.rst b/doc/source/kubernetes.client.models.v1_glusterfs_volume_source.rst deleted file mode 100644 index 6fab24e159..0000000000 --- a/doc/source/kubernetes.client.models.v1_glusterfs_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_glusterfs\_volume\_source module -============================================================= - -.. automodule:: kubernetes.client.models.v1_glusterfs_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_group_subject.rst b/doc/source/kubernetes.client.models.v1_group_subject.rst deleted file mode 100644 index a805cda489..0000000000 --- a/doc/source/kubernetes.client.models.v1_group_subject.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_group\_subject module -================================================== - -.. automodule:: kubernetes.client.models.v1_group_subject - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_group_version_for_discovery.rst b/doc/source/kubernetes.client.models.v1_group_version_for_discovery.rst deleted file mode 100644 index 98d90d5be3..0000000000 --- a/doc/source/kubernetes.client.models.v1_group_version_for_discovery.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_group\_version\_for\_discovery module -================================================================== - -.. automodule:: kubernetes.client.models.v1_group_version_for_discovery - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_grpc_action.rst b/doc/source/kubernetes.client.models.v1_grpc_action.rst deleted file mode 100644 index d9dc6f50c5..0000000000 --- a/doc/source/kubernetes.client.models.v1_grpc_action.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_grpc\_action module -================================================ - -.. automodule:: kubernetes.client.models.v1_grpc_action - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_horizontal_pod_autoscaler.rst b/doc/source/kubernetes.client.models.v1_horizontal_pod_autoscaler.rst deleted file mode 100644 index 2001ecefe4..0000000000 --- a/doc/source/kubernetes.client.models.v1_horizontal_pod_autoscaler.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_horizontal\_pod\_autoscaler module -=============================================================== - -.. automodule:: kubernetes.client.models.v1_horizontal_pod_autoscaler - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_horizontal_pod_autoscaler_list.rst b/doc/source/kubernetes.client.models.v1_horizontal_pod_autoscaler_list.rst deleted file mode 100644 index 624a479acd..0000000000 --- a/doc/source/kubernetes.client.models.v1_horizontal_pod_autoscaler_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_horizontal\_pod\_autoscaler\_list module -===================================================================== - -.. automodule:: kubernetes.client.models.v1_horizontal_pod_autoscaler_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_horizontal_pod_autoscaler_spec.rst b/doc/source/kubernetes.client.models.v1_horizontal_pod_autoscaler_spec.rst deleted file mode 100644 index 17d12dc11f..0000000000 --- a/doc/source/kubernetes.client.models.v1_horizontal_pod_autoscaler_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_horizontal\_pod\_autoscaler\_spec module -===================================================================== - -.. automodule:: kubernetes.client.models.v1_horizontal_pod_autoscaler_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_horizontal_pod_autoscaler_status.rst b/doc/source/kubernetes.client.models.v1_horizontal_pod_autoscaler_status.rst deleted file mode 100644 index c2b8478d30..0000000000 --- a/doc/source/kubernetes.client.models.v1_horizontal_pod_autoscaler_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_horizontal\_pod\_autoscaler\_status module -======================================================================= - -.. automodule:: kubernetes.client.models.v1_horizontal_pod_autoscaler_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_host_alias.rst b/doc/source/kubernetes.client.models.v1_host_alias.rst deleted file mode 100644 index 7d3bd21124..0000000000 --- a/doc/source/kubernetes.client.models.v1_host_alias.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_host\_alias module -=============================================== - -.. automodule:: kubernetes.client.models.v1_host_alias - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_host_ip.rst b/doc/source/kubernetes.client.models.v1_host_ip.rst deleted file mode 100644 index c4647daf64..0000000000 --- a/doc/source/kubernetes.client.models.v1_host_ip.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_host\_ip module -============================================ - -.. automodule:: kubernetes.client.models.v1_host_ip - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_host_path_volume_source.rst b/doc/source/kubernetes.client.models.v1_host_path_volume_source.rst deleted file mode 100644 index 980cf7a76c..0000000000 --- a/doc/source/kubernetes.client.models.v1_host_path_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_host\_path\_volume\_source module -============================================================== - -.. automodule:: kubernetes.client.models.v1_host_path_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_http_get_action.rst b/doc/source/kubernetes.client.models.v1_http_get_action.rst deleted file mode 100644 index b62f155b2c..0000000000 --- a/doc/source/kubernetes.client.models.v1_http_get_action.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_http\_get\_action module -===================================================== - -.. automodule:: kubernetes.client.models.v1_http_get_action - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_http_header.rst b/doc/source/kubernetes.client.models.v1_http_header.rst deleted file mode 100644 index ac73f8060c..0000000000 --- a/doc/source/kubernetes.client.models.v1_http_header.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_http\_header module -================================================ - -.. automodule:: kubernetes.client.models.v1_http_header - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_http_ingress_path.rst b/doc/source/kubernetes.client.models.v1_http_ingress_path.rst deleted file mode 100644 index f2489b8de9..0000000000 --- a/doc/source/kubernetes.client.models.v1_http_ingress_path.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_http\_ingress\_path module -======================================================= - -.. automodule:: kubernetes.client.models.v1_http_ingress_path - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_http_ingress_rule_value.rst b/doc/source/kubernetes.client.models.v1_http_ingress_rule_value.rst deleted file mode 100644 index dd8f4c1470..0000000000 --- a/doc/source/kubernetes.client.models.v1_http_ingress_rule_value.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_http\_ingress\_rule\_value module -============================================================== - -.. automodule:: kubernetes.client.models.v1_http_ingress_rule_value - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_ingress.rst b/doc/source/kubernetes.client.models.v1_ingress.rst deleted file mode 100644 index d9b64a97c2..0000000000 --- a/doc/source/kubernetes.client.models.v1_ingress.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_ingress module -=========================================== - -.. automodule:: kubernetes.client.models.v1_ingress - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_ingress_backend.rst b/doc/source/kubernetes.client.models.v1_ingress_backend.rst deleted file mode 100644 index 5a0a58556a..0000000000 --- a/doc/source/kubernetes.client.models.v1_ingress_backend.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_ingress\_backend module -==================================================== - -.. automodule:: kubernetes.client.models.v1_ingress_backend - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_ingress_class.rst b/doc/source/kubernetes.client.models.v1_ingress_class.rst deleted file mode 100644 index 8a0eb108e5..0000000000 --- a/doc/source/kubernetes.client.models.v1_ingress_class.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_ingress\_class module -================================================== - -.. automodule:: kubernetes.client.models.v1_ingress_class - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_ingress_class_list.rst b/doc/source/kubernetes.client.models.v1_ingress_class_list.rst deleted file mode 100644 index 3c43733305..0000000000 --- a/doc/source/kubernetes.client.models.v1_ingress_class_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_ingress\_class\_list module -======================================================== - -.. automodule:: kubernetes.client.models.v1_ingress_class_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_ingress_class_parameters_reference.rst b/doc/source/kubernetes.client.models.v1_ingress_class_parameters_reference.rst deleted file mode 100644 index 04a1172979..0000000000 --- a/doc/source/kubernetes.client.models.v1_ingress_class_parameters_reference.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_ingress\_class\_parameters\_reference module -========================================================================= - -.. automodule:: kubernetes.client.models.v1_ingress_class_parameters_reference - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_ingress_class_spec.rst b/doc/source/kubernetes.client.models.v1_ingress_class_spec.rst deleted file mode 100644 index 90442045da..0000000000 --- a/doc/source/kubernetes.client.models.v1_ingress_class_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_ingress\_class\_spec module -======================================================== - -.. automodule:: kubernetes.client.models.v1_ingress_class_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_ingress_list.rst b/doc/source/kubernetes.client.models.v1_ingress_list.rst deleted file mode 100644 index 429eecfeb3..0000000000 --- a/doc/source/kubernetes.client.models.v1_ingress_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_ingress\_list module -================================================= - -.. automodule:: kubernetes.client.models.v1_ingress_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_ingress_load_balancer_ingress.rst b/doc/source/kubernetes.client.models.v1_ingress_load_balancer_ingress.rst deleted file mode 100644 index a9896797a5..0000000000 --- a/doc/source/kubernetes.client.models.v1_ingress_load_balancer_ingress.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_ingress\_load\_balancer\_ingress module -==================================================================== - -.. automodule:: kubernetes.client.models.v1_ingress_load_balancer_ingress - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_ingress_load_balancer_status.rst b/doc/source/kubernetes.client.models.v1_ingress_load_balancer_status.rst deleted file mode 100644 index 9b96b2ece2..0000000000 --- a/doc/source/kubernetes.client.models.v1_ingress_load_balancer_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_ingress\_load\_balancer\_status module -=================================================================== - -.. automodule:: kubernetes.client.models.v1_ingress_load_balancer_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_ingress_port_status.rst b/doc/source/kubernetes.client.models.v1_ingress_port_status.rst deleted file mode 100644 index dabab01b64..0000000000 --- a/doc/source/kubernetes.client.models.v1_ingress_port_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_ingress\_port\_status module -========================================================= - -.. automodule:: kubernetes.client.models.v1_ingress_port_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_ingress_rule.rst b/doc/source/kubernetes.client.models.v1_ingress_rule.rst deleted file mode 100644 index 5a09910a49..0000000000 --- a/doc/source/kubernetes.client.models.v1_ingress_rule.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_ingress\_rule module -================================================= - -.. automodule:: kubernetes.client.models.v1_ingress_rule - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_ingress_service_backend.rst b/doc/source/kubernetes.client.models.v1_ingress_service_backend.rst deleted file mode 100644 index 2379141388..0000000000 --- a/doc/source/kubernetes.client.models.v1_ingress_service_backend.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_ingress\_service\_backend module -============================================================= - -.. automodule:: kubernetes.client.models.v1_ingress_service_backend - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_ingress_spec.rst b/doc/source/kubernetes.client.models.v1_ingress_spec.rst deleted file mode 100644 index f3e48769fe..0000000000 --- a/doc/source/kubernetes.client.models.v1_ingress_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_ingress\_spec module -================================================= - -.. automodule:: kubernetes.client.models.v1_ingress_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_ingress_status.rst b/doc/source/kubernetes.client.models.v1_ingress_status.rst deleted file mode 100644 index 1f617eee91..0000000000 --- a/doc/source/kubernetes.client.models.v1_ingress_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_ingress\_status module -=================================================== - -.. automodule:: kubernetes.client.models.v1_ingress_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_ingress_tls.rst b/doc/source/kubernetes.client.models.v1_ingress_tls.rst deleted file mode 100644 index c7a12736f3..0000000000 --- a/doc/source/kubernetes.client.models.v1_ingress_tls.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_ingress\_tls module -================================================ - -.. automodule:: kubernetes.client.models.v1_ingress_tls - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_ip_block.rst b/doc/source/kubernetes.client.models.v1_ip_block.rst deleted file mode 100644 index 9d164694c9..0000000000 --- a/doc/source/kubernetes.client.models.v1_ip_block.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_ip\_block module -============================================= - -.. automodule:: kubernetes.client.models.v1_ip_block - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_iscsi_persistent_volume_source.rst b/doc/source/kubernetes.client.models.v1_iscsi_persistent_volume_source.rst deleted file mode 100644 index 8e364716b0..0000000000 --- a/doc/source/kubernetes.client.models.v1_iscsi_persistent_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_iscsi\_persistent\_volume\_source module -===================================================================== - -.. automodule:: kubernetes.client.models.v1_iscsi_persistent_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_iscsi_volume_source.rst b/doc/source/kubernetes.client.models.v1_iscsi_volume_source.rst deleted file mode 100644 index f8583c3884..0000000000 --- a/doc/source/kubernetes.client.models.v1_iscsi_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_iscsi\_volume\_source module -========================================================= - -.. automodule:: kubernetes.client.models.v1_iscsi_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_job.rst b/doc/source/kubernetes.client.models.v1_job.rst deleted file mode 100644 index 42e519b8eb..0000000000 --- a/doc/source/kubernetes.client.models.v1_job.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_job module -======================================= - -.. automodule:: kubernetes.client.models.v1_job - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_job_condition.rst b/doc/source/kubernetes.client.models.v1_job_condition.rst deleted file mode 100644 index db9dda1f66..0000000000 --- a/doc/source/kubernetes.client.models.v1_job_condition.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_job\_condition module -================================================== - -.. automodule:: kubernetes.client.models.v1_job_condition - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_job_list.rst b/doc/source/kubernetes.client.models.v1_job_list.rst deleted file mode 100644 index 4267b18e07..0000000000 --- a/doc/source/kubernetes.client.models.v1_job_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_job\_list module -============================================= - -.. automodule:: kubernetes.client.models.v1_job_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_job_spec.rst b/doc/source/kubernetes.client.models.v1_job_spec.rst deleted file mode 100644 index ead39b6568..0000000000 --- a/doc/source/kubernetes.client.models.v1_job_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_job\_spec module -============================================= - -.. automodule:: kubernetes.client.models.v1_job_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_job_status.rst b/doc/source/kubernetes.client.models.v1_job_status.rst deleted file mode 100644 index 446e2eb9aa..0000000000 --- a/doc/source/kubernetes.client.models.v1_job_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_job\_status module -=============================================== - -.. automodule:: kubernetes.client.models.v1_job_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_job_template_spec.rst b/doc/source/kubernetes.client.models.v1_job_template_spec.rst deleted file mode 100644 index 7d8fde2c29..0000000000 --- a/doc/source/kubernetes.client.models.v1_job_template_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_job\_template\_spec module -======================================================= - -.. automodule:: kubernetes.client.models.v1_job_template_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_json_schema_props.rst b/doc/source/kubernetes.client.models.v1_json_schema_props.rst deleted file mode 100644 index 3d61a2372a..0000000000 --- a/doc/source/kubernetes.client.models.v1_json_schema_props.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_json\_schema\_props module -======================================================= - -.. automodule:: kubernetes.client.models.v1_json_schema_props - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_key_to_path.rst b/doc/source/kubernetes.client.models.v1_key_to_path.rst deleted file mode 100644 index 44c8e2afe2..0000000000 --- a/doc/source/kubernetes.client.models.v1_key_to_path.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_key\_to\_path module -================================================= - -.. automodule:: kubernetes.client.models.v1_key_to_path - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_label_selector.rst b/doc/source/kubernetes.client.models.v1_label_selector.rst deleted file mode 100644 index ff18bf58b4..0000000000 --- a/doc/source/kubernetes.client.models.v1_label_selector.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_label\_selector module -=================================================== - -.. automodule:: kubernetes.client.models.v1_label_selector - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_label_selector_requirement.rst b/doc/source/kubernetes.client.models.v1_label_selector_requirement.rst deleted file mode 100644 index f4032b2590..0000000000 --- a/doc/source/kubernetes.client.models.v1_label_selector_requirement.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_label\_selector\_requirement module -================================================================ - -.. automodule:: kubernetes.client.models.v1_label_selector_requirement - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_lease.rst b/doc/source/kubernetes.client.models.v1_lease.rst deleted file mode 100644 index fcf8240920..0000000000 --- a/doc/source/kubernetes.client.models.v1_lease.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_lease module -========================================= - -.. automodule:: kubernetes.client.models.v1_lease - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_lease_list.rst b/doc/source/kubernetes.client.models.v1_lease_list.rst deleted file mode 100644 index cc11e89de4..0000000000 --- a/doc/source/kubernetes.client.models.v1_lease_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_lease\_list module -=============================================== - -.. automodule:: kubernetes.client.models.v1_lease_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_lease_spec.rst b/doc/source/kubernetes.client.models.v1_lease_spec.rst deleted file mode 100644 index 05112bdd15..0000000000 --- a/doc/source/kubernetes.client.models.v1_lease_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_lease\_spec module -=============================================== - -.. automodule:: kubernetes.client.models.v1_lease_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_lifecycle.rst b/doc/source/kubernetes.client.models.v1_lifecycle.rst deleted file mode 100644 index e1576e18e9..0000000000 --- a/doc/source/kubernetes.client.models.v1_lifecycle.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_lifecycle module -============================================= - -.. automodule:: kubernetes.client.models.v1_lifecycle - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_lifecycle_handler.rst b/doc/source/kubernetes.client.models.v1_lifecycle_handler.rst deleted file mode 100644 index c60ef8278a..0000000000 --- a/doc/source/kubernetes.client.models.v1_lifecycle_handler.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_lifecycle\_handler module -====================================================== - -.. automodule:: kubernetes.client.models.v1_lifecycle_handler - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_limit_range.rst b/doc/source/kubernetes.client.models.v1_limit_range.rst deleted file mode 100644 index 91474d8ba6..0000000000 --- a/doc/source/kubernetes.client.models.v1_limit_range.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_limit\_range module -================================================ - -.. automodule:: kubernetes.client.models.v1_limit_range - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_limit_range_item.rst b/doc/source/kubernetes.client.models.v1_limit_range_item.rst deleted file mode 100644 index fd96958f61..0000000000 --- a/doc/source/kubernetes.client.models.v1_limit_range_item.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_limit\_range\_item module -====================================================== - -.. automodule:: kubernetes.client.models.v1_limit_range_item - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_limit_range_list.rst b/doc/source/kubernetes.client.models.v1_limit_range_list.rst deleted file mode 100644 index 558ba8d556..0000000000 --- a/doc/source/kubernetes.client.models.v1_limit_range_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_limit\_range\_list module -====================================================== - -.. automodule:: kubernetes.client.models.v1_limit_range_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_limit_range_spec.rst b/doc/source/kubernetes.client.models.v1_limit_range_spec.rst deleted file mode 100644 index 42801824dc..0000000000 --- a/doc/source/kubernetes.client.models.v1_limit_range_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_limit\_range\_spec module -====================================================== - -.. automodule:: kubernetes.client.models.v1_limit_range_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_limit_response.rst b/doc/source/kubernetes.client.models.v1_limit_response.rst deleted file mode 100644 index 73d9822ef7..0000000000 --- a/doc/source/kubernetes.client.models.v1_limit_response.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_limit\_response module -=================================================== - -.. automodule:: kubernetes.client.models.v1_limit_response - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_limited_priority_level_configuration.rst b/doc/source/kubernetes.client.models.v1_limited_priority_level_configuration.rst deleted file mode 100644 index e985862d0e..0000000000 --- a/doc/source/kubernetes.client.models.v1_limited_priority_level_configuration.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_limited\_priority\_level\_configuration module -=========================================================================== - -.. automodule:: kubernetes.client.models.v1_limited_priority_level_configuration - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_list_meta.rst b/doc/source/kubernetes.client.models.v1_list_meta.rst deleted file mode 100644 index 5eb4ed7254..0000000000 --- a/doc/source/kubernetes.client.models.v1_list_meta.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_list\_meta module -============================================== - -.. automodule:: kubernetes.client.models.v1_list_meta - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_load_balancer_ingress.rst b/doc/source/kubernetes.client.models.v1_load_balancer_ingress.rst deleted file mode 100644 index 0b47fd4a84..0000000000 --- a/doc/source/kubernetes.client.models.v1_load_balancer_ingress.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_load\_balancer\_ingress module -=========================================================== - -.. automodule:: kubernetes.client.models.v1_load_balancer_ingress - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_load_balancer_status.rst b/doc/source/kubernetes.client.models.v1_load_balancer_status.rst deleted file mode 100644 index b419c335d0..0000000000 --- a/doc/source/kubernetes.client.models.v1_load_balancer_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_load\_balancer\_status module -========================================================== - -.. automodule:: kubernetes.client.models.v1_load_balancer_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_local_object_reference.rst b/doc/source/kubernetes.client.models.v1_local_object_reference.rst deleted file mode 100644 index 68e753b7a6..0000000000 --- a/doc/source/kubernetes.client.models.v1_local_object_reference.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_local\_object\_reference module -============================================================ - -.. automodule:: kubernetes.client.models.v1_local_object_reference - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_local_subject_access_review.rst b/doc/source/kubernetes.client.models.v1_local_subject_access_review.rst deleted file mode 100644 index 6f63cf60fc..0000000000 --- a/doc/source/kubernetes.client.models.v1_local_subject_access_review.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_local\_subject\_access\_review module -================================================================== - -.. automodule:: kubernetes.client.models.v1_local_subject_access_review - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_local_volume_source.rst b/doc/source/kubernetes.client.models.v1_local_volume_source.rst deleted file mode 100644 index a884822d4c..0000000000 --- a/doc/source/kubernetes.client.models.v1_local_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_local\_volume\_source module -========================================================= - -.. automodule:: kubernetes.client.models.v1_local_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_managed_fields_entry.rst b/doc/source/kubernetes.client.models.v1_managed_fields_entry.rst deleted file mode 100644 index c51da79d07..0000000000 --- a/doc/source/kubernetes.client.models.v1_managed_fields_entry.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_managed\_fields\_entry module -========================================================== - -.. automodule:: kubernetes.client.models.v1_managed_fields_entry - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_match_condition.rst b/doc/source/kubernetes.client.models.v1_match_condition.rst deleted file mode 100644 index 4baad46240..0000000000 --- a/doc/source/kubernetes.client.models.v1_match_condition.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_match\_condition module -==================================================== - -.. automodule:: kubernetes.client.models.v1_match_condition - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_match_resources.rst b/doc/source/kubernetes.client.models.v1_match_resources.rst deleted file mode 100644 index 78f6c25faf..0000000000 --- a/doc/source/kubernetes.client.models.v1_match_resources.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_match\_resources module -==================================================== - -.. automodule:: kubernetes.client.models.v1_match_resources - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_modify_volume_status.rst b/doc/source/kubernetes.client.models.v1_modify_volume_status.rst deleted file mode 100644 index c70831c0f5..0000000000 --- a/doc/source/kubernetes.client.models.v1_modify_volume_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_modify\_volume\_status module -========================================================== - -.. automodule:: kubernetes.client.models.v1_modify_volume_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_mutating_webhook.rst b/doc/source/kubernetes.client.models.v1_mutating_webhook.rst deleted file mode 100644 index 4345b3530e..0000000000 --- a/doc/source/kubernetes.client.models.v1_mutating_webhook.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_mutating\_webhook module -===================================================== - -.. automodule:: kubernetes.client.models.v1_mutating_webhook - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_mutating_webhook_configuration.rst b/doc/source/kubernetes.client.models.v1_mutating_webhook_configuration.rst deleted file mode 100644 index ab45feb08b..0000000000 --- a/doc/source/kubernetes.client.models.v1_mutating_webhook_configuration.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_mutating\_webhook\_configuration module -==================================================================== - -.. automodule:: kubernetes.client.models.v1_mutating_webhook_configuration - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_mutating_webhook_configuration_list.rst b/doc/source/kubernetes.client.models.v1_mutating_webhook_configuration_list.rst deleted file mode 100644 index c36513f6d4..0000000000 --- a/doc/source/kubernetes.client.models.v1_mutating_webhook_configuration_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_mutating\_webhook\_configuration\_list module -========================================================================== - -.. automodule:: kubernetes.client.models.v1_mutating_webhook_configuration_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_named_rule_with_operations.rst b/doc/source/kubernetes.client.models.v1_named_rule_with_operations.rst deleted file mode 100644 index e31a4ec25a..0000000000 --- a/doc/source/kubernetes.client.models.v1_named_rule_with_operations.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_named\_rule\_with\_operations module -================================================================= - -.. automodule:: kubernetes.client.models.v1_named_rule_with_operations - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_namespace.rst b/doc/source/kubernetes.client.models.v1_namespace.rst deleted file mode 100644 index aa07a9ae4a..0000000000 --- a/doc/source/kubernetes.client.models.v1_namespace.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_namespace module -============================================= - -.. automodule:: kubernetes.client.models.v1_namespace - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_namespace_condition.rst b/doc/source/kubernetes.client.models.v1_namespace_condition.rst deleted file mode 100644 index 39749c21c9..0000000000 --- a/doc/source/kubernetes.client.models.v1_namespace_condition.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_namespace\_condition module -======================================================== - -.. automodule:: kubernetes.client.models.v1_namespace_condition - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_namespace_list.rst b/doc/source/kubernetes.client.models.v1_namespace_list.rst deleted file mode 100644 index 5de5b03ca3..0000000000 --- a/doc/source/kubernetes.client.models.v1_namespace_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_namespace\_list module -=================================================== - -.. automodule:: kubernetes.client.models.v1_namespace_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_namespace_spec.rst b/doc/source/kubernetes.client.models.v1_namespace_spec.rst deleted file mode 100644 index c563d5c523..0000000000 --- a/doc/source/kubernetes.client.models.v1_namespace_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_namespace\_spec module -=================================================== - -.. automodule:: kubernetes.client.models.v1_namespace_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_namespace_status.rst b/doc/source/kubernetes.client.models.v1_namespace_status.rst deleted file mode 100644 index fefef28b7f..0000000000 --- a/doc/source/kubernetes.client.models.v1_namespace_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_namespace\_status module -===================================================== - -.. automodule:: kubernetes.client.models.v1_namespace_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_network_policy.rst b/doc/source/kubernetes.client.models.v1_network_policy.rst deleted file mode 100644 index 22d5022fe3..0000000000 --- a/doc/source/kubernetes.client.models.v1_network_policy.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_network\_policy module -=================================================== - -.. automodule:: kubernetes.client.models.v1_network_policy - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_network_policy_egress_rule.rst b/doc/source/kubernetes.client.models.v1_network_policy_egress_rule.rst deleted file mode 100644 index 22cd3e8c16..0000000000 --- a/doc/source/kubernetes.client.models.v1_network_policy_egress_rule.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_network\_policy\_egress\_rule module -================================================================= - -.. automodule:: kubernetes.client.models.v1_network_policy_egress_rule - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_network_policy_ingress_rule.rst b/doc/source/kubernetes.client.models.v1_network_policy_ingress_rule.rst deleted file mode 100644 index 3d1abe1c6f..0000000000 --- a/doc/source/kubernetes.client.models.v1_network_policy_ingress_rule.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_network\_policy\_ingress\_rule module -================================================================== - -.. automodule:: kubernetes.client.models.v1_network_policy_ingress_rule - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_network_policy_list.rst b/doc/source/kubernetes.client.models.v1_network_policy_list.rst deleted file mode 100644 index 08281addb0..0000000000 --- a/doc/source/kubernetes.client.models.v1_network_policy_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_network\_policy\_list module -========================================================= - -.. automodule:: kubernetes.client.models.v1_network_policy_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_network_policy_peer.rst b/doc/source/kubernetes.client.models.v1_network_policy_peer.rst deleted file mode 100644 index 3b3f7a33e7..0000000000 --- a/doc/source/kubernetes.client.models.v1_network_policy_peer.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_network\_policy\_peer module -========================================================= - -.. automodule:: kubernetes.client.models.v1_network_policy_peer - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_network_policy_port.rst b/doc/source/kubernetes.client.models.v1_network_policy_port.rst deleted file mode 100644 index b885b3de1a..0000000000 --- a/doc/source/kubernetes.client.models.v1_network_policy_port.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_network\_policy\_port module -========================================================= - -.. automodule:: kubernetes.client.models.v1_network_policy_port - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_network_policy_spec.rst b/doc/source/kubernetes.client.models.v1_network_policy_spec.rst deleted file mode 100644 index 2ad9fda11e..0000000000 --- a/doc/source/kubernetes.client.models.v1_network_policy_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_network\_policy\_spec module -========================================================= - -.. automodule:: kubernetes.client.models.v1_network_policy_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_nfs_volume_source.rst b/doc/source/kubernetes.client.models.v1_nfs_volume_source.rst deleted file mode 100644 index 8f76ff0813..0000000000 --- a/doc/source/kubernetes.client.models.v1_nfs_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_nfs\_volume\_source module -======================================================= - -.. automodule:: kubernetes.client.models.v1_nfs_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_node.rst b/doc/source/kubernetes.client.models.v1_node.rst deleted file mode 100644 index 23f576d815..0000000000 --- a/doc/source/kubernetes.client.models.v1_node.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_node module -======================================== - -.. automodule:: kubernetes.client.models.v1_node - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_node_address.rst b/doc/source/kubernetes.client.models.v1_node_address.rst deleted file mode 100644 index 8f61d1a2d9..0000000000 --- a/doc/source/kubernetes.client.models.v1_node_address.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_node\_address module -================================================= - -.. automodule:: kubernetes.client.models.v1_node_address - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_node_affinity.rst b/doc/source/kubernetes.client.models.v1_node_affinity.rst deleted file mode 100644 index 5d4676d757..0000000000 --- a/doc/source/kubernetes.client.models.v1_node_affinity.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_node\_affinity module -================================================== - -.. automodule:: kubernetes.client.models.v1_node_affinity - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_node_condition.rst b/doc/source/kubernetes.client.models.v1_node_condition.rst deleted file mode 100644 index f7a42f6cd1..0000000000 --- a/doc/source/kubernetes.client.models.v1_node_condition.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_node\_condition module -=================================================== - -.. automodule:: kubernetes.client.models.v1_node_condition - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_node_config_source.rst b/doc/source/kubernetes.client.models.v1_node_config_source.rst deleted file mode 100644 index 11e20467d6..0000000000 --- a/doc/source/kubernetes.client.models.v1_node_config_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_node\_config\_source module -======================================================== - -.. automodule:: kubernetes.client.models.v1_node_config_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_node_config_status.rst b/doc/source/kubernetes.client.models.v1_node_config_status.rst deleted file mode 100644 index 72d99dacc3..0000000000 --- a/doc/source/kubernetes.client.models.v1_node_config_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_node\_config\_status module -======================================================== - -.. automodule:: kubernetes.client.models.v1_node_config_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_node_daemon_endpoints.rst b/doc/source/kubernetes.client.models.v1_node_daemon_endpoints.rst deleted file mode 100644 index 6b557bbfba..0000000000 --- a/doc/source/kubernetes.client.models.v1_node_daemon_endpoints.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_node\_daemon\_endpoints module -=========================================================== - -.. automodule:: kubernetes.client.models.v1_node_daemon_endpoints - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_node_list.rst b/doc/source/kubernetes.client.models.v1_node_list.rst deleted file mode 100644 index fde510e840..0000000000 --- a/doc/source/kubernetes.client.models.v1_node_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_node\_list module -============================================== - -.. automodule:: kubernetes.client.models.v1_node_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_node_runtime_handler.rst b/doc/source/kubernetes.client.models.v1_node_runtime_handler.rst deleted file mode 100644 index 2fb30183d6..0000000000 --- a/doc/source/kubernetes.client.models.v1_node_runtime_handler.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_node\_runtime\_handler module -========================================================== - -.. automodule:: kubernetes.client.models.v1_node_runtime_handler - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_node_runtime_handler_features.rst b/doc/source/kubernetes.client.models.v1_node_runtime_handler_features.rst deleted file mode 100644 index 59319a7a0c..0000000000 --- a/doc/source/kubernetes.client.models.v1_node_runtime_handler_features.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_node\_runtime\_handler\_features module -==================================================================== - -.. automodule:: kubernetes.client.models.v1_node_runtime_handler_features - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_node_selector.rst b/doc/source/kubernetes.client.models.v1_node_selector.rst deleted file mode 100644 index 53d1b66ee6..0000000000 --- a/doc/source/kubernetes.client.models.v1_node_selector.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_node\_selector module -================================================== - -.. automodule:: kubernetes.client.models.v1_node_selector - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_node_selector_requirement.rst b/doc/source/kubernetes.client.models.v1_node_selector_requirement.rst deleted file mode 100644 index c881508068..0000000000 --- a/doc/source/kubernetes.client.models.v1_node_selector_requirement.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_node\_selector\_requirement module -=============================================================== - -.. automodule:: kubernetes.client.models.v1_node_selector_requirement - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_node_selector_term.rst b/doc/source/kubernetes.client.models.v1_node_selector_term.rst deleted file mode 100644 index b7dbcd915f..0000000000 --- a/doc/source/kubernetes.client.models.v1_node_selector_term.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_node\_selector\_term module -======================================================== - -.. automodule:: kubernetes.client.models.v1_node_selector_term - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_node_spec.rst b/doc/source/kubernetes.client.models.v1_node_spec.rst deleted file mode 100644 index a5dec42b77..0000000000 --- a/doc/source/kubernetes.client.models.v1_node_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_node\_spec module -============================================== - -.. automodule:: kubernetes.client.models.v1_node_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_node_status.rst b/doc/source/kubernetes.client.models.v1_node_status.rst deleted file mode 100644 index 4bde8be656..0000000000 --- a/doc/source/kubernetes.client.models.v1_node_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_node\_status module -================================================ - -.. automodule:: kubernetes.client.models.v1_node_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_node_system_info.rst b/doc/source/kubernetes.client.models.v1_node_system_info.rst deleted file mode 100644 index a49df918b1..0000000000 --- a/doc/source/kubernetes.client.models.v1_node_system_info.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_node\_system\_info module -====================================================== - -.. automodule:: kubernetes.client.models.v1_node_system_info - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_non_resource_attributes.rst b/doc/source/kubernetes.client.models.v1_non_resource_attributes.rst deleted file mode 100644 index f05b809190..0000000000 --- a/doc/source/kubernetes.client.models.v1_non_resource_attributes.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_non\_resource\_attributes module -============================================================= - -.. automodule:: kubernetes.client.models.v1_non_resource_attributes - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_non_resource_policy_rule.rst b/doc/source/kubernetes.client.models.v1_non_resource_policy_rule.rst deleted file mode 100644 index d3c1db5b4b..0000000000 --- a/doc/source/kubernetes.client.models.v1_non_resource_policy_rule.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_non\_resource\_policy\_rule module -=============================================================== - -.. automodule:: kubernetes.client.models.v1_non_resource_policy_rule - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_non_resource_rule.rst b/doc/source/kubernetes.client.models.v1_non_resource_rule.rst deleted file mode 100644 index 6ab655cf2e..0000000000 --- a/doc/source/kubernetes.client.models.v1_non_resource_rule.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_non\_resource\_rule module -======================================================= - -.. automodule:: kubernetes.client.models.v1_non_resource_rule - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_object_field_selector.rst b/doc/source/kubernetes.client.models.v1_object_field_selector.rst deleted file mode 100644 index 834c6104a0..0000000000 --- a/doc/source/kubernetes.client.models.v1_object_field_selector.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_object\_field\_selector module -=========================================================== - -.. automodule:: kubernetes.client.models.v1_object_field_selector - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_object_meta.rst b/doc/source/kubernetes.client.models.v1_object_meta.rst deleted file mode 100644 index 3df69a7078..0000000000 --- a/doc/source/kubernetes.client.models.v1_object_meta.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_object\_meta module -================================================ - -.. automodule:: kubernetes.client.models.v1_object_meta - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_object_reference.rst b/doc/source/kubernetes.client.models.v1_object_reference.rst deleted file mode 100644 index b989686bab..0000000000 --- a/doc/source/kubernetes.client.models.v1_object_reference.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_object\_reference module -===================================================== - -.. automodule:: kubernetes.client.models.v1_object_reference - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_overhead.rst b/doc/source/kubernetes.client.models.v1_overhead.rst deleted file mode 100644 index 16ae2a3686..0000000000 --- a/doc/source/kubernetes.client.models.v1_overhead.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_overhead module -============================================ - -.. automodule:: kubernetes.client.models.v1_overhead - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_owner_reference.rst b/doc/source/kubernetes.client.models.v1_owner_reference.rst deleted file mode 100644 index 047e0812f8..0000000000 --- a/doc/source/kubernetes.client.models.v1_owner_reference.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_owner\_reference module -==================================================== - -.. automodule:: kubernetes.client.models.v1_owner_reference - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_param_kind.rst b/doc/source/kubernetes.client.models.v1_param_kind.rst deleted file mode 100644 index 6c82938a84..0000000000 --- a/doc/source/kubernetes.client.models.v1_param_kind.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_param\_kind module -=============================================== - -.. automodule:: kubernetes.client.models.v1_param_kind - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_param_ref.rst b/doc/source/kubernetes.client.models.v1_param_ref.rst deleted file mode 100644 index ade126f4b0..0000000000 --- a/doc/source/kubernetes.client.models.v1_param_ref.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_param\_ref module -============================================== - -.. automodule:: kubernetes.client.models.v1_param_ref - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_persistent_volume.rst b/doc/source/kubernetes.client.models.v1_persistent_volume.rst deleted file mode 100644 index 4d586b3bb6..0000000000 --- a/doc/source/kubernetes.client.models.v1_persistent_volume.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_persistent\_volume module -====================================================== - -.. automodule:: kubernetes.client.models.v1_persistent_volume - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_persistent_volume_claim.rst b/doc/source/kubernetes.client.models.v1_persistent_volume_claim.rst deleted file mode 100644 index 7da0915384..0000000000 --- a/doc/source/kubernetes.client.models.v1_persistent_volume_claim.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_persistent\_volume\_claim module -============================================================= - -.. automodule:: kubernetes.client.models.v1_persistent_volume_claim - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_persistent_volume_claim_condition.rst b/doc/source/kubernetes.client.models.v1_persistent_volume_claim_condition.rst deleted file mode 100644 index f5b1518b07..0000000000 --- a/doc/source/kubernetes.client.models.v1_persistent_volume_claim_condition.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_persistent\_volume\_claim\_condition module -======================================================================== - -.. automodule:: kubernetes.client.models.v1_persistent_volume_claim_condition - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_persistent_volume_claim_list.rst b/doc/source/kubernetes.client.models.v1_persistent_volume_claim_list.rst deleted file mode 100644 index 1fa984eb18..0000000000 --- a/doc/source/kubernetes.client.models.v1_persistent_volume_claim_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_persistent\_volume\_claim\_list module -=================================================================== - -.. automodule:: kubernetes.client.models.v1_persistent_volume_claim_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_persistent_volume_claim_spec.rst b/doc/source/kubernetes.client.models.v1_persistent_volume_claim_spec.rst deleted file mode 100644 index ccad63ee00..0000000000 --- a/doc/source/kubernetes.client.models.v1_persistent_volume_claim_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_persistent\_volume\_claim\_spec module -=================================================================== - -.. automodule:: kubernetes.client.models.v1_persistent_volume_claim_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_persistent_volume_claim_status.rst b/doc/source/kubernetes.client.models.v1_persistent_volume_claim_status.rst deleted file mode 100644 index 59f982d36f..0000000000 --- a/doc/source/kubernetes.client.models.v1_persistent_volume_claim_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_persistent\_volume\_claim\_status module -===================================================================== - -.. automodule:: kubernetes.client.models.v1_persistent_volume_claim_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_persistent_volume_claim_template.rst b/doc/source/kubernetes.client.models.v1_persistent_volume_claim_template.rst deleted file mode 100644 index 5829496634..0000000000 --- a/doc/source/kubernetes.client.models.v1_persistent_volume_claim_template.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_persistent\_volume\_claim\_template module -======================================================================= - -.. automodule:: kubernetes.client.models.v1_persistent_volume_claim_template - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_persistent_volume_claim_volume_source.rst b/doc/source/kubernetes.client.models.v1_persistent_volume_claim_volume_source.rst deleted file mode 100644 index a9cc87db8d..0000000000 --- a/doc/source/kubernetes.client.models.v1_persistent_volume_claim_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_persistent\_volume\_claim\_volume\_source module -============================================================================= - -.. automodule:: kubernetes.client.models.v1_persistent_volume_claim_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_persistent_volume_list.rst b/doc/source/kubernetes.client.models.v1_persistent_volume_list.rst deleted file mode 100644 index 74697df462..0000000000 --- a/doc/source/kubernetes.client.models.v1_persistent_volume_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_persistent\_volume\_list module -============================================================ - -.. automodule:: kubernetes.client.models.v1_persistent_volume_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_persistent_volume_spec.rst b/doc/source/kubernetes.client.models.v1_persistent_volume_spec.rst deleted file mode 100644 index 30f91892d3..0000000000 --- a/doc/source/kubernetes.client.models.v1_persistent_volume_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_persistent\_volume\_spec module -============================================================ - -.. automodule:: kubernetes.client.models.v1_persistent_volume_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_persistent_volume_status.rst b/doc/source/kubernetes.client.models.v1_persistent_volume_status.rst deleted file mode 100644 index a412ed16ee..0000000000 --- a/doc/source/kubernetes.client.models.v1_persistent_volume_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_persistent\_volume\_status module -============================================================== - -.. automodule:: kubernetes.client.models.v1_persistent_volume_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_photon_persistent_disk_volume_source.rst b/doc/source/kubernetes.client.models.v1_photon_persistent_disk_volume_source.rst deleted file mode 100644 index d1b128bc87..0000000000 --- a/doc/source/kubernetes.client.models.v1_photon_persistent_disk_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_photon\_persistent\_disk\_volume\_source module -============================================================================ - -.. automodule:: kubernetes.client.models.v1_photon_persistent_disk_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_pod.rst b/doc/source/kubernetes.client.models.v1_pod.rst deleted file mode 100644 index 8d28910695..0000000000 --- a/doc/source/kubernetes.client.models.v1_pod.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_pod module -======================================= - -.. automodule:: kubernetes.client.models.v1_pod - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_pod_affinity.rst b/doc/source/kubernetes.client.models.v1_pod_affinity.rst deleted file mode 100644 index 7616effdc2..0000000000 --- a/doc/source/kubernetes.client.models.v1_pod_affinity.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_pod\_affinity module -================================================= - -.. automodule:: kubernetes.client.models.v1_pod_affinity - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_pod_affinity_term.rst b/doc/source/kubernetes.client.models.v1_pod_affinity_term.rst deleted file mode 100644 index 35c9df4edc..0000000000 --- a/doc/source/kubernetes.client.models.v1_pod_affinity_term.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_pod\_affinity\_term module -======================================================= - -.. automodule:: kubernetes.client.models.v1_pod_affinity_term - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_pod_anti_affinity.rst b/doc/source/kubernetes.client.models.v1_pod_anti_affinity.rst deleted file mode 100644 index 1173db6166..0000000000 --- a/doc/source/kubernetes.client.models.v1_pod_anti_affinity.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_pod\_anti\_affinity module -======================================================= - -.. automodule:: kubernetes.client.models.v1_pod_anti_affinity - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_pod_condition.rst b/doc/source/kubernetes.client.models.v1_pod_condition.rst deleted file mode 100644 index f660636af4..0000000000 --- a/doc/source/kubernetes.client.models.v1_pod_condition.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_pod\_condition module -================================================== - -.. automodule:: kubernetes.client.models.v1_pod_condition - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_pod_disruption_budget.rst b/doc/source/kubernetes.client.models.v1_pod_disruption_budget.rst deleted file mode 100644 index d565a821ec..0000000000 --- a/doc/source/kubernetes.client.models.v1_pod_disruption_budget.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_pod\_disruption\_budget module -=========================================================== - -.. automodule:: kubernetes.client.models.v1_pod_disruption_budget - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_pod_disruption_budget_list.rst b/doc/source/kubernetes.client.models.v1_pod_disruption_budget_list.rst deleted file mode 100644 index b06755c8e6..0000000000 --- a/doc/source/kubernetes.client.models.v1_pod_disruption_budget_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_pod\_disruption\_budget\_list module -================================================================= - -.. automodule:: kubernetes.client.models.v1_pod_disruption_budget_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_pod_disruption_budget_spec.rst b/doc/source/kubernetes.client.models.v1_pod_disruption_budget_spec.rst deleted file mode 100644 index 6eb4c2b161..0000000000 --- a/doc/source/kubernetes.client.models.v1_pod_disruption_budget_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_pod\_disruption\_budget\_spec module -================================================================= - -.. automodule:: kubernetes.client.models.v1_pod_disruption_budget_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_pod_disruption_budget_status.rst b/doc/source/kubernetes.client.models.v1_pod_disruption_budget_status.rst deleted file mode 100644 index d6825e9016..0000000000 --- a/doc/source/kubernetes.client.models.v1_pod_disruption_budget_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_pod\_disruption\_budget\_status module -=================================================================== - -.. automodule:: kubernetes.client.models.v1_pod_disruption_budget_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_pod_dns_config.rst b/doc/source/kubernetes.client.models.v1_pod_dns_config.rst deleted file mode 100644 index eb0485c12c..0000000000 --- a/doc/source/kubernetes.client.models.v1_pod_dns_config.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_pod\_dns\_config module -==================================================== - -.. automodule:: kubernetes.client.models.v1_pod_dns_config - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_pod_dns_config_option.rst b/doc/source/kubernetes.client.models.v1_pod_dns_config_option.rst deleted file mode 100644 index 985c9749c2..0000000000 --- a/doc/source/kubernetes.client.models.v1_pod_dns_config_option.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_pod\_dns\_config\_option module -============================================================ - -.. automodule:: kubernetes.client.models.v1_pod_dns_config_option - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_pod_failure_policy.rst b/doc/source/kubernetes.client.models.v1_pod_failure_policy.rst deleted file mode 100644 index b6fb70de82..0000000000 --- a/doc/source/kubernetes.client.models.v1_pod_failure_policy.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_pod\_failure\_policy module -======================================================== - -.. automodule:: kubernetes.client.models.v1_pod_failure_policy - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_pod_failure_policy_on_exit_codes_requirement.rst b/doc/source/kubernetes.client.models.v1_pod_failure_policy_on_exit_codes_requirement.rst deleted file mode 100644 index 99cc5aa2ac..0000000000 --- a/doc/source/kubernetes.client.models.v1_pod_failure_policy_on_exit_codes_requirement.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_pod\_failure\_policy\_on\_exit\_codes\_requirement module -====================================================================================== - -.. automodule:: kubernetes.client.models.v1_pod_failure_policy_on_exit_codes_requirement - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_pod_failure_policy_on_pod_conditions_pattern.rst b/doc/source/kubernetes.client.models.v1_pod_failure_policy_on_pod_conditions_pattern.rst deleted file mode 100644 index f15f6ee3b2..0000000000 --- a/doc/source/kubernetes.client.models.v1_pod_failure_policy_on_pod_conditions_pattern.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_pod\_failure\_policy\_on\_pod\_conditions\_pattern module -====================================================================================== - -.. automodule:: kubernetes.client.models.v1_pod_failure_policy_on_pod_conditions_pattern - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_pod_failure_policy_rule.rst b/doc/source/kubernetes.client.models.v1_pod_failure_policy_rule.rst deleted file mode 100644 index 37bf13b3d3..0000000000 --- a/doc/source/kubernetes.client.models.v1_pod_failure_policy_rule.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_pod\_failure\_policy\_rule module -============================================================== - -.. automodule:: kubernetes.client.models.v1_pod_failure_policy_rule - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_pod_ip.rst b/doc/source/kubernetes.client.models.v1_pod_ip.rst deleted file mode 100644 index 3d0433a93e..0000000000 --- a/doc/source/kubernetes.client.models.v1_pod_ip.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_pod\_ip module -=========================================== - -.. automodule:: kubernetes.client.models.v1_pod_ip - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_pod_list.rst b/doc/source/kubernetes.client.models.v1_pod_list.rst deleted file mode 100644 index 841acf539c..0000000000 --- a/doc/source/kubernetes.client.models.v1_pod_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_pod\_list module -============================================= - -.. automodule:: kubernetes.client.models.v1_pod_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_pod_os.rst b/doc/source/kubernetes.client.models.v1_pod_os.rst deleted file mode 100644 index d1a8db1af6..0000000000 --- a/doc/source/kubernetes.client.models.v1_pod_os.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_pod\_os module -=========================================== - -.. automodule:: kubernetes.client.models.v1_pod_os - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_pod_readiness_gate.rst b/doc/source/kubernetes.client.models.v1_pod_readiness_gate.rst deleted file mode 100644 index 0bddea6fe5..0000000000 --- a/doc/source/kubernetes.client.models.v1_pod_readiness_gate.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_pod\_readiness\_gate module -======================================================== - -.. automodule:: kubernetes.client.models.v1_pod_readiness_gate - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_pod_resource_claim.rst b/doc/source/kubernetes.client.models.v1_pod_resource_claim.rst deleted file mode 100644 index 3f5f5dba14..0000000000 --- a/doc/source/kubernetes.client.models.v1_pod_resource_claim.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_pod\_resource\_claim module -======================================================== - -.. automodule:: kubernetes.client.models.v1_pod_resource_claim - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_pod_resource_claim_status.rst b/doc/source/kubernetes.client.models.v1_pod_resource_claim_status.rst deleted file mode 100644 index 8ac18c2f67..0000000000 --- a/doc/source/kubernetes.client.models.v1_pod_resource_claim_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_pod\_resource\_claim\_status module -================================================================ - -.. automodule:: kubernetes.client.models.v1_pod_resource_claim_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_pod_scheduling_gate.rst b/doc/source/kubernetes.client.models.v1_pod_scheduling_gate.rst deleted file mode 100644 index a28b1d584f..0000000000 --- a/doc/source/kubernetes.client.models.v1_pod_scheduling_gate.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_pod\_scheduling\_gate module -========================================================= - -.. automodule:: kubernetes.client.models.v1_pod_scheduling_gate - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_pod_security_context.rst b/doc/source/kubernetes.client.models.v1_pod_security_context.rst deleted file mode 100644 index 4f72694f2c..0000000000 --- a/doc/source/kubernetes.client.models.v1_pod_security_context.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_pod\_security\_context module -========================================================== - -.. automodule:: kubernetes.client.models.v1_pod_security_context - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_pod_spec.rst b/doc/source/kubernetes.client.models.v1_pod_spec.rst deleted file mode 100644 index 34504670d9..0000000000 --- a/doc/source/kubernetes.client.models.v1_pod_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_pod\_spec module -============================================= - -.. automodule:: kubernetes.client.models.v1_pod_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_pod_status.rst b/doc/source/kubernetes.client.models.v1_pod_status.rst deleted file mode 100644 index 0b6476dd0d..0000000000 --- a/doc/source/kubernetes.client.models.v1_pod_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_pod\_status module -=============================================== - -.. automodule:: kubernetes.client.models.v1_pod_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_pod_template.rst b/doc/source/kubernetes.client.models.v1_pod_template.rst deleted file mode 100644 index 168a525ff9..0000000000 --- a/doc/source/kubernetes.client.models.v1_pod_template.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_pod\_template module -================================================= - -.. automodule:: kubernetes.client.models.v1_pod_template - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_pod_template_list.rst b/doc/source/kubernetes.client.models.v1_pod_template_list.rst deleted file mode 100644 index 90d353322e..0000000000 --- a/doc/source/kubernetes.client.models.v1_pod_template_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_pod\_template\_list module -======================================================= - -.. automodule:: kubernetes.client.models.v1_pod_template_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_pod_template_spec.rst b/doc/source/kubernetes.client.models.v1_pod_template_spec.rst deleted file mode 100644 index 4bc0608950..0000000000 --- a/doc/source/kubernetes.client.models.v1_pod_template_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_pod\_template\_spec module -======================================================= - -.. automodule:: kubernetes.client.models.v1_pod_template_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_policy_rule.rst b/doc/source/kubernetes.client.models.v1_policy_rule.rst deleted file mode 100644 index 4232d28170..0000000000 --- a/doc/source/kubernetes.client.models.v1_policy_rule.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_policy\_rule module -================================================ - -.. automodule:: kubernetes.client.models.v1_policy_rule - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_policy_rules_with_subjects.rst b/doc/source/kubernetes.client.models.v1_policy_rules_with_subjects.rst deleted file mode 100644 index f97ba94d62..0000000000 --- a/doc/source/kubernetes.client.models.v1_policy_rules_with_subjects.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_policy\_rules\_with\_subjects module -================================================================= - -.. automodule:: kubernetes.client.models.v1_policy_rules_with_subjects - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_port_status.rst b/doc/source/kubernetes.client.models.v1_port_status.rst deleted file mode 100644 index 4c02cf382c..0000000000 --- a/doc/source/kubernetes.client.models.v1_port_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_port\_status module -================================================ - -.. automodule:: kubernetes.client.models.v1_port_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_portworx_volume_source.rst b/doc/source/kubernetes.client.models.v1_portworx_volume_source.rst deleted file mode 100644 index 0f867c34aa..0000000000 --- a/doc/source/kubernetes.client.models.v1_portworx_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_portworx\_volume\_source module -============================================================ - -.. automodule:: kubernetes.client.models.v1_portworx_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_preconditions.rst b/doc/source/kubernetes.client.models.v1_preconditions.rst deleted file mode 100644 index 5b1a8b4ff4..0000000000 --- a/doc/source/kubernetes.client.models.v1_preconditions.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_preconditions module -================================================= - -.. automodule:: kubernetes.client.models.v1_preconditions - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_preferred_scheduling_term.rst b/doc/source/kubernetes.client.models.v1_preferred_scheduling_term.rst deleted file mode 100644 index 26b90f2ddd..0000000000 --- a/doc/source/kubernetes.client.models.v1_preferred_scheduling_term.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_preferred\_scheduling\_term module -=============================================================== - -.. automodule:: kubernetes.client.models.v1_preferred_scheduling_term - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_priority_class.rst b/doc/source/kubernetes.client.models.v1_priority_class.rst deleted file mode 100644 index 06f26708f1..0000000000 --- a/doc/source/kubernetes.client.models.v1_priority_class.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_priority\_class module -=================================================== - -.. automodule:: kubernetes.client.models.v1_priority_class - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_priority_class_list.rst b/doc/source/kubernetes.client.models.v1_priority_class_list.rst deleted file mode 100644 index 78471cc9bc..0000000000 --- a/doc/source/kubernetes.client.models.v1_priority_class_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_priority\_class\_list module -========================================================= - -.. automodule:: kubernetes.client.models.v1_priority_class_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_priority_level_configuration.rst b/doc/source/kubernetes.client.models.v1_priority_level_configuration.rst deleted file mode 100644 index e1a66799d6..0000000000 --- a/doc/source/kubernetes.client.models.v1_priority_level_configuration.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_priority\_level\_configuration module -================================================================== - -.. automodule:: kubernetes.client.models.v1_priority_level_configuration - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_priority_level_configuration_condition.rst b/doc/source/kubernetes.client.models.v1_priority_level_configuration_condition.rst deleted file mode 100644 index daba910ea6..0000000000 --- a/doc/source/kubernetes.client.models.v1_priority_level_configuration_condition.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_priority\_level\_configuration\_condition module -============================================================================= - -.. automodule:: kubernetes.client.models.v1_priority_level_configuration_condition - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_priority_level_configuration_list.rst b/doc/source/kubernetes.client.models.v1_priority_level_configuration_list.rst deleted file mode 100644 index f9ea31d979..0000000000 --- a/doc/source/kubernetes.client.models.v1_priority_level_configuration_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_priority\_level\_configuration\_list module -======================================================================== - -.. automodule:: kubernetes.client.models.v1_priority_level_configuration_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_priority_level_configuration_reference.rst b/doc/source/kubernetes.client.models.v1_priority_level_configuration_reference.rst deleted file mode 100644 index 380b5b1282..0000000000 --- a/doc/source/kubernetes.client.models.v1_priority_level_configuration_reference.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_priority\_level\_configuration\_reference module -============================================================================= - -.. automodule:: kubernetes.client.models.v1_priority_level_configuration_reference - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_priority_level_configuration_spec.rst b/doc/source/kubernetes.client.models.v1_priority_level_configuration_spec.rst deleted file mode 100644 index c23509a54d..0000000000 --- a/doc/source/kubernetes.client.models.v1_priority_level_configuration_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_priority\_level\_configuration\_spec module -======================================================================== - -.. automodule:: kubernetes.client.models.v1_priority_level_configuration_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_priority_level_configuration_status.rst b/doc/source/kubernetes.client.models.v1_priority_level_configuration_status.rst deleted file mode 100644 index 8522f266b1..0000000000 --- a/doc/source/kubernetes.client.models.v1_priority_level_configuration_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_priority\_level\_configuration\_status module -========================================================================== - -.. automodule:: kubernetes.client.models.v1_priority_level_configuration_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_probe.rst b/doc/source/kubernetes.client.models.v1_probe.rst deleted file mode 100644 index c6cb79f181..0000000000 --- a/doc/source/kubernetes.client.models.v1_probe.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_probe module -========================================= - -.. automodule:: kubernetes.client.models.v1_probe - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_projected_volume_source.rst b/doc/source/kubernetes.client.models.v1_projected_volume_source.rst deleted file mode 100644 index c9919d5f93..0000000000 --- a/doc/source/kubernetes.client.models.v1_projected_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_projected\_volume\_source module -============================================================= - -.. automodule:: kubernetes.client.models.v1_projected_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_queuing_configuration.rst b/doc/source/kubernetes.client.models.v1_queuing_configuration.rst deleted file mode 100644 index 96ba0f3fd4..0000000000 --- a/doc/source/kubernetes.client.models.v1_queuing_configuration.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_queuing\_configuration module -========================================================== - -.. automodule:: kubernetes.client.models.v1_queuing_configuration - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_quobyte_volume_source.rst b/doc/source/kubernetes.client.models.v1_quobyte_volume_source.rst deleted file mode 100644 index 809d4c1eab..0000000000 --- a/doc/source/kubernetes.client.models.v1_quobyte_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_quobyte\_volume\_source module -=========================================================== - -.. automodule:: kubernetes.client.models.v1_quobyte_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_rbd_persistent_volume_source.rst b/doc/source/kubernetes.client.models.v1_rbd_persistent_volume_source.rst deleted file mode 100644 index 2710c70a8b..0000000000 --- a/doc/source/kubernetes.client.models.v1_rbd_persistent_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_rbd\_persistent\_volume\_source module -=================================================================== - -.. automodule:: kubernetes.client.models.v1_rbd_persistent_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_rbd_volume_source.rst b/doc/source/kubernetes.client.models.v1_rbd_volume_source.rst deleted file mode 100644 index c3ec93b178..0000000000 --- a/doc/source/kubernetes.client.models.v1_rbd_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_rbd\_volume\_source module -======================================================= - -.. automodule:: kubernetes.client.models.v1_rbd_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_replica_set.rst b/doc/source/kubernetes.client.models.v1_replica_set.rst deleted file mode 100644 index e9bcfb169c..0000000000 --- a/doc/source/kubernetes.client.models.v1_replica_set.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_replica\_set module -================================================ - -.. automodule:: kubernetes.client.models.v1_replica_set - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_replica_set_condition.rst b/doc/source/kubernetes.client.models.v1_replica_set_condition.rst deleted file mode 100644 index e60aaa1655..0000000000 --- a/doc/source/kubernetes.client.models.v1_replica_set_condition.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_replica\_set\_condition module -=========================================================== - -.. automodule:: kubernetes.client.models.v1_replica_set_condition - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_replica_set_list.rst b/doc/source/kubernetes.client.models.v1_replica_set_list.rst deleted file mode 100644 index 742364f28f..0000000000 --- a/doc/source/kubernetes.client.models.v1_replica_set_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_replica\_set\_list module -====================================================== - -.. automodule:: kubernetes.client.models.v1_replica_set_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_replica_set_spec.rst b/doc/source/kubernetes.client.models.v1_replica_set_spec.rst deleted file mode 100644 index 104072cab2..0000000000 --- a/doc/source/kubernetes.client.models.v1_replica_set_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_replica\_set\_spec module -====================================================== - -.. automodule:: kubernetes.client.models.v1_replica_set_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_replica_set_status.rst b/doc/source/kubernetes.client.models.v1_replica_set_status.rst deleted file mode 100644 index c68c954786..0000000000 --- a/doc/source/kubernetes.client.models.v1_replica_set_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_replica\_set\_status module -======================================================== - -.. automodule:: kubernetes.client.models.v1_replica_set_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_replication_controller.rst b/doc/source/kubernetes.client.models.v1_replication_controller.rst deleted file mode 100644 index dced892b70..0000000000 --- a/doc/source/kubernetes.client.models.v1_replication_controller.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_replication\_controller module -=========================================================== - -.. automodule:: kubernetes.client.models.v1_replication_controller - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_replication_controller_condition.rst b/doc/source/kubernetes.client.models.v1_replication_controller_condition.rst deleted file mode 100644 index a377ca5fe8..0000000000 --- a/doc/source/kubernetes.client.models.v1_replication_controller_condition.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_replication\_controller\_condition module -====================================================================== - -.. automodule:: kubernetes.client.models.v1_replication_controller_condition - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_replication_controller_list.rst b/doc/source/kubernetes.client.models.v1_replication_controller_list.rst deleted file mode 100644 index 11621a4918..0000000000 --- a/doc/source/kubernetes.client.models.v1_replication_controller_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_replication\_controller\_list module -================================================================= - -.. automodule:: kubernetes.client.models.v1_replication_controller_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_replication_controller_spec.rst b/doc/source/kubernetes.client.models.v1_replication_controller_spec.rst deleted file mode 100644 index a77365d59c..0000000000 --- a/doc/source/kubernetes.client.models.v1_replication_controller_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_replication\_controller\_spec module -================================================================= - -.. automodule:: kubernetes.client.models.v1_replication_controller_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_replication_controller_status.rst b/doc/source/kubernetes.client.models.v1_replication_controller_status.rst deleted file mode 100644 index 8657911f47..0000000000 --- a/doc/source/kubernetes.client.models.v1_replication_controller_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_replication\_controller\_status module -=================================================================== - -.. automodule:: kubernetes.client.models.v1_replication_controller_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_resource_attributes.rst b/doc/source/kubernetes.client.models.v1_resource_attributes.rst deleted file mode 100644 index 115551b256..0000000000 --- a/doc/source/kubernetes.client.models.v1_resource_attributes.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_resource\_attributes module -======================================================== - -.. automodule:: kubernetes.client.models.v1_resource_attributes - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_resource_claim.rst b/doc/source/kubernetes.client.models.v1_resource_claim.rst deleted file mode 100644 index dacf674797..0000000000 --- a/doc/source/kubernetes.client.models.v1_resource_claim.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_resource\_claim module -=================================================== - -.. automodule:: kubernetes.client.models.v1_resource_claim - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_resource_field_selector.rst b/doc/source/kubernetes.client.models.v1_resource_field_selector.rst deleted file mode 100644 index 98ebfc70c5..0000000000 --- a/doc/source/kubernetes.client.models.v1_resource_field_selector.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_resource\_field\_selector module -============================================================= - -.. automodule:: kubernetes.client.models.v1_resource_field_selector - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_resource_policy_rule.rst b/doc/source/kubernetes.client.models.v1_resource_policy_rule.rst deleted file mode 100644 index bd2ad8ce4e..0000000000 --- a/doc/source/kubernetes.client.models.v1_resource_policy_rule.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_resource\_policy\_rule module -========================================================== - -.. automodule:: kubernetes.client.models.v1_resource_policy_rule - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_resource_quota.rst b/doc/source/kubernetes.client.models.v1_resource_quota.rst deleted file mode 100644 index 6fcba83b40..0000000000 --- a/doc/source/kubernetes.client.models.v1_resource_quota.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_resource\_quota module -=================================================== - -.. automodule:: kubernetes.client.models.v1_resource_quota - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_resource_quota_list.rst b/doc/source/kubernetes.client.models.v1_resource_quota_list.rst deleted file mode 100644 index 7cf1457e69..0000000000 --- a/doc/source/kubernetes.client.models.v1_resource_quota_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_resource\_quota\_list module -========================================================= - -.. automodule:: kubernetes.client.models.v1_resource_quota_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_resource_quota_spec.rst b/doc/source/kubernetes.client.models.v1_resource_quota_spec.rst deleted file mode 100644 index 7dfd8410e4..0000000000 --- a/doc/source/kubernetes.client.models.v1_resource_quota_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_resource\_quota\_spec module -========================================================= - -.. automodule:: kubernetes.client.models.v1_resource_quota_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_resource_quota_status.rst b/doc/source/kubernetes.client.models.v1_resource_quota_status.rst deleted file mode 100644 index 5c68b7543d..0000000000 --- a/doc/source/kubernetes.client.models.v1_resource_quota_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_resource\_quota\_status module -=========================================================== - -.. automodule:: kubernetes.client.models.v1_resource_quota_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_resource_requirements.rst b/doc/source/kubernetes.client.models.v1_resource_requirements.rst deleted file mode 100644 index fc31201bb9..0000000000 --- a/doc/source/kubernetes.client.models.v1_resource_requirements.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_resource\_requirements module -========================================================== - -.. automodule:: kubernetes.client.models.v1_resource_requirements - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_resource_rule.rst b/doc/source/kubernetes.client.models.v1_resource_rule.rst deleted file mode 100644 index e05ee75af4..0000000000 --- a/doc/source/kubernetes.client.models.v1_resource_rule.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_resource\_rule module -================================================== - -.. automodule:: kubernetes.client.models.v1_resource_rule - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_role.rst b/doc/source/kubernetes.client.models.v1_role.rst deleted file mode 100644 index 2d0067ea35..0000000000 --- a/doc/source/kubernetes.client.models.v1_role.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_role module -======================================== - -.. automodule:: kubernetes.client.models.v1_role - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_role_binding.rst b/doc/source/kubernetes.client.models.v1_role_binding.rst deleted file mode 100644 index 489ef81a5b..0000000000 --- a/doc/source/kubernetes.client.models.v1_role_binding.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_role\_binding module -================================================= - -.. automodule:: kubernetes.client.models.v1_role_binding - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_role_binding_list.rst b/doc/source/kubernetes.client.models.v1_role_binding_list.rst deleted file mode 100644 index bdb8d56735..0000000000 --- a/doc/source/kubernetes.client.models.v1_role_binding_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_role\_binding\_list module -======================================================= - -.. automodule:: kubernetes.client.models.v1_role_binding_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_role_list.rst b/doc/source/kubernetes.client.models.v1_role_list.rst deleted file mode 100644 index b3d01dfa4e..0000000000 --- a/doc/source/kubernetes.client.models.v1_role_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_role\_list module -============================================== - -.. automodule:: kubernetes.client.models.v1_role_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_role_ref.rst b/doc/source/kubernetes.client.models.v1_role_ref.rst deleted file mode 100644 index 976e66503a..0000000000 --- a/doc/source/kubernetes.client.models.v1_role_ref.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_role\_ref module -============================================= - -.. automodule:: kubernetes.client.models.v1_role_ref - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_rolling_update_daemon_set.rst b/doc/source/kubernetes.client.models.v1_rolling_update_daemon_set.rst deleted file mode 100644 index ea0bb99539..0000000000 --- a/doc/source/kubernetes.client.models.v1_rolling_update_daemon_set.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_rolling\_update\_daemon\_set module -================================================================ - -.. automodule:: kubernetes.client.models.v1_rolling_update_daemon_set - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_rolling_update_deployment.rst b/doc/source/kubernetes.client.models.v1_rolling_update_deployment.rst deleted file mode 100644 index 95f25d4288..0000000000 --- a/doc/source/kubernetes.client.models.v1_rolling_update_deployment.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_rolling\_update\_deployment module -=============================================================== - -.. automodule:: kubernetes.client.models.v1_rolling_update_deployment - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_rolling_update_stateful_set_strategy.rst b/doc/source/kubernetes.client.models.v1_rolling_update_stateful_set_strategy.rst deleted file mode 100644 index 6006b64231..0000000000 --- a/doc/source/kubernetes.client.models.v1_rolling_update_stateful_set_strategy.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_rolling\_update\_stateful\_set\_strategy module -============================================================================ - -.. automodule:: kubernetes.client.models.v1_rolling_update_stateful_set_strategy - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_rule_with_operations.rst b/doc/source/kubernetes.client.models.v1_rule_with_operations.rst deleted file mode 100644 index 0293f6f407..0000000000 --- a/doc/source/kubernetes.client.models.v1_rule_with_operations.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_rule\_with\_operations module -========================================================== - -.. automodule:: kubernetes.client.models.v1_rule_with_operations - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_runtime_class.rst b/doc/source/kubernetes.client.models.v1_runtime_class.rst deleted file mode 100644 index 7b92e138ef..0000000000 --- a/doc/source/kubernetes.client.models.v1_runtime_class.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_runtime\_class module -================================================== - -.. automodule:: kubernetes.client.models.v1_runtime_class - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_runtime_class_list.rst b/doc/source/kubernetes.client.models.v1_runtime_class_list.rst deleted file mode 100644 index 2a2baaaf92..0000000000 --- a/doc/source/kubernetes.client.models.v1_runtime_class_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_runtime\_class\_list module -======================================================== - -.. automodule:: kubernetes.client.models.v1_runtime_class_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_scale.rst b/doc/source/kubernetes.client.models.v1_scale.rst deleted file mode 100644 index 702c5e4039..0000000000 --- a/doc/source/kubernetes.client.models.v1_scale.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_scale module -========================================= - -.. automodule:: kubernetes.client.models.v1_scale - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_scale_io_persistent_volume_source.rst b/doc/source/kubernetes.client.models.v1_scale_io_persistent_volume_source.rst deleted file mode 100644 index a507ff6a74..0000000000 --- a/doc/source/kubernetes.client.models.v1_scale_io_persistent_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_scale\_io\_persistent\_volume\_source module -========================================================================= - -.. automodule:: kubernetes.client.models.v1_scale_io_persistent_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_scale_io_volume_source.rst b/doc/source/kubernetes.client.models.v1_scale_io_volume_source.rst deleted file mode 100644 index ad25f155eb..0000000000 --- a/doc/source/kubernetes.client.models.v1_scale_io_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_scale\_io\_volume\_source module -============================================================= - -.. automodule:: kubernetes.client.models.v1_scale_io_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_scale_spec.rst b/doc/source/kubernetes.client.models.v1_scale_spec.rst deleted file mode 100644 index f79730132e..0000000000 --- a/doc/source/kubernetes.client.models.v1_scale_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_scale\_spec module -=============================================== - -.. automodule:: kubernetes.client.models.v1_scale_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_scale_status.rst b/doc/source/kubernetes.client.models.v1_scale_status.rst deleted file mode 100644 index 5076eb487c..0000000000 --- a/doc/source/kubernetes.client.models.v1_scale_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_scale\_status module -================================================= - -.. automodule:: kubernetes.client.models.v1_scale_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_scheduling.rst b/doc/source/kubernetes.client.models.v1_scheduling.rst deleted file mode 100644 index 851c3f6163..0000000000 --- a/doc/source/kubernetes.client.models.v1_scheduling.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_scheduling module -============================================== - -.. automodule:: kubernetes.client.models.v1_scheduling - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_scope_selector.rst b/doc/source/kubernetes.client.models.v1_scope_selector.rst deleted file mode 100644 index 8db3f875b0..0000000000 --- a/doc/source/kubernetes.client.models.v1_scope_selector.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_scope\_selector module -=================================================== - -.. automodule:: kubernetes.client.models.v1_scope_selector - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_scoped_resource_selector_requirement.rst b/doc/source/kubernetes.client.models.v1_scoped_resource_selector_requirement.rst deleted file mode 100644 index 66f2ff8df5..0000000000 --- a/doc/source/kubernetes.client.models.v1_scoped_resource_selector_requirement.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_scoped\_resource\_selector\_requirement module -=========================================================================== - -.. automodule:: kubernetes.client.models.v1_scoped_resource_selector_requirement - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_se_linux_options.rst b/doc/source/kubernetes.client.models.v1_se_linux_options.rst deleted file mode 100644 index f216047e0d..0000000000 --- a/doc/source/kubernetes.client.models.v1_se_linux_options.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_se\_linux\_options module -====================================================== - -.. automodule:: kubernetes.client.models.v1_se_linux_options - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_seccomp_profile.rst b/doc/source/kubernetes.client.models.v1_seccomp_profile.rst deleted file mode 100644 index ecae5f63a1..0000000000 --- a/doc/source/kubernetes.client.models.v1_seccomp_profile.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_seccomp\_profile module -==================================================== - -.. automodule:: kubernetes.client.models.v1_seccomp_profile - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_secret.rst b/doc/source/kubernetes.client.models.v1_secret.rst deleted file mode 100644 index 6d34dd653a..0000000000 --- a/doc/source/kubernetes.client.models.v1_secret.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_secret module -========================================== - -.. automodule:: kubernetes.client.models.v1_secret - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_secret_env_source.rst b/doc/source/kubernetes.client.models.v1_secret_env_source.rst deleted file mode 100644 index c0a6c7a2fc..0000000000 --- a/doc/source/kubernetes.client.models.v1_secret_env_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_secret\_env\_source module -======================================================= - -.. automodule:: kubernetes.client.models.v1_secret_env_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_secret_key_selector.rst b/doc/source/kubernetes.client.models.v1_secret_key_selector.rst deleted file mode 100644 index 4a60ff03a3..0000000000 --- a/doc/source/kubernetes.client.models.v1_secret_key_selector.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_secret\_key\_selector module -========================================================= - -.. automodule:: kubernetes.client.models.v1_secret_key_selector - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_secret_list.rst b/doc/source/kubernetes.client.models.v1_secret_list.rst deleted file mode 100644 index a485d8295c..0000000000 --- a/doc/source/kubernetes.client.models.v1_secret_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_secret\_list module -================================================ - -.. automodule:: kubernetes.client.models.v1_secret_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_secret_projection.rst b/doc/source/kubernetes.client.models.v1_secret_projection.rst deleted file mode 100644 index 651288671f..0000000000 --- a/doc/source/kubernetes.client.models.v1_secret_projection.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_secret\_projection module -====================================================== - -.. automodule:: kubernetes.client.models.v1_secret_projection - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_secret_reference.rst b/doc/source/kubernetes.client.models.v1_secret_reference.rst deleted file mode 100644 index 03be4230af..0000000000 --- a/doc/source/kubernetes.client.models.v1_secret_reference.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_secret\_reference module -===================================================== - -.. automodule:: kubernetes.client.models.v1_secret_reference - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_secret_volume_source.rst b/doc/source/kubernetes.client.models.v1_secret_volume_source.rst deleted file mode 100644 index 2c5ee9fde7..0000000000 --- a/doc/source/kubernetes.client.models.v1_secret_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_secret\_volume\_source module -========================================================== - -.. automodule:: kubernetes.client.models.v1_secret_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_security_context.rst b/doc/source/kubernetes.client.models.v1_security_context.rst deleted file mode 100644 index 568b061808..0000000000 --- a/doc/source/kubernetes.client.models.v1_security_context.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_security\_context module -===================================================== - -.. automodule:: kubernetes.client.models.v1_security_context - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_selectable_field.rst b/doc/source/kubernetes.client.models.v1_selectable_field.rst deleted file mode 100644 index 9adad18990..0000000000 --- a/doc/source/kubernetes.client.models.v1_selectable_field.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_selectable\_field module -===================================================== - -.. automodule:: kubernetes.client.models.v1_selectable_field - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_self_subject_access_review.rst b/doc/source/kubernetes.client.models.v1_self_subject_access_review.rst deleted file mode 100644 index b10b1e8fed..0000000000 --- a/doc/source/kubernetes.client.models.v1_self_subject_access_review.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_self\_subject\_access\_review module -================================================================= - -.. automodule:: kubernetes.client.models.v1_self_subject_access_review - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_self_subject_access_review_spec.rst b/doc/source/kubernetes.client.models.v1_self_subject_access_review_spec.rst deleted file mode 100644 index 5d3b85e6f1..0000000000 --- a/doc/source/kubernetes.client.models.v1_self_subject_access_review_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_self\_subject\_access\_review\_spec module -======================================================================= - -.. automodule:: kubernetes.client.models.v1_self_subject_access_review_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_self_subject_review.rst b/doc/source/kubernetes.client.models.v1_self_subject_review.rst deleted file mode 100644 index 93163af5ef..0000000000 --- a/doc/source/kubernetes.client.models.v1_self_subject_review.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_self\_subject\_review module -========================================================= - -.. automodule:: kubernetes.client.models.v1_self_subject_review - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_self_subject_review_status.rst b/doc/source/kubernetes.client.models.v1_self_subject_review_status.rst deleted file mode 100644 index 0f359f3bc3..0000000000 --- a/doc/source/kubernetes.client.models.v1_self_subject_review_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_self\_subject\_review\_status module -================================================================= - -.. automodule:: kubernetes.client.models.v1_self_subject_review_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_self_subject_rules_review.rst b/doc/source/kubernetes.client.models.v1_self_subject_rules_review.rst deleted file mode 100644 index 6accd5c133..0000000000 --- a/doc/source/kubernetes.client.models.v1_self_subject_rules_review.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_self\_subject\_rules\_review module -================================================================ - -.. automodule:: kubernetes.client.models.v1_self_subject_rules_review - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_self_subject_rules_review_spec.rst b/doc/source/kubernetes.client.models.v1_self_subject_rules_review_spec.rst deleted file mode 100644 index 59cbf2a7b2..0000000000 --- a/doc/source/kubernetes.client.models.v1_self_subject_rules_review_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_self\_subject\_rules\_review\_spec module -====================================================================== - -.. automodule:: kubernetes.client.models.v1_self_subject_rules_review_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_server_address_by_client_cidr.rst b/doc/source/kubernetes.client.models.v1_server_address_by_client_cidr.rst deleted file mode 100644 index 9bbafee7ce..0000000000 --- a/doc/source/kubernetes.client.models.v1_server_address_by_client_cidr.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_server\_address\_by\_client\_cidr module -===================================================================== - -.. automodule:: kubernetes.client.models.v1_server_address_by_client_cidr - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_service.rst b/doc/source/kubernetes.client.models.v1_service.rst deleted file mode 100644 index f4d3ce7762..0000000000 --- a/doc/source/kubernetes.client.models.v1_service.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_service module -=========================================== - -.. automodule:: kubernetes.client.models.v1_service - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_service_account.rst b/doc/source/kubernetes.client.models.v1_service_account.rst deleted file mode 100644 index 6c4dec1c6c..0000000000 --- a/doc/source/kubernetes.client.models.v1_service_account.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_service\_account module -==================================================== - -.. automodule:: kubernetes.client.models.v1_service_account - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_service_account_list.rst b/doc/source/kubernetes.client.models.v1_service_account_list.rst deleted file mode 100644 index 2b584c9e4d..0000000000 --- a/doc/source/kubernetes.client.models.v1_service_account_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_service\_account\_list module -========================================================== - -.. automodule:: kubernetes.client.models.v1_service_account_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_service_account_subject.rst b/doc/source/kubernetes.client.models.v1_service_account_subject.rst deleted file mode 100644 index f04d81f0d8..0000000000 --- a/doc/source/kubernetes.client.models.v1_service_account_subject.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_service\_account\_subject module -============================================================= - -.. automodule:: kubernetes.client.models.v1_service_account_subject - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_service_account_token_projection.rst b/doc/source/kubernetes.client.models.v1_service_account_token_projection.rst deleted file mode 100644 index 2b954597ae..0000000000 --- a/doc/source/kubernetes.client.models.v1_service_account_token_projection.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_service\_account\_token\_projection module -======================================================================= - -.. automodule:: kubernetes.client.models.v1_service_account_token_projection - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_service_backend_port.rst b/doc/source/kubernetes.client.models.v1_service_backend_port.rst deleted file mode 100644 index 395d3593d6..0000000000 --- a/doc/source/kubernetes.client.models.v1_service_backend_port.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_service\_backend\_port module -========================================================== - -.. automodule:: kubernetes.client.models.v1_service_backend_port - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_service_list.rst b/doc/source/kubernetes.client.models.v1_service_list.rst deleted file mode 100644 index a50badcfc4..0000000000 --- a/doc/source/kubernetes.client.models.v1_service_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_service\_list module -================================================= - -.. automodule:: kubernetes.client.models.v1_service_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_service_port.rst b/doc/source/kubernetes.client.models.v1_service_port.rst deleted file mode 100644 index 7ac1e72553..0000000000 --- a/doc/source/kubernetes.client.models.v1_service_port.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_service\_port module -================================================= - -.. automodule:: kubernetes.client.models.v1_service_port - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_service_spec.rst b/doc/source/kubernetes.client.models.v1_service_spec.rst deleted file mode 100644 index 604a6a2cf5..0000000000 --- a/doc/source/kubernetes.client.models.v1_service_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_service\_spec module -================================================= - -.. automodule:: kubernetes.client.models.v1_service_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_service_status.rst b/doc/source/kubernetes.client.models.v1_service_status.rst deleted file mode 100644 index b996587ad8..0000000000 --- a/doc/source/kubernetes.client.models.v1_service_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_service\_status module -=================================================== - -.. automodule:: kubernetes.client.models.v1_service_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_session_affinity_config.rst b/doc/source/kubernetes.client.models.v1_session_affinity_config.rst deleted file mode 100644 index 68037d3216..0000000000 --- a/doc/source/kubernetes.client.models.v1_session_affinity_config.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_session\_affinity\_config module -============================================================= - -.. automodule:: kubernetes.client.models.v1_session_affinity_config - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_sleep_action.rst b/doc/source/kubernetes.client.models.v1_sleep_action.rst deleted file mode 100644 index ae28bfde11..0000000000 --- a/doc/source/kubernetes.client.models.v1_sleep_action.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_sleep\_action module -================================================= - -.. automodule:: kubernetes.client.models.v1_sleep_action - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_stateful_set.rst b/doc/source/kubernetes.client.models.v1_stateful_set.rst deleted file mode 100644 index cc1e4e9d82..0000000000 --- a/doc/source/kubernetes.client.models.v1_stateful_set.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_stateful\_set module -================================================= - -.. automodule:: kubernetes.client.models.v1_stateful_set - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_stateful_set_condition.rst b/doc/source/kubernetes.client.models.v1_stateful_set_condition.rst deleted file mode 100644 index 8321567122..0000000000 --- a/doc/source/kubernetes.client.models.v1_stateful_set_condition.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_stateful\_set\_condition module -============================================================ - -.. automodule:: kubernetes.client.models.v1_stateful_set_condition - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_stateful_set_list.rst b/doc/source/kubernetes.client.models.v1_stateful_set_list.rst deleted file mode 100644 index 0ab2525a68..0000000000 --- a/doc/source/kubernetes.client.models.v1_stateful_set_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_stateful\_set\_list module -======================================================= - -.. automodule:: kubernetes.client.models.v1_stateful_set_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_stateful_set_ordinals.rst b/doc/source/kubernetes.client.models.v1_stateful_set_ordinals.rst deleted file mode 100644 index 738c2c0768..0000000000 --- a/doc/source/kubernetes.client.models.v1_stateful_set_ordinals.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_stateful\_set\_ordinals module -=========================================================== - -.. automodule:: kubernetes.client.models.v1_stateful_set_ordinals - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_stateful_set_persistent_volume_claim_retention_policy.rst b/doc/source/kubernetes.client.models.v1_stateful_set_persistent_volume_claim_retention_policy.rst deleted file mode 100644 index ec266821c3..0000000000 --- a/doc/source/kubernetes.client.models.v1_stateful_set_persistent_volume_claim_retention_policy.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_stateful\_set\_persistent\_volume\_claim\_retention\_policy module -=============================================================================================== - -.. automodule:: kubernetes.client.models.v1_stateful_set_persistent_volume_claim_retention_policy - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_stateful_set_spec.rst b/doc/source/kubernetes.client.models.v1_stateful_set_spec.rst deleted file mode 100644 index 3eed65c3ed..0000000000 --- a/doc/source/kubernetes.client.models.v1_stateful_set_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_stateful\_set\_spec module -======================================================= - -.. automodule:: kubernetes.client.models.v1_stateful_set_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_stateful_set_status.rst b/doc/source/kubernetes.client.models.v1_stateful_set_status.rst deleted file mode 100644 index af36f373f1..0000000000 --- a/doc/source/kubernetes.client.models.v1_stateful_set_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_stateful\_set\_status module -========================================================= - -.. automodule:: kubernetes.client.models.v1_stateful_set_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_stateful_set_update_strategy.rst b/doc/source/kubernetes.client.models.v1_stateful_set_update_strategy.rst deleted file mode 100644 index 27434c9502..0000000000 --- a/doc/source/kubernetes.client.models.v1_stateful_set_update_strategy.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_stateful\_set\_update\_strategy module -=================================================================== - -.. automodule:: kubernetes.client.models.v1_stateful_set_update_strategy - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_status.rst b/doc/source/kubernetes.client.models.v1_status.rst deleted file mode 100644 index f734012473..0000000000 --- a/doc/source/kubernetes.client.models.v1_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_status module -========================================== - -.. automodule:: kubernetes.client.models.v1_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_status_cause.rst b/doc/source/kubernetes.client.models.v1_status_cause.rst deleted file mode 100644 index 247977746d..0000000000 --- a/doc/source/kubernetes.client.models.v1_status_cause.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_status\_cause module -================================================= - -.. automodule:: kubernetes.client.models.v1_status_cause - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_status_details.rst b/doc/source/kubernetes.client.models.v1_status_details.rst deleted file mode 100644 index 3199878405..0000000000 --- a/doc/source/kubernetes.client.models.v1_status_details.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_status\_details module -=================================================== - -.. automodule:: kubernetes.client.models.v1_status_details - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_storage_class.rst b/doc/source/kubernetes.client.models.v1_storage_class.rst deleted file mode 100644 index 56ab5f1f0d..0000000000 --- a/doc/source/kubernetes.client.models.v1_storage_class.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_storage\_class module -================================================== - -.. automodule:: kubernetes.client.models.v1_storage_class - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_storage_class_list.rst b/doc/source/kubernetes.client.models.v1_storage_class_list.rst deleted file mode 100644 index 826f8bf8bb..0000000000 --- a/doc/source/kubernetes.client.models.v1_storage_class_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_storage\_class\_list module -======================================================== - -.. automodule:: kubernetes.client.models.v1_storage_class_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_storage_os_persistent_volume_source.rst b/doc/source/kubernetes.client.models.v1_storage_os_persistent_volume_source.rst deleted file mode 100644 index 01df977db5..0000000000 --- a/doc/source/kubernetes.client.models.v1_storage_os_persistent_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_storage\_os\_persistent\_volume\_source module -=========================================================================== - -.. automodule:: kubernetes.client.models.v1_storage_os_persistent_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_storage_os_volume_source.rst b/doc/source/kubernetes.client.models.v1_storage_os_volume_source.rst deleted file mode 100644 index 84795b001a..0000000000 --- a/doc/source/kubernetes.client.models.v1_storage_os_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_storage\_os\_volume\_source module -=============================================================== - -.. automodule:: kubernetes.client.models.v1_storage_os_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_subject_access_review.rst b/doc/source/kubernetes.client.models.v1_subject_access_review.rst deleted file mode 100644 index 38ceca6b1e..0000000000 --- a/doc/source/kubernetes.client.models.v1_subject_access_review.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_subject\_access\_review module -=========================================================== - -.. automodule:: kubernetes.client.models.v1_subject_access_review - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_subject_access_review_spec.rst b/doc/source/kubernetes.client.models.v1_subject_access_review_spec.rst deleted file mode 100644 index ccf902fa81..0000000000 --- a/doc/source/kubernetes.client.models.v1_subject_access_review_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_subject\_access\_review\_spec module -================================================================= - -.. automodule:: kubernetes.client.models.v1_subject_access_review_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_subject_access_review_status.rst b/doc/source/kubernetes.client.models.v1_subject_access_review_status.rst deleted file mode 100644 index a55de304e0..0000000000 --- a/doc/source/kubernetes.client.models.v1_subject_access_review_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_subject\_access\_review\_status module -=================================================================== - -.. automodule:: kubernetes.client.models.v1_subject_access_review_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_subject_rules_review_status.rst b/doc/source/kubernetes.client.models.v1_subject_rules_review_status.rst deleted file mode 100644 index 2a291333c7..0000000000 --- a/doc/source/kubernetes.client.models.v1_subject_rules_review_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_subject\_rules\_review\_status module -================================================================== - -.. automodule:: kubernetes.client.models.v1_subject_rules_review_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_success_policy.rst b/doc/source/kubernetes.client.models.v1_success_policy.rst deleted file mode 100644 index fde7fea6e9..0000000000 --- a/doc/source/kubernetes.client.models.v1_success_policy.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_success\_policy module -=================================================== - -.. automodule:: kubernetes.client.models.v1_success_policy - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_success_policy_rule.rst b/doc/source/kubernetes.client.models.v1_success_policy_rule.rst deleted file mode 100644 index d8588147c4..0000000000 --- a/doc/source/kubernetes.client.models.v1_success_policy_rule.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_success\_policy\_rule module -========================================================= - -.. automodule:: kubernetes.client.models.v1_success_policy_rule - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_sysctl.rst b/doc/source/kubernetes.client.models.v1_sysctl.rst deleted file mode 100644 index db04afc20b..0000000000 --- a/doc/source/kubernetes.client.models.v1_sysctl.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_sysctl module -========================================== - -.. automodule:: kubernetes.client.models.v1_sysctl - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_taint.rst b/doc/source/kubernetes.client.models.v1_taint.rst deleted file mode 100644 index 63373c479d..0000000000 --- a/doc/source/kubernetes.client.models.v1_taint.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_taint module -========================================= - -.. automodule:: kubernetes.client.models.v1_taint - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_tcp_socket_action.rst b/doc/source/kubernetes.client.models.v1_tcp_socket_action.rst deleted file mode 100644 index df8c69bc08..0000000000 --- a/doc/source/kubernetes.client.models.v1_tcp_socket_action.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_tcp\_socket\_action module -======================================================= - -.. automodule:: kubernetes.client.models.v1_tcp_socket_action - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_token_request_spec.rst b/doc/source/kubernetes.client.models.v1_token_request_spec.rst deleted file mode 100644 index c8f6369f31..0000000000 --- a/doc/source/kubernetes.client.models.v1_token_request_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_token\_request\_spec module -======================================================== - -.. automodule:: kubernetes.client.models.v1_token_request_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_token_request_status.rst b/doc/source/kubernetes.client.models.v1_token_request_status.rst deleted file mode 100644 index 2adceeb795..0000000000 --- a/doc/source/kubernetes.client.models.v1_token_request_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_token\_request\_status module -========================================================== - -.. automodule:: kubernetes.client.models.v1_token_request_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_token_review.rst b/doc/source/kubernetes.client.models.v1_token_review.rst deleted file mode 100644 index b596aa9e16..0000000000 --- a/doc/source/kubernetes.client.models.v1_token_review.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_token\_review module -================================================= - -.. automodule:: kubernetes.client.models.v1_token_review - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_token_review_spec.rst b/doc/source/kubernetes.client.models.v1_token_review_spec.rst deleted file mode 100644 index 8ec750a2c1..0000000000 --- a/doc/source/kubernetes.client.models.v1_token_review_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_token\_review\_spec module -======================================================= - -.. automodule:: kubernetes.client.models.v1_token_review_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_token_review_status.rst b/doc/source/kubernetes.client.models.v1_token_review_status.rst deleted file mode 100644 index 60ef5f10a1..0000000000 --- a/doc/source/kubernetes.client.models.v1_token_review_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_token\_review\_status module -========================================================= - -.. automodule:: kubernetes.client.models.v1_token_review_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_toleration.rst b/doc/source/kubernetes.client.models.v1_toleration.rst deleted file mode 100644 index 797f5f2fcd..0000000000 --- a/doc/source/kubernetes.client.models.v1_toleration.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_toleration module -============================================== - -.. automodule:: kubernetes.client.models.v1_toleration - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_topology_selector_label_requirement.rst b/doc/source/kubernetes.client.models.v1_topology_selector_label_requirement.rst deleted file mode 100644 index 2b57a23c4e..0000000000 --- a/doc/source/kubernetes.client.models.v1_topology_selector_label_requirement.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_topology\_selector\_label\_requirement module -========================================================================== - -.. automodule:: kubernetes.client.models.v1_topology_selector_label_requirement - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_topology_selector_term.rst b/doc/source/kubernetes.client.models.v1_topology_selector_term.rst deleted file mode 100644 index 0d8fb2a2da..0000000000 --- a/doc/source/kubernetes.client.models.v1_topology_selector_term.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_topology\_selector\_term module -============================================================ - -.. automodule:: kubernetes.client.models.v1_topology_selector_term - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_topology_spread_constraint.rst b/doc/source/kubernetes.client.models.v1_topology_spread_constraint.rst deleted file mode 100644 index 6ebdacb9ef..0000000000 --- a/doc/source/kubernetes.client.models.v1_topology_spread_constraint.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_topology\_spread\_constraint module -================================================================ - -.. automodule:: kubernetes.client.models.v1_topology_spread_constraint - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_type_checking.rst b/doc/source/kubernetes.client.models.v1_type_checking.rst deleted file mode 100644 index 71b24e9f90..0000000000 --- a/doc/source/kubernetes.client.models.v1_type_checking.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_type\_checking module -================================================== - -.. automodule:: kubernetes.client.models.v1_type_checking - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_typed_local_object_reference.rst b/doc/source/kubernetes.client.models.v1_typed_local_object_reference.rst deleted file mode 100644 index ea203af483..0000000000 --- a/doc/source/kubernetes.client.models.v1_typed_local_object_reference.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_typed\_local\_object\_reference module -=================================================================== - -.. automodule:: kubernetes.client.models.v1_typed_local_object_reference - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_typed_object_reference.rst b/doc/source/kubernetes.client.models.v1_typed_object_reference.rst deleted file mode 100644 index fcdc1e7c59..0000000000 --- a/doc/source/kubernetes.client.models.v1_typed_object_reference.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_typed\_object\_reference module -============================================================ - -.. automodule:: kubernetes.client.models.v1_typed_object_reference - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_uncounted_terminated_pods.rst b/doc/source/kubernetes.client.models.v1_uncounted_terminated_pods.rst deleted file mode 100644 index ee92557d5d..0000000000 --- a/doc/source/kubernetes.client.models.v1_uncounted_terminated_pods.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_uncounted\_terminated\_pods module -=============================================================== - -.. automodule:: kubernetes.client.models.v1_uncounted_terminated_pods - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_user_info.rst b/doc/source/kubernetes.client.models.v1_user_info.rst deleted file mode 100644 index 10a7aafbb2..0000000000 --- a/doc/source/kubernetes.client.models.v1_user_info.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_user\_info module -============================================== - -.. automodule:: kubernetes.client.models.v1_user_info - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_user_subject.rst b/doc/source/kubernetes.client.models.v1_user_subject.rst deleted file mode 100644 index b5fd34c6fd..0000000000 --- a/doc/source/kubernetes.client.models.v1_user_subject.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_user\_subject module -================================================= - -.. automodule:: kubernetes.client.models.v1_user_subject - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_validating_admission_policy.rst b/doc/source/kubernetes.client.models.v1_validating_admission_policy.rst deleted file mode 100644 index 69909e4c96..0000000000 --- a/doc/source/kubernetes.client.models.v1_validating_admission_policy.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_validating\_admission\_policy module -================================================================= - -.. automodule:: kubernetes.client.models.v1_validating_admission_policy - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_validating_admission_policy_binding.rst b/doc/source/kubernetes.client.models.v1_validating_admission_policy_binding.rst deleted file mode 100644 index b0a1b2b41f..0000000000 --- a/doc/source/kubernetes.client.models.v1_validating_admission_policy_binding.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_validating\_admission\_policy\_binding module -========================================================================== - -.. automodule:: kubernetes.client.models.v1_validating_admission_policy_binding - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_validating_admission_policy_binding_list.rst b/doc/source/kubernetes.client.models.v1_validating_admission_policy_binding_list.rst deleted file mode 100644 index b3cf1638d6..0000000000 --- a/doc/source/kubernetes.client.models.v1_validating_admission_policy_binding_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_validating\_admission\_policy\_binding\_list module -================================================================================ - -.. automodule:: kubernetes.client.models.v1_validating_admission_policy_binding_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_validating_admission_policy_binding_spec.rst b/doc/source/kubernetes.client.models.v1_validating_admission_policy_binding_spec.rst deleted file mode 100644 index 4ec4cf184d..0000000000 --- a/doc/source/kubernetes.client.models.v1_validating_admission_policy_binding_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_validating\_admission\_policy\_binding\_spec module -================================================================================ - -.. automodule:: kubernetes.client.models.v1_validating_admission_policy_binding_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_validating_admission_policy_list.rst b/doc/source/kubernetes.client.models.v1_validating_admission_policy_list.rst deleted file mode 100644 index 87d615fc7a..0000000000 --- a/doc/source/kubernetes.client.models.v1_validating_admission_policy_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_validating\_admission\_policy\_list module -======================================================================= - -.. automodule:: kubernetes.client.models.v1_validating_admission_policy_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_validating_admission_policy_spec.rst b/doc/source/kubernetes.client.models.v1_validating_admission_policy_spec.rst deleted file mode 100644 index 2bf42cffeb..0000000000 --- a/doc/source/kubernetes.client.models.v1_validating_admission_policy_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_validating\_admission\_policy\_spec module -======================================================================= - -.. automodule:: kubernetes.client.models.v1_validating_admission_policy_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_validating_admission_policy_status.rst b/doc/source/kubernetes.client.models.v1_validating_admission_policy_status.rst deleted file mode 100644 index 2155827434..0000000000 --- a/doc/source/kubernetes.client.models.v1_validating_admission_policy_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_validating\_admission\_policy\_status module -========================================================================= - -.. automodule:: kubernetes.client.models.v1_validating_admission_policy_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_validating_webhook.rst b/doc/source/kubernetes.client.models.v1_validating_webhook.rst deleted file mode 100644 index e83c5675be..0000000000 --- a/doc/source/kubernetes.client.models.v1_validating_webhook.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_validating\_webhook module -======================================================= - -.. automodule:: kubernetes.client.models.v1_validating_webhook - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_validating_webhook_configuration.rst b/doc/source/kubernetes.client.models.v1_validating_webhook_configuration.rst deleted file mode 100644 index 212ddae772..0000000000 --- a/doc/source/kubernetes.client.models.v1_validating_webhook_configuration.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_validating\_webhook\_configuration module -====================================================================== - -.. automodule:: kubernetes.client.models.v1_validating_webhook_configuration - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_validating_webhook_configuration_list.rst b/doc/source/kubernetes.client.models.v1_validating_webhook_configuration_list.rst deleted file mode 100644 index d4c5af47b0..0000000000 --- a/doc/source/kubernetes.client.models.v1_validating_webhook_configuration_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_validating\_webhook\_configuration\_list module -============================================================================ - -.. automodule:: kubernetes.client.models.v1_validating_webhook_configuration_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_validation.rst b/doc/source/kubernetes.client.models.v1_validation.rst deleted file mode 100644 index 6cfbc10e5c..0000000000 --- a/doc/source/kubernetes.client.models.v1_validation.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_validation module -============================================== - -.. automodule:: kubernetes.client.models.v1_validation - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_validation_rule.rst b/doc/source/kubernetes.client.models.v1_validation_rule.rst deleted file mode 100644 index 49d4e07a62..0000000000 --- a/doc/source/kubernetes.client.models.v1_validation_rule.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_validation\_rule module -==================================================== - -.. automodule:: kubernetes.client.models.v1_validation_rule - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_variable.rst b/doc/source/kubernetes.client.models.v1_variable.rst deleted file mode 100644 index 3bebe40d8b..0000000000 --- a/doc/source/kubernetes.client.models.v1_variable.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_variable module -============================================ - -.. automodule:: kubernetes.client.models.v1_variable - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_volume.rst b/doc/source/kubernetes.client.models.v1_volume.rst deleted file mode 100644 index 7efee1b1f7..0000000000 --- a/doc/source/kubernetes.client.models.v1_volume.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_volume module -========================================== - -.. automodule:: kubernetes.client.models.v1_volume - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_volume_attachment.rst b/doc/source/kubernetes.client.models.v1_volume_attachment.rst deleted file mode 100644 index 9cb6b676b8..0000000000 --- a/doc/source/kubernetes.client.models.v1_volume_attachment.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_volume\_attachment module -====================================================== - -.. automodule:: kubernetes.client.models.v1_volume_attachment - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_volume_attachment_list.rst b/doc/source/kubernetes.client.models.v1_volume_attachment_list.rst deleted file mode 100644 index 4618a75770..0000000000 --- a/doc/source/kubernetes.client.models.v1_volume_attachment_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_volume\_attachment\_list module -============================================================ - -.. automodule:: kubernetes.client.models.v1_volume_attachment_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_volume_attachment_source.rst b/doc/source/kubernetes.client.models.v1_volume_attachment_source.rst deleted file mode 100644 index 5371ef3be5..0000000000 --- a/doc/source/kubernetes.client.models.v1_volume_attachment_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_volume\_attachment\_source module -============================================================== - -.. automodule:: kubernetes.client.models.v1_volume_attachment_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_volume_attachment_spec.rst b/doc/source/kubernetes.client.models.v1_volume_attachment_spec.rst deleted file mode 100644 index ff4202455b..0000000000 --- a/doc/source/kubernetes.client.models.v1_volume_attachment_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_volume\_attachment\_spec module -============================================================ - -.. automodule:: kubernetes.client.models.v1_volume_attachment_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_volume_attachment_status.rst b/doc/source/kubernetes.client.models.v1_volume_attachment_status.rst deleted file mode 100644 index ff23594268..0000000000 --- a/doc/source/kubernetes.client.models.v1_volume_attachment_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_volume\_attachment\_status module -============================================================== - -.. automodule:: kubernetes.client.models.v1_volume_attachment_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_volume_device.rst b/doc/source/kubernetes.client.models.v1_volume_device.rst deleted file mode 100644 index 7c62ff17bf..0000000000 --- a/doc/source/kubernetes.client.models.v1_volume_device.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_volume\_device module -================================================== - -.. automodule:: kubernetes.client.models.v1_volume_device - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_volume_error.rst b/doc/source/kubernetes.client.models.v1_volume_error.rst deleted file mode 100644 index c4982079c6..0000000000 --- a/doc/source/kubernetes.client.models.v1_volume_error.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_volume\_error module -================================================= - -.. automodule:: kubernetes.client.models.v1_volume_error - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_volume_mount.rst b/doc/source/kubernetes.client.models.v1_volume_mount.rst deleted file mode 100644 index 074e2ee368..0000000000 --- a/doc/source/kubernetes.client.models.v1_volume_mount.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_volume\_mount module -================================================= - -.. automodule:: kubernetes.client.models.v1_volume_mount - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_volume_mount_status.rst b/doc/source/kubernetes.client.models.v1_volume_mount_status.rst deleted file mode 100644 index a8960e0b9d..0000000000 --- a/doc/source/kubernetes.client.models.v1_volume_mount_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_volume\_mount\_status module -========================================================= - -.. automodule:: kubernetes.client.models.v1_volume_mount_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_volume_node_affinity.rst b/doc/source/kubernetes.client.models.v1_volume_node_affinity.rst deleted file mode 100644 index 1e62603035..0000000000 --- a/doc/source/kubernetes.client.models.v1_volume_node_affinity.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_volume\_node\_affinity module -========================================================== - -.. automodule:: kubernetes.client.models.v1_volume_node_affinity - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_volume_node_resources.rst b/doc/source/kubernetes.client.models.v1_volume_node_resources.rst deleted file mode 100644 index bb1303f3a7..0000000000 --- a/doc/source/kubernetes.client.models.v1_volume_node_resources.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_volume\_node\_resources module -=========================================================== - -.. automodule:: kubernetes.client.models.v1_volume_node_resources - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_volume_projection.rst b/doc/source/kubernetes.client.models.v1_volume_projection.rst deleted file mode 100644 index c5b4f5ac5a..0000000000 --- a/doc/source/kubernetes.client.models.v1_volume_projection.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_volume\_projection module -====================================================== - -.. automodule:: kubernetes.client.models.v1_volume_projection - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_volume_resource_requirements.rst b/doc/source/kubernetes.client.models.v1_volume_resource_requirements.rst deleted file mode 100644 index dafa92133e..0000000000 --- a/doc/source/kubernetes.client.models.v1_volume_resource_requirements.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_volume\_resource\_requirements module -================================================================== - -.. automodule:: kubernetes.client.models.v1_volume_resource_requirements - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_vsphere_virtual_disk_volume_source.rst b/doc/source/kubernetes.client.models.v1_vsphere_virtual_disk_volume_source.rst deleted file mode 100644 index 5358cab857..0000000000 --- a/doc/source/kubernetes.client.models.v1_vsphere_virtual_disk_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_vsphere\_virtual\_disk\_volume\_source module -========================================================================== - -.. automodule:: kubernetes.client.models.v1_vsphere_virtual_disk_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_watch_event.rst b/doc/source/kubernetes.client.models.v1_watch_event.rst deleted file mode 100644 index 5cf2acf988..0000000000 --- a/doc/source/kubernetes.client.models.v1_watch_event.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_watch\_event module -================================================ - -.. automodule:: kubernetes.client.models.v1_watch_event - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_webhook_conversion.rst b/doc/source/kubernetes.client.models.v1_webhook_conversion.rst deleted file mode 100644 index 3b1f587ba5..0000000000 --- a/doc/source/kubernetes.client.models.v1_webhook_conversion.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_webhook\_conversion module -======================================================= - -.. automodule:: kubernetes.client.models.v1_webhook_conversion - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_weighted_pod_affinity_term.rst b/doc/source/kubernetes.client.models.v1_weighted_pod_affinity_term.rst deleted file mode 100644 index 7748003674..0000000000 --- a/doc/source/kubernetes.client.models.v1_weighted_pod_affinity_term.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_weighted\_pod\_affinity\_term module -================================================================= - -.. automodule:: kubernetes.client.models.v1_weighted_pod_affinity_term - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_windows_security_context_options.rst b/doc/source/kubernetes.client.models.v1_windows_security_context_options.rst deleted file mode 100644 index 4486a8aff8..0000000000 --- a/doc/source/kubernetes.client.models.v1_windows_security_context_options.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_windows\_security\_context\_options module -======================================================================= - -.. automodule:: kubernetes.client.models.v1_windows_security_context_options - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha1_audit_annotation.rst b/doc/source/kubernetes.client.models.v1alpha1_audit_annotation.rst deleted file mode 100644 index face6400bd..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha1_audit_annotation.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha1\_audit\_annotation module -=========================================================== - -.. automodule:: kubernetes.client.models.v1alpha1_audit_annotation - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha1_cluster_trust_bundle.rst b/doc/source/kubernetes.client.models.v1alpha1_cluster_trust_bundle.rst deleted file mode 100644 index 928546b10a..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha1_cluster_trust_bundle.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha1\_cluster\_trust\_bundle module -================================================================ - -.. automodule:: kubernetes.client.models.v1alpha1_cluster_trust_bundle - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha1_cluster_trust_bundle_list.rst b/doc/source/kubernetes.client.models.v1alpha1_cluster_trust_bundle_list.rst deleted file mode 100644 index 884179f793..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha1_cluster_trust_bundle_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha1\_cluster\_trust\_bundle\_list module -====================================================================== - -.. automodule:: kubernetes.client.models.v1alpha1_cluster_trust_bundle_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha1_cluster_trust_bundle_spec.rst b/doc/source/kubernetes.client.models.v1alpha1_cluster_trust_bundle_spec.rst deleted file mode 100644 index 0273f392c5..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha1_cluster_trust_bundle_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha1\_cluster\_trust\_bundle\_spec module -====================================================================== - -.. automodule:: kubernetes.client.models.v1alpha1_cluster_trust_bundle_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha1_expression_warning.rst b/doc/source/kubernetes.client.models.v1alpha1_expression_warning.rst deleted file mode 100644 index 45c3d640bb..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha1_expression_warning.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha1\_expression\_warning module -============================================================= - -.. automodule:: kubernetes.client.models.v1alpha1_expression_warning - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha1_group_version_resource.rst b/doc/source/kubernetes.client.models.v1alpha1_group_version_resource.rst deleted file mode 100644 index c5a20b1391..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha1_group_version_resource.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha1\_group\_version\_resource module -================================================================== - -.. automodule:: kubernetes.client.models.v1alpha1_group_version_resource - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha1_ip_address.rst b/doc/source/kubernetes.client.models.v1alpha1_ip_address.rst deleted file mode 100644 index 8d82ff9f6e..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha1_ip_address.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha1\_ip\_address module -===================================================== - -.. automodule:: kubernetes.client.models.v1alpha1_ip_address - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha1_ip_address_list.rst b/doc/source/kubernetes.client.models.v1alpha1_ip_address_list.rst deleted file mode 100644 index 4946a442d5..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha1_ip_address_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha1\_ip\_address\_list module -=========================================================== - -.. automodule:: kubernetes.client.models.v1alpha1_ip_address_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha1_ip_address_spec.rst b/doc/source/kubernetes.client.models.v1alpha1_ip_address_spec.rst deleted file mode 100644 index 5e8ed745f2..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha1_ip_address_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha1\_ip\_address\_spec module -=========================================================== - -.. automodule:: kubernetes.client.models.v1alpha1_ip_address_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha1_match_condition.rst b/doc/source/kubernetes.client.models.v1alpha1_match_condition.rst deleted file mode 100644 index 71808f8145..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha1_match_condition.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha1\_match\_condition module -========================================================== - -.. automodule:: kubernetes.client.models.v1alpha1_match_condition - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha1_match_resources.rst b/doc/source/kubernetes.client.models.v1alpha1_match_resources.rst deleted file mode 100644 index 2896208f0e..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha1_match_resources.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha1\_match\_resources module -========================================================== - -.. automodule:: kubernetes.client.models.v1alpha1_match_resources - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha1_migration_condition.rst b/doc/source/kubernetes.client.models.v1alpha1_migration_condition.rst deleted file mode 100644 index dfc6d28614..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha1_migration_condition.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha1\_migration\_condition module -============================================================== - -.. automodule:: kubernetes.client.models.v1alpha1_migration_condition - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha1_named_rule_with_operations.rst b/doc/source/kubernetes.client.models.v1alpha1_named_rule_with_operations.rst deleted file mode 100644 index 0b15336b21..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha1_named_rule_with_operations.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha1\_named\_rule\_with\_operations module -======================================================================= - -.. automodule:: kubernetes.client.models.v1alpha1_named_rule_with_operations - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha1_param_kind.rst b/doc/source/kubernetes.client.models.v1alpha1_param_kind.rst deleted file mode 100644 index cdf98e9c51..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha1_param_kind.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha1\_param\_kind module -===================================================== - -.. automodule:: kubernetes.client.models.v1alpha1_param_kind - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha1_param_ref.rst b/doc/source/kubernetes.client.models.v1alpha1_param_ref.rst deleted file mode 100644 index 8f238f789f..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha1_param_ref.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha1\_param\_ref module -==================================================== - -.. automodule:: kubernetes.client.models.v1alpha1_param_ref - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha1_parent_reference.rst b/doc/source/kubernetes.client.models.v1alpha1_parent_reference.rst deleted file mode 100644 index 2740dbfe28..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha1_parent_reference.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha1\_parent\_reference module -=========================================================== - -.. automodule:: kubernetes.client.models.v1alpha1_parent_reference - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha1_self_subject_review.rst b/doc/source/kubernetes.client.models.v1alpha1_self_subject_review.rst deleted file mode 100644 index 02ae4a38a7..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha1_self_subject_review.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha1\_self\_subject\_review module -=============================================================== - -.. automodule:: kubernetes.client.models.v1alpha1_self_subject_review - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha1_self_subject_review_status.rst b/doc/source/kubernetes.client.models.v1alpha1_self_subject_review_status.rst deleted file mode 100644 index 5402c8de71..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha1_self_subject_review_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha1\_self\_subject\_review\_status module -======================================================================= - -.. automodule:: kubernetes.client.models.v1alpha1_self_subject_review_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha1_server_storage_version.rst b/doc/source/kubernetes.client.models.v1alpha1_server_storage_version.rst deleted file mode 100644 index 5574e39f24..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha1_server_storage_version.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha1\_server\_storage\_version module -================================================================== - -.. automodule:: kubernetes.client.models.v1alpha1_server_storage_version - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha1_service_cidr.rst b/doc/source/kubernetes.client.models.v1alpha1_service_cidr.rst deleted file mode 100644 index a5e2bbbf20..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha1_service_cidr.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha1\_service\_cidr module -======================================================= - -.. automodule:: kubernetes.client.models.v1alpha1_service_cidr - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha1_service_cidr_list.rst b/doc/source/kubernetes.client.models.v1alpha1_service_cidr_list.rst deleted file mode 100644 index 14ae3d2499..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha1_service_cidr_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha1\_service\_cidr\_list module -============================================================= - -.. automodule:: kubernetes.client.models.v1alpha1_service_cidr_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha1_service_cidr_spec.rst b/doc/source/kubernetes.client.models.v1alpha1_service_cidr_spec.rst deleted file mode 100644 index 5e5620536c..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha1_service_cidr_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha1\_service\_cidr\_spec module -============================================================= - -.. automodule:: kubernetes.client.models.v1alpha1_service_cidr_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha1_service_cidr_status.rst b/doc/source/kubernetes.client.models.v1alpha1_service_cidr_status.rst deleted file mode 100644 index 26c46efbce..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha1_service_cidr_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha1\_service\_cidr\_status module -=============================================================== - -.. automodule:: kubernetes.client.models.v1alpha1_service_cidr_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha1_storage_version.rst b/doc/source/kubernetes.client.models.v1alpha1_storage_version.rst deleted file mode 100644 index b09acc1643..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha1_storage_version.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha1\_storage\_version module -========================================================== - -.. automodule:: kubernetes.client.models.v1alpha1_storage_version - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha1_storage_version_condition.rst b/doc/source/kubernetes.client.models.v1alpha1_storage_version_condition.rst deleted file mode 100644 index ba3b46b98f..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha1_storage_version_condition.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha1\_storage\_version\_condition module -===================================================================== - -.. automodule:: kubernetes.client.models.v1alpha1_storage_version_condition - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha1_storage_version_list.rst b/doc/source/kubernetes.client.models.v1alpha1_storage_version_list.rst deleted file mode 100644 index 1f0c96e29b..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha1_storage_version_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha1\_storage\_version\_list module -================================================================ - -.. automodule:: kubernetes.client.models.v1alpha1_storage_version_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha1_storage_version_migration.rst b/doc/source/kubernetes.client.models.v1alpha1_storage_version_migration.rst deleted file mode 100644 index 5d7ed631d6..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha1_storage_version_migration.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha1\_storage\_version\_migration module -===================================================================== - -.. automodule:: kubernetes.client.models.v1alpha1_storage_version_migration - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha1_storage_version_migration_list.rst b/doc/source/kubernetes.client.models.v1alpha1_storage_version_migration_list.rst deleted file mode 100644 index 30c5901df0..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha1_storage_version_migration_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha1\_storage\_version\_migration\_list module -=========================================================================== - -.. automodule:: kubernetes.client.models.v1alpha1_storage_version_migration_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha1_storage_version_migration_spec.rst b/doc/source/kubernetes.client.models.v1alpha1_storage_version_migration_spec.rst deleted file mode 100644 index b231743eed..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha1_storage_version_migration_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha1\_storage\_version\_migration\_spec module -=========================================================================== - -.. automodule:: kubernetes.client.models.v1alpha1_storage_version_migration_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha1_storage_version_migration_status.rst b/doc/source/kubernetes.client.models.v1alpha1_storage_version_migration_status.rst deleted file mode 100644 index 6a20f73e4b..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha1_storage_version_migration_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha1\_storage\_version\_migration\_status module -============================================================================= - -.. automodule:: kubernetes.client.models.v1alpha1_storage_version_migration_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha1_storage_version_status.rst b/doc/source/kubernetes.client.models.v1alpha1_storage_version_status.rst deleted file mode 100644 index 999d0e4afa..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha1_storage_version_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha1\_storage\_version\_status module -================================================================== - -.. automodule:: kubernetes.client.models.v1alpha1_storage_version_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha1_type_checking.rst b/doc/source/kubernetes.client.models.v1alpha1_type_checking.rst deleted file mode 100644 index 84d1e95b69..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha1_type_checking.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha1\_type\_checking module -======================================================== - -.. automodule:: kubernetes.client.models.v1alpha1_type_checking - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha1_validating_admission_policy.rst b/doc/source/kubernetes.client.models.v1alpha1_validating_admission_policy.rst deleted file mode 100644 index b0f0c2bc22..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha1_validating_admission_policy.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha1\_validating\_admission\_policy module -======================================================================= - -.. automodule:: kubernetes.client.models.v1alpha1_validating_admission_policy - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha1_validating_admission_policy_binding.rst b/doc/source/kubernetes.client.models.v1alpha1_validating_admission_policy_binding.rst deleted file mode 100644 index 6c1f3de904..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha1_validating_admission_policy_binding.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha1\_validating\_admission\_policy\_binding module -================================================================================ - -.. automodule:: kubernetes.client.models.v1alpha1_validating_admission_policy_binding - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha1_validating_admission_policy_binding_list.rst b/doc/source/kubernetes.client.models.v1alpha1_validating_admission_policy_binding_list.rst deleted file mode 100644 index c3e41c8a13..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha1_validating_admission_policy_binding_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha1\_validating\_admission\_policy\_binding\_list module -====================================================================================== - -.. automodule:: kubernetes.client.models.v1alpha1_validating_admission_policy_binding_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha1_validating_admission_policy_binding_spec.rst b/doc/source/kubernetes.client.models.v1alpha1_validating_admission_policy_binding_spec.rst deleted file mode 100644 index b602baa722..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha1_validating_admission_policy_binding_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha1\_validating\_admission\_policy\_binding\_spec module -====================================================================================== - -.. automodule:: kubernetes.client.models.v1alpha1_validating_admission_policy_binding_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha1_validating_admission_policy_list.rst b/doc/source/kubernetes.client.models.v1alpha1_validating_admission_policy_list.rst deleted file mode 100644 index 699e67eb40..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha1_validating_admission_policy_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha1\_validating\_admission\_policy\_list module -============================================================================= - -.. automodule:: kubernetes.client.models.v1alpha1_validating_admission_policy_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha1_validating_admission_policy_spec.rst b/doc/source/kubernetes.client.models.v1alpha1_validating_admission_policy_spec.rst deleted file mode 100644 index 08b4d43985..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha1_validating_admission_policy_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha1\_validating\_admission\_policy\_spec module -============================================================================= - -.. automodule:: kubernetes.client.models.v1alpha1_validating_admission_policy_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha1_validating_admission_policy_status.rst b/doc/source/kubernetes.client.models.v1alpha1_validating_admission_policy_status.rst deleted file mode 100644 index 352957d7a3..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha1_validating_admission_policy_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha1\_validating\_admission\_policy\_status module -=============================================================================== - -.. automodule:: kubernetes.client.models.v1alpha1_validating_admission_policy_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha1_validation.rst b/doc/source/kubernetes.client.models.v1alpha1_validation.rst deleted file mode 100644 index 5fb497a766..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha1_validation.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha1\_validation module -==================================================== - -.. automodule:: kubernetes.client.models.v1alpha1_validation - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha1_variable.rst b/doc/source/kubernetes.client.models.v1alpha1_variable.rst deleted file mode 100644 index 384ff4b4ff..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha1_variable.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha1\_variable module -================================================== - -.. automodule:: kubernetes.client.models.v1alpha1_variable - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha1_volume_attributes_class.rst b/doc/source/kubernetes.client.models.v1alpha1_volume_attributes_class.rst deleted file mode 100644 index 3f19e52658..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha1_volume_attributes_class.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha1\_volume\_attributes\_class module -=================================================================== - -.. automodule:: kubernetes.client.models.v1alpha1_volume_attributes_class - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha1_volume_attributes_class_list.rst b/doc/source/kubernetes.client.models.v1alpha1_volume_attributes_class_list.rst deleted file mode 100644 index ab563afc9e..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha1_volume_attributes_class_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha1\_volume\_attributes\_class\_list module -========================================================================= - -.. automodule:: kubernetes.client.models.v1alpha1_volume_attributes_class_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha2_allocation_result.rst b/doc/source/kubernetes.client.models.v1alpha2_allocation_result.rst deleted file mode 100644 index c168134d94..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha2_allocation_result.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha2\_allocation\_result module -============================================================ - -.. automodule:: kubernetes.client.models.v1alpha2_allocation_result - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha2_driver_allocation_result.rst b/doc/source/kubernetes.client.models.v1alpha2_driver_allocation_result.rst deleted file mode 100644 index c958d0c0d8..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha2_driver_allocation_result.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha2\_driver\_allocation\_result module -==================================================================== - -.. automodule:: kubernetes.client.models.v1alpha2_driver_allocation_result - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha2_driver_requests.rst b/doc/source/kubernetes.client.models.v1alpha2_driver_requests.rst deleted file mode 100644 index da9ef3573a..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha2_driver_requests.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha2\_driver\_requests module -========================================================== - -.. automodule:: kubernetes.client.models.v1alpha2_driver_requests - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha2_named_resources_allocation_result.rst b/doc/source/kubernetes.client.models.v1alpha2_named_resources_allocation_result.rst deleted file mode 100644 index 951f75e386..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha2_named_resources_allocation_result.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha2\_named\_resources\_allocation\_result module -============================================================================== - -.. automodule:: kubernetes.client.models.v1alpha2_named_resources_allocation_result - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha2_named_resources_attribute.rst b/doc/source/kubernetes.client.models.v1alpha2_named_resources_attribute.rst deleted file mode 100644 index db3fee950a..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha2_named_resources_attribute.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha2\_named\_resources\_attribute module -===================================================================== - -.. automodule:: kubernetes.client.models.v1alpha2_named_resources_attribute - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha2_named_resources_filter.rst b/doc/source/kubernetes.client.models.v1alpha2_named_resources_filter.rst deleted file mode 100644 index 77e45a0695..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha2_named_resources_filter.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha2\_named\_resources\_filter module -================================================================== - -.. automodule:: kubernetes.client.models.v1alpha2_named_resources_filter - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha2_named_resources_instance.rst b/doc/source/kubernetes.client.models.v1alpha2_named_resources_instance.rst deleted file mode 100644 index 9e48ab667e..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha2_named_resources_instance.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha2\_named\_resources\_instance module -==================================================================== - -.. automodule:: kubernetes.client.models.v1alpha2_named_resources_instance - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha2_named_resources_int_slice.rst b/doc/source/kubernetes.client.models.v1alpha2_named_resources_int_slice.rst deleted file mode 100644 index 6c7d157949..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha2_named_resources_int_slice.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha2\_named\_resources\_int\_slice module -====================================================================== - -.. automodule:: kubernetes.client.models.v1alpha2_named_resources_int_slice - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha2_named_resources_request.rst b/doc/source/kubernetes.client.models.v1alpha2_named_resources_request.rst deleted file mode 100644 index 1eb4c4b18b..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha2_named_resources_request.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha2\_named\_resources\_request module -=================================================================== - -.. automodule:: kubernetes.client.models.v1alpha2_named_resources_request - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha2_named_resources_resources.rst b/doc/source/kubernetes.client.models.v1alpha2_named_resources_resources.rst deleted file mode 100644 index b1a8c2a634..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha2_named_resources_resources.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha2\_named\_resources\_resources module -===================================================================== - -.. automodule:: kubernetes.client.models.v1alpha2_named_resources_resources - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha2_named_resources_string_slice.rst b/doc/source/kubernetes.client.models.v1alpha2_named_resources_string_slice.rst deleted file mode 100644 index aa42dc9fe9..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha2_named_resources_string_slice.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha2\_named\_resources\_string\_slice module -========================================================================= - -.. automodule:: kubernetes.client.models.v1alpha2_named_resources_string_slice - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha2_pod_scheduling_context.rst b/doc/source/kubernetes.client.models.v1alpha2_pod_scheduling_context.rst deleted file mode 100644 index f0bd930e9d..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha2_pod_scheduling_context.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha2\_pod\_scheduling\_context module -================================================================== - -.. automodule:: kubernetes.client.models.v1alpha2_pod_scheduling_context - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha2_pod_scheduling_context_list.rst b/doc/source/kubernetes.client.models.v1alpha2_pod_scheduling_context_list.rst deleted file mode 100644 index 38f9212394..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha2_pod_scheduling_context_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha2\_pod\_scheduling\_context\_list module -======================================================================== - -.. automodule:: kubernetes.client.models.v1alpha2_pod_scheduling_context_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha2_pod_scheduling_context_spec.rst b/doc/source/kubernetes.client.models.v1alpha2_pod_scheduling_context_spec.rst deleted file mode 100644 index dfe4ec3933..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha2_pod_scheduling_context_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha2\_pod\_scheduling\_context\_spec module -======================================================================== - -.. automodule:: kubernetes.client.models.v1alpha2_pod_scheduling_context_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha2_pod_scheduling_context_status.rst b/doc/source/kubernetes.client.models.v1alpha2_pod_scheduling_context_status.rst deleted file mode 100644 index f264d33a82..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha2_pod_scheduling_context_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha2\_pod\_scheduling\_context\_status module -========================================================================== - -.. automodule:: kubernetes.client.models.v1alpha2_pod_scheduling_context_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha2_resource_claim.rst b/doc/source/kubernetes.client.models.v1alpha2_resource_claim.rst deleted file mode 100644 index 428265769e..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha2_resource_claim.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha2\_resource\_claim module -========================================================= - -.. automodule:: kubernetes.client.models.v1alpha2_resource_claim - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha2_resource_claim_consumer_reference.rst b/doc/source/kubernetes.client.models.v1alpha2_resource_claim_consumer_reference.rst deleted file mode 100644 index 07b4e91d4a..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha2_resource_claim_consumer_reference.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha2\_resource\_claim\_consumer\_reference module -============================================================================== - -.. automodule:: kubernetes.client.models.v1alpha2_resource_claim_consumer_reference - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha2_resource_claim_list.rst b/doc/source/kubernetes.client.models.v1alpha2_resource_claim_list.rst deleted file mode 100644 index fd795fe1bb..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha2_resource_claim_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha2\_resource\_claim\_list module -=============================================================== - -.. automodule:: kubernetes.client.models.v1alpha2_resource_claim_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha2_resource_claim_parameters.rst b/doc/source/kubernetes.client.models.v1alpha2_resource_claim_parameters.rst deleted file mode 100644 index 403e3b0d43..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha2_resource_claim_parameters.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha2\_resource\_claim\_parameters module -===================================================================== - -.. automodule:: kubernetes.client.models.v1alpha2_resource_claim_parameters - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha2_resource_claim_parameters_list.rst b/doc/source/kubernetes.client.models.v1alpha2_resource_claim_parameters_list.rst deleted file mode 100644 index 2552a052bf..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha2_resource_claim_parameters_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha2\_resource\_claim\_parameters\_list module -=========================================================================== - -.. automodule:: kubernetes.client.models.v1alpha2_resource_claim_parameters_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha2_resource_claim_parameters_reference.rst b/doc/source/kubernetes.client.models.v1alpha2_resource_claim_parameters_reference.rst deleted file mode 100644 index 116896d8a3..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha2_resource_claim_parameters_reference.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha2\_resource\_claim\_parameters\_reference module -================================================================================ - -.. automodule:: kubernetes.client.models.v1alpha2_resource_claim_parameters_reference - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha2_resource_claim_scheduling_status.rst b/doc/source/kubernetes.client.models.v1alpha2_resource_claim_scheduling_status.rst deleted file mode 100644 index 70abb83183..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha2_resource_claim_scheduling_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha2\_resource\_claim\_scheduling\_status module -============================================================================= - -.. automodule:: kubernetes.client.models.v1alpha2_resource_claim_scheduling_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha2_resource_claim_spec.rst b/doc/source/kubernetes.client.models.v1alpha2_resource_claim_spec.rst deleted file mode 100644 index a7838d2f48..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha2_resource_claim_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha2\_resource\_claim\_spec module -=============================================================== - -.. automodule:: kubernetes.client.models.v1alpha2_resource_claim_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha2_resource_claim_status.rst b/doc/source/kubernetes.client.models.v1alpha2_resource_claim_status.rst deleted file mode 100644 index 8a0258f41c..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha2_resource_claim_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha2\_resource\_claim\_status module -================================================================= - -.. automodule:: kubernetes.client.models.v1alpha2_resource_claim_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha2_resource_claim_template.rst b/doc/source/kubernetes.client.models.v1alpha2_resource_claim_template.rst deleted file mode 100644 index 92248c8604..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha2_resource_claim_template.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha2\_resource\_claim\_template module -=================================================================== - -.. automodule:: kubernetes.client.models.v1alpha2_resource_claim_template - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha2_resource_claim_template_list.rst b/doc/source/kubernetes.client.models.v1alpha2_resource_claim_template_list.rst deleted file mode 100644 index b7bb123e73..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha2_resource_claim_template_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha2\_resource\_claim\_template\_list module -========================================================================= - -.. automodule:: kubernetes.client.models.v1alpha2_resource_claim_template_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha2_resource_claim_template_spec.rst b/doc/source/kubernetes.client.models.v1alpha2_resource_claim_template_spec.rst deleted file mode 100644 index 309e3e4c7e..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha2_resource_claim_template_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha2\_resource\_claim\_template\_spec module -========================================================================= - -.. automodule:: kubernetes.client.models.v1alpha2_resource_claim_template_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha2_resource_class.rst b/doc/source/kubernetes.client.models.v1alpha2_resource_class.rst deleted file mode 100644 index bef9365a35..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha2_resource_class.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha2\_resource\_class module -========================================================= - -.. automodule:: kubernetes.client.models.v1alpha2_resource_class - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha2_resource_class_list.rst b/doc/source/kubernetes.client.models.v1alpha2_resource_class_list.rst deleted file mode 100644 index 2785389c5f..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha2_resource_class_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha2\_resource\_class\_list module -=============================================================== - -.. automodule:: kubernetes.client.models.v1alpha2_resource_class_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha2_resource_class_parameters.rst b/doc/source/kubernetes.client.models.v1alpha2_resource_class_parameters.rst deleted file mode 100644 index 6024db5350..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha2_resource_class_parameters.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha2\_resource\_class\_parameters module -===================================================================== - -.. automodule:: kubernetes.client.models.v1alpha2_resource_class_parameters - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha2_resource_class_parameters_list.rst b/doc/source/kubernetes.client.models.v1alpha2_resource_class_parameters_list.rst deleted file mode 100644 index 579c2d716c..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha2_resource_class_parameters_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha2\_resource\_class\_parameters\_list module -=========================================================================== - -.. automodule:: kubernetes.client.models.v1alpha2_resource_class_parameters_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha2_resource_class_parameters_reference.rst b/doc/source/kubernetes.client.models.v1alpha2_resource_class_parameters_reference.rst deleted file mode 100644 index 0be139734f..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha2_resource_class_parameters_reference.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha2\_resource\_class\_parameters\_reference module -================================================================================ - -.. automodule:: kubernetes.client.models.v1alpha2_resource_class_parameters_reference - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha2_resource_filter.rst b/doc/source/kubernetes.client.models.v1alpha2_resource_filter.rst deleted file mode 100644 index 59ba7d7145..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha2_resource_filter.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha2\_resource\_filter module -========================================================== - -.. automodule:: kubernetes.client.models.v1alpha2_resource_filter - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha2_resource_handle.rst b/doc/source/kubernetes.client.models.v1alpha2_resource_handle.rst deleted file mode 100644 index 1c14dd4eb6..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha2_resource_handle.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha2\_resource\_handle module -========================================================== - -.. automodule:: kubernetes.client.models.v1alpha2_resource_handle - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha2_resource_request.rst b/doc/source/kubernetes.client.models.v1alpha2_resource_request.rst deleted file mode 100644 index 0acba966c5..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha2_resource_request.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha2\_resource\_request module -=========================================================== - -.. automodule:: kubernetes.client.models.v1alpha2_resource_request - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha2_resource_slice.rst b/doc/source/kubernetes.client.models.v1alpha2_resource_slice.rst deleted file mode 100644 index dad9ce8cc1..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha2_resource_slice.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha2\_resource\_slice module -========================================================= - -.. automodule:: kubernetes.client.models.v1alpha2_resource_slice - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha2_resource_slice_list.rst b/doc/source/kubernetes.client.models.v1alpha2_resource_slice_list.rst deleted file mode 100644 index 22eaf42c7f..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha2_resource_slice_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha2\_resource\_slice\_list module -=============================================================== - -.. automodule:: kubernetes.client.models.v1alpha2_resource_slice_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha2_structured_resource_handle.rst b/doc/source/kubernetes.client.models.v1alpha2_structured_resource_handle.rst deleted file mode 100644 index ff53871078..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha2_structured_resource_handle.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha2\_structured\_resource\_handle module -====================================================================== - -.. automodule:: kubernetes.client.models.v1alpha2_structured_resource_handle - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha2_vendor_parameters.rst b/doc/source/kubernetes.client.models.v1alpha2_vendor_parameters.rst deleted file mode 100644 index cd0d692439..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha2_vendor_parameters.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha2\_vendor\_parameters module -============================================================ - -.. automodule:: kubernetes.client.models.v1alpha2_vendor_parameters - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_audit_annotation.rst b/doc/source/kubernetes.client.models.v1beta1_audit_annotation.rst deleted file mode 100644 index b0a1cfdc84..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_audit_annotation.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_audit\_annotation module -========================================================== - -.. automodule:: kubernetes.client.models.v1beta1_audit_annotation - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_expression_warning.rst b/doc/source/kubernetes.client.models.v1beta1_expression_warning.rst deleted file mode 100644 index dbb811f38f..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_expression_warning.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_expression\_warning module -============================================================ - -.. automodule:: kubernetes.client.models.v1beta1_expression_warning - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_match_condition.rst b/doc/source/kubernetes.client.models.v1beta1_match_condition.rst deleted file mode 100644 index ecbebdf7f8..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_match_condition.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_match\_condition module -========================================================= - -.. automodule:: kubernetes.client.models.v1beta1_match_condition - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_match_resources.rst b/doc/source/kubernetes.client.models.v1beta1_match_resources.rst deleted file mode 100644 index 4314d2ef30..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_match_resources.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_match\_resources module -========================================================= - -.. automodule:: kubernetes.client.models.v1beta1_match_resources - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_named_rule_with_operations.rst b/doc/source/kubernetes.client.models.v1beta1_named_rule_with_operations.rst deleted file mode 100644 index 8bfea98e0e..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_named_rule_with_operations.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_named\_rule\_with\_operations module -====================================================================== - -.. automodule:: kubernetes.client.models.v1beta1_named_rule_with_operations - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_param_kind.rst b/doc/source/kubernetes.client.models.v1beta1_param_kind.rst deleted file mode 100644 index 6f79d2ec96..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_param_kind.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_param\_kind module -==================================================== - -.. automodule:: kubernetes.client.models.v1beta1_param_kind - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_param_ref.rst b/doc/source/kubernetes.client.models.v1beta1_param_ref.rst deleted file mode 100644 index 212b59eb79..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_param_ref.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_param\_ref module -=================================================== - -.. automodule:: kubernetes.client.models.v1beta1_param_ref - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_self_subject_review.rst b/doc/source/kubernetes.client.models.v1beta1_self_subject_review.rst deleted file mode 100644 index 8fd150b2fa..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_self_subject_review.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_self\_subject\_review module -============================================================== - -.. automodule:: kubernetes.client.models.v1beta1_self_subject_review - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_self_subject_review_status.rst b/doc/source/kubernetes.client.models.v1beta1_self_subject_review_status.rst deleted file mode 100644 index a96dbbc08a..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_self_subject_review_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_self\_subject\_review\_status module -====================================================================== - -.. automodule:: kubernetes.client.models.v1beta1_self_subject_review_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_type_checking.rst b/doc/source/kubernetes.client.models.v1beta1_type_checking.rst deleted file mode 100644 index 6bd58cb592..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_type_checking.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_type\_checking module -======================================================= - -.. automodule:: kubernetes.client.models.v1beta1_type_checking - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_validating_admission_policy.rst b/doc/source/kubernetes.client.models.v1beta1_validating_admission_policy.rst deleted file mode 100644 index c61a3d8bb2..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_validating_admission_policy.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_validating\_admission\_policy module -====================================================================== - -.. automodule:: kubernetes.client.models.v1beta1_validating_admission_policy - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_validating_admission_policy_binding.rst b/doc/source/kubernetes.client.models.v1beta1_validating_admission_policy_binding.rst deleted file mode 100644 index d069f6fb78..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_validating_admission_policy_binding.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_validating\_admission\_policy\_binding module -=============================================================================== - -.. automodule:: kubernetes.client.models.v1beta1_validating_admission_policy_binding - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_validating_admission_policy_binding_list.rst b/doc/source/kubernetes.client.models.v1beta1_validating_admission_policy_binding_list.rst deleted file mode 100644 index b5d6fc52f5..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_validating_admission_policy_binding_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_validating\_admission\_policy\_binding\_list module -===================================================================================== - -.. automodule:: kubernetes.client.models.v1beta1_validating_admission_policy_binding_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_validating_admission_policy_binding_spec.rst b/doc/source/kubernetes.client.models.v1beta1_validating_admission_policy_binding_spec.rst deleted file mode 100644 index 691312c97e..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_validating_admission_policy_binding_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_validating\_admission\_policy\_binding\_spec module -===================================================================================== - -.. automodule:: kubernetes.client.models.v1beta1_validating_admission_policy_binding_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_validating_admission_policy_list.rst b/doc/source/kubernetes.client.models.v1beta1_validating_admission_policy_list.rst deleted file mode 100644 index 5da9e73db1..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_validating_admission_policy_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_validating\_admission\_policy\_list module -============================================================================ - -.. automodule:: kubernetes.client.models.v1beta1_validating_admission_policy_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_validating_admission_policy_spec.rst b/doc/source/kubernetes.client.models.v1beta1_validating_admission_policy_spec.rst deleted file mode 100644 index 63cd367e79..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_validating_admission_policy_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_validating\_admission\_policy\_spec module -============================================================================ - -.. automodule:: kubernetes.client.models.v1beta1_validating_admission_policy_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_validating_admission_policy_status.rst b/doc/source/kubernetes.client.models.v1beta1_validating_admission_policy_status.rst deleted file mode 100644 index 66cec2fb30..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_validating_admission_policy_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_validating\_admission\_policy\_status module -============================================================================== - -.. automodule:: kubernetes.client.models.v1beta1_validating_admission_policy_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_validation.rst b/doc/source/kubernetes.client.models.v1beta1_validation.rst deleted file mode 100644 index 44f4323407..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_validation.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_validation module -=================================================== - -.. automodule:: kubernetes.client.models.v1beta1_validation - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_variable.rst b/doc/source/kubernetes.client.models.v1beta1_variable.rst deleted file mode 100644 index f8f35bafee..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_variable.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_variable module -================================================= - -.. automodule:: kubernetes.client.models.v1beta1_variable - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta3_exempt_priority_level_configuration.rst b/doc/source/kubernetes.client.models.v1beta3_exempt_priority_level_configuration.rst deleted file mode 100644 index ff91e2ec86..0000000000 --- a/doc/source/kubernetes.client.models.v1beta3_exempt_priority_level_configuration.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta3\_exempt\_priority\_level\_configuration module -=============================================================================== - -.. automodule:: kubernetes.client.models.v1beta3_exempt_priority_level_configuration - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta3_flow_distinguisher_method.rst b/doc/source/kubernetes.client.models.v1beta3_flow_distinguisher_method.rst deleted file mode 100644 index ab259d755a..0000000000 --- a/doc/source/kubernetes.client.models.v1beta3_flow_distinguisher_method.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta3\_flow\_distinguisher\_method module -==================================================================== - -.. automodule:: kubernetes.client.models.v1beta3_flow_distinguisher_method - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta3_flow_schema.rst b/doc/source/kubernetes.client.models.v1beta3_flow_schema.rst deleted file mode 100644 index 3b09a827c7..0000000000 --- a/doc/source/kubernetes.client.models.v1beta3_flow_schema.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta3\_flow\_schema module -===================================================== - -.. automodule:: kubernetes.client.models.v1beta3_flow_schema - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta3_flow_schema_condition.rst b/doc/source/kubernetes.client.models.v1beta3_flow_schema_condition.rst deleted file mode 100644 index 78090eb3b6..0000000000 --- a/doc/source/kubernetes.client.models.v1beta3_flow_schema_condition.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta3\_flow\_schema\_condition module -================================================================ - -.. automodule:: kubernetes.client.models.v1beta3_flow_schema_condition - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta3_flow_schema_list.rst b/doc/source/kubernetes.client.models.v1beta3_flow_schema_list.rst deleted file mode 100644 index 2ab441e938..0000000000 --- a/doc/source/kubernetes.client.models.v1beta3_flow_schema_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta3\_flow\_schema\_list module -=========================================================== - -.. automodule:: kubernetes.client.models.v1beta3_flow_schema_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta3_flow_schema_spec.rst b/doc/source/kubernetes.client.models.v1beta3_flow_schema_spec.rst deleted file mode 100644 index 89bfc6a9f8..0000000000 --- a/doc/source/kubernetes.client.models.v1beta3_flow_schema_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta3\_flow\_schema\_spec module -=========================================================== - -.. automodule:: kubernetes.client.models.v1beta3_flow_schema_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta3_flow_schema_status.rst b/doc/source/kubernetes.client.models.v1beta3_flow_schema_status.rst deleted file mode 100644 index 947baf340c..0000000000 --- a/doc/source/kubernetes.client.models.v1beta3_flow_schema_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta3\_flow\_schema\_status module -============================================================= - -.. automodule:: kubernetes.client.models.v1beta3_flow_schema_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta3_group_subject.rst b/doc/source/kubernetes.client.models.v1beta3_group_subject.rst deleted file mode 100644 index f0ef8eb526..0000000000 --- a/doc/source/kubernetes.client.models.v1beta3_group_subject.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta3\_group\_subject module -======================================================= - -.. automodule:: kubernetes.client.models.v1beta3_group_subject - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta3_limit_response.rst b/doc/source/kubernetes.client.models.v1beta3_limit_response.rst deleted file mode 100644 index e5834da057..0000000000 --- a/doc/source/kubernetes.client.models.v1beta3_limit_response.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta3\_limit\_response module -======================================================== - -.. automodule:: kubernetes.client.models.v1beta3_limit_response - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta3_limited_priority_level_configuration.rst b/doc/source/kubernetes.client.models.v1beta3_limited_priority_level_configuration.rst deleted file mode 100644 index 48317fbbe4..0000000000 --- a/doc/source/kubernetes.client.models.v1beta3_limited_priority_level_configuration.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta3\_limited\_priority\_level\_configuration module -================================================================================ - -.. automodule:: kubernetes.client.models.v1beta3_limited_priority_level_configuration - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta3_non_resource_policy_rule.rst b/doc/source/kubernetes.client.models.v1beta3_non_resource_policy_rule.rst deleted file mode 100644 index 6fe76bbe98..0000000000 --- a/doc/source/kubernetes.client.models.v1beta3_non_resource_policy_rule.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta3\_non\_resource\_policy\_rule module -==================================================================== - -.. automodule:: kubernetes.client.models.v1beta3_non_resource_policy_rule - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta3_policy_rules_with_subjects.rst b/doc/source/kubernetes.client.models.v1beta3_policy_rules_with_subjects.rst deleted file mode 100644 index 26f6c7e466..0000000000 --- a/doc/source/kubernetes.client.models.v1beta3_policy_rules_with_subjects.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta3\_policy\_rules\_with\_subjects module -====================================================================== - -.. automodule:: kubernetes.client.models.v1beta3_policy_rules_with_subjects - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta3_priority_level_configuration.rst b/doc/source/kubernetes.client.models.v1beta3_priority_level_configuration.rst deleted file mode 100644 index 970072c3e6..0000000000 --- a/doc/source/kubernetes.client.models.v1beta3_priority_level_configuration.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta3\_priority\_level\_configuration module -======================================================================= - -.. automodule:: kubernetes.client.models.v1beta3_priority_level_configuration - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta3_priority_level_configuration_condition.rst b/doc/source/kubernetes.client.models.v1beta3_priority_level_configuration_condition.rst deleted file mode 100644 index a4854ff408..0000000000 --- a/doc/source/kubernetes.client.models.v1beta3_priority_level_configuration_condition.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta3\_priority\_level\_configuration\_condition module -================================================================================== - -.. automodule:: kubernetes.client.models.v1beta3_priority_level_configuration_condition - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta3_priority_level_configuration_list.rst b/doc/source/kubernetes.client.models.v1beta3_priority_level_configuration_list.rst deleted file mode 100644 index f404078ebf..0000000000 --- a/doc/source/kubernetes.client.models.v1beta3_priority_level_configuration_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta3\_priority\_level\_configuration\_list module -============================================================================= - -.. automodule:: kubernetes.client.models.v1beta3_priority_level_configuration_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta3_priority_level_configuration_reference.rst b/doc/source/kubernetes.client.models.v1beta3_priority_level_configuration_reference.rst deleted file mode 100644 index ccb864f2f1..0000000000 --- a/doc/source/kubernetes.client.models.v1beta3_priority_level_configuration_reference.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta3\_priority\_level\_configuration\_reference module -================================================================================== - -.. automodule:: kubernetes.client.models.v1beta3_priority_level_configuration_reference - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta3_priority_level_configuration_spec.rst b/doc/source/kubernetes.client.models.v1beta3_priority_level_configuration_spec.rst deleted file mode 100644 index 0684aeb1b2..0000000000 --- a/doc/source/kubernetes.client.models.v1beta3_priority_level_configuration_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta3\_priority\_level\_configuration\_spec module -============================================================================= - -.. automodule:: kubernetes.client.models.v1beta3_priority_level_configuration_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta3_priority_level_configuration_status.rst b/doc/source/kubernetes.client.models.v1beta3_priority_level_configuration_status.rst deleted file mode 100644 index da37d16e95..0000000000 --- a/doc/source/kubernetes.client.models.v1beta3_priority_level_configuration_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta3\_priority\_level\_configuration\_status module -=============================================================================== - -.. automodule:: kubernetes.client.models.v1beta3_priority_level_configuration_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta3_queuing_configuration.rst b/doc/source/kubernetes.client.models.v1beta3_queuing_configuration.rst deleted file mode 100644 index 23072b7b9c..0000000000 --- a/doc/source/kubernetes.client.models.v1beta3_queuing_configuration.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta3\_queuing\_configuration module -=============================================================== - -.. automodule:: kubernetes.client.models.v1beta3_queuing_configuration - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta3_resource_policy_rule.rst b/doc/source/kubernetes.client.models.v1beta3_resource_policy_rule.rst deleted file mode 100644 index eae4b27e95..0000000000 --- a/doc/source/kubernetes.client.models.v1beta3_resource_policy_rule.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta3\_resource\_policy\_rule module -=============================================================== - -.. automodule:: kubernetes.client.models.v1beta3_resource_policy_rule - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta3_service_account_subject.rst b/doc/source/kubernetes.client.models.v1beta3_service_account_subject.rst deleted file mode 100644 index 60e080b539..0000000000 --- a/doc/source/kubernetes.client.models.v1beta3_service_account_subject.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta3\_service\_account\_subject module -================================================================== - -.. automodule:: kubernetes.client.models.v1beta3_service_account_subject - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta3_subject.rst b/doc/source/kubernetes.client.models.v1beta3_subject.rst deleted file mode 100644 index c87cbc143f..0000000000 --- a/doc/source/kubernetes.client.models.v1beta3_subject.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta3\_subject module -================================================ - -.. automodule:: kubernetes.client.models.v1beta3_subject - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta3_user_subject.rst b/doc/source/kubernetes.client.models.v1beta3_user_subject.rst deleted file mode 100644 index 4bfa03614e..0000000000 --- a/doc/source/kubernetes.client.models.v1beta3_user_subject.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta3\_user\_subject module -====================================================== - -.. automodule:: kubernetes.client.models.v1beta3_user_subject - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v2_container_resource_metric_source.rst b/doc/source/kubernetes.client.models.v2_container_resource_metric_source.rst deleted file mode 100644 index 416c4f889c..0000000000 --- a/doc/source/kubernetes.client.models.v2_container_resource_metric_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v2\_container\_resource\_metric\_source module -======================================================================= - -.. automodule:: kubernetes.client.models.v2_container_resource_metric_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v2_container_resource_metric_status.rst b/doc/source/kubernetes.client.models.v2_container_resource_metric_status.rst deleted file mode 100644 index 80cb5a8579..0000000000 --- a/doc/source/kubernetes.client.models.v2_container_resource_metric_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v2\_container\_resource\_metric\_status module -======================================================================= - -.. automodule:: kubernetes.client.models.v2_container_resource_metric_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v2_cross_version_object_reference.rst b/doc/source/kubernetes.client.models.v2_cross_version_object_reference.rst deleted file mode 100644 index 3fa8056492..0000000000 --- a/doc/source/kubernetes.client.models.v2_cross_version_object_reference.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v2\_cross\_version\_object\_reference module -===================================================================== - -.. automodule:: kubernetes.client.models.v2_cross_version_object_reference - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v2_external_metric_source.rst b/doc/source/kubernetes.client.models.v2_external_metric_source.rst deleted file mode 100644 index bb6f538a9f..0000000000 --- a/doc/source/kubernetes.client.models.v2_external_metric_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v2\_external\_metric\_source module -============================================================ - -.. automodule:: kubernetes.client.models.v2_external_metric_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v2_external_metric_status.rst b/doc/source/kubernetes.client.models.v2_external_metric_status.rst deleted file mode 100644 index 7d6c6b16a9..0000000000 --- a/doc/source/kubernetes.client.models.v2_external_metric_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v2\_external\_metric\_status module -============================================================ - -.. automodule:: kubernetes.client.models.v2_external_metric_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v2_horizontal_pod_autoscaler.rst b/doc/source/kubernetes.client.models.v2_horizontal_pod_autoscaler.rst deleted file mode 100644 index 4a6b9022cd..0000000000 --- a/doc/source/kubernetes.client.models.v2_horizontal_pod_autoscaler.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v2\_horizontal\_pod\_autoscaler module -=============================================================== - -.. automodule:: kubernetes.client.models.v2_horizontal_pod_autoscaler - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v2_horizontal_pod_autoscaler_behavior.rst b/doc/source/kubernetes.client.models.v2_horizontal_pod_autoscaler_behavior.rst deleted file mode 100644 index 6ff500add2..0000000000 --- a/doc/source/kubernetes.client.models.v2_horizontal_pod_autoscaler_behavior.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v2\_horizontal\_pod\_autoscaler\_behavior module -========================================================================= - -.. automodule:: kubernetes.client.models.v2_horizontal_pod_autoscaler_behavior - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v2_horizontal_pod_autoscaler_condition.rst b/doc/source/kubernetes.client.models.v2_horizontal_pod_autoscaler_condition.rst deleted file mode 100644 index 99abdcaf4f..0000000000 --- a/doc/source/kubernetes.client.models.v2_horizontal_pod_autoscaler_condition.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v2\_horizontal\_pod\_autoscaler\_condition module -========================================================================== - -.. automodule:: kubernetes.client.models.v2_horizontal_pod_autoscaler_condition - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v2_horizontal_pod_autoscaler_list.rst b/doc/source/kubernetes.client.models.v2_horizontal_pod_autoscaler_list.rst deleted file mode 100644 index a91d2e619f..0000000000 --- a/doc/source/kubernetes.client.models.v2_horizontal_pod_autoscaler_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v2\_horizontal\_pod\_autoscaler\_list module -===================================================================== - -.. automodule:: kubernetes.client.models.v2_horizontal_pod_autoscaler_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v2_horizontal_pod_autoscaler_spec.rst b/doc/source/kubernetes.client.models.v2_horizontal_pod_autoscaler_spec.rst deleted file mode 100644 index 2c7ce44f05..0000000000 --- a/doc/source/kubernetes.client.models.v2_horizontal_pod_autoscaler_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v2\_horizontal\_pod\_autoscaler\_spec module -===================================================================== - -.. automodule:: kubernetes.client.models.v2_horizontal_pod_autoscaler_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v2_horizontal_pod_autoscaler_status.rst b/doc/source/kubernetes.client.models.v2_horizontal_pod_autoscaler_status.rst deleted file mode 100644 index 5f66dad478..0000000000 --- a/doc/source/kubernetes.client.models.v2_horizontal_pod_autoscaler_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v2\_horizontal\_pod\_autoscaler\_status module -======================================================================= - -.. automodule:: kubernetes.client.models.v2_horizontal_pod_autoscaler_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v2_hpa_scaling_policy.rst b/doc/source/kubernetes.client.models.v2_hpa_scaling_policy.rst deleted file mode 100644 index 710d326ec6..0000000000 --- a/doc/source/kubernetes.client.models.v2_hpa_scaling_policy.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v2\_hpa\_scaling\_policy module -======================================================== - -.. automodule:: kubernetes.client.models.v2_hpa_scaling_policy - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v2_hpa_scaling_rules.rst b/doc/source/kubernetes.client.models.v2_hpa_scaling_rules.rst deleted file mode 100644 index d56db2b914..0000000000 --- a/doc/source/kubernetes.client.models.v2_hpa_scaling_rules.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v2\_hpa\_scaling\_rules module -======================================================= - -.. automodule:: kubernetes.client.models.v2_hpa_scaling_rules - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v2_metric_identifier.rst b/doc/source/kubernetes.client.models.v2_metric_identifier.rst deleted file mode 100644 index a4599ed5f7..0000000000 --- a/doc/source/kubernetes.client.models.v2_metric_identifier.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v2\_metric\_identifier module -====================================================== - -.. automodule:: kubernetes.client.models.v2_metric_identifier - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v2_metric_spec.rst b/doc/source/kubernetes.client.models.v2_metric_spec.rst deleted file mode 100644 index 3736b8cc42..0000000000 --- a/doc/source/kubernetes.client.models.v2_metric_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v2\_metric\_spec module -================================================ - -.. automodule:: kubernetes.client.models.v2_metric_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v2_metric_status.rst b/doc/source/kubernetes.client.models.v2_metric_status.rst deleted file mode 100644 index cc649e2308..0000000000 --- a/doc/source/kubernetes.client.models.v2_metric_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v2\_metric\_status module -================================================== - -.. automodule:: kubernetes.client.models.v2_metric_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v2_metric_target.rst b/doc/source/kubernetes.client.models.v2_metric_target.rst deleted file mode 100644 index 8b53fe4524..0000000000 --- a/doc/source/kubernetes.client.models.v2_metric_target.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v2\_metric\_target module -================================================== - -.. automodule:: kubernetes.client.models.v2_metric_target - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v2_metric_value_status.rst b/doc/source/kubernetes.client.models.v2_metric_value_status.rst deleted file mode 100644 index a36ee69664..0000000000 --- a/doc/source/kubernetes.client.models.v2_metric_value_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v2\_metric\_value\_status module -========================================================= - -.. automodule:: kubernetes.client.models.v2_metric_value_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v2_object_metric_source.rst b/doc/source/kubernetes.client.models.v2_object_metric_source.rst deleted file mode 100644 index ca0dd9780e..0000000000 --- a/doc/source/kubernetes.client.models.v2_object_metric_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v2\_object\_metric\_source module -========================================================== - -.. automodule:: kubernetes.client.models.v2_object_metric_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v2_object_metric_status.rst b/doc/source/kubernetes.client.models.v2_object_metric_status.rst deleted file mode 100644 index 2a65cf0f0c..0000000000 --- a/doc/source/kubernetes.client.models.v2_object_metric_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v2\_object\_metric\_status module -========================================================== - -.. automodule:: kubernetes.client.models.v2_object_metric_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v2_pods_metric_source.rst b/doc/source/kubernetes.client.models.v2_pods_metric_source.rst deleted file mode 100644 index 0fe4db1621..0000000000 --- a/doc/source/kubernetes.client.models.v2_pods_metric_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v2\_pods\_metric\_source module -======================================================== - -.. automodule:: kubernetes.client.models.v2_pods_metric_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v2_pods_metric_status.rst b/doc/source/kubernetes.client.models.v2_pods_metric_status.rst deleted file mode 100644 index 58042d41b5..0000000000 --- a/doc/source/kubernetes.client.models.v2_pods_metric_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v2\_pods\_metric\_status module -======================================================== - -.. automodule:: kubernetes.client.models.v2_pods_metric_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v2_resource_metric_source.rst b/doc/source/kubernetes.client.models.v2_resource_metric_source.rst deleted file mode 100644 index 565f68e5ee..0000000000 --- a/doc/source/kubernetes.client.models.v2_resource_metric_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v2\_resource\_metric\_source module -============================================================ - -.. automodule:: kubernetes.client.models.v2_resource_metric_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v2_resource_metric_status.rst b/doc/source/kubernetes.client.models.v2_resource_metric_status.rst deleted file mode 100644 index dac92bd11e..0000000000 --- a/doc/source/kubernetes.client.models.v2_resource_metric_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v2\_resource\_metric\_status module -============================================================ - -.. automodule:: kubernetes.client.models.v2_resource_metric_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.version_info.rst b/doc/source/kubernetes.client.models.version_info.rst deleted file mode 100644 index 62cfae0865..0000000000 --- a/doc/source/kubernetes.client.models.version_info.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.version\_info module -============================================= - -.. automodule:: kubernetes.client.models.version_info - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.rest.rst b/doc/source/kubernetes.client.rest.rst deleted file mode 100644 index 55334bef78..0000000000 --- a/doc/source/kubernetes.client.rest.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.rest module -============================= - -.. automodule:: kubernetes.client.rest - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.rst b/doc/source/kubernetes.client.rst deleted file mode 100644 index e96c7627a1..0000000000 --- a/doc/source/kubernetes.client.rst +++ /dev/null @@ -1,30 +0,0 @@ -kubernetes.client package -========================= - -Subpackages ------------ - -.. toctree:: - :maxdepth: 4 - - kubernetes.client.api - kubernetes.client.models - -Submodules ----------- - -.. toctree:: - :maxdepth: 4 - - kubernetes.client.api_client - kubernetes.client.configuration - kubernetes.client.exceptions - kubernetes.client.rest - -Module contents ---------------- - -.. automodule:: kubernetes.client - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.e2e_test.base.rst b/doc/source/kubernetes.e2e_test.base.rst deleted file mode 100644 index 376657861d..0000000000 --- a/doc/source/kubernetes.e2e_test.base.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.e2e\_test.base module -================================ - -.. automodule:: kubernetes.e2e_test.base - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.e2e_test.port_server.rst b/doc/source/kubernetes.e2e_test.port_server.rst deleted file mode 100644 index 5e83fccaa2..0000000000 --- a/doc/source/kubernetes.e2e_test.port_server.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.e2e\_test.port\_server module -======================================== - -.. automodule:: kubernetes.e2e_test.port_server - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.e2e_test.rst b/doc/source/kubernetes.e2e_test.rst deleted file mode 100644 index 07ec5995ce..0000000000 --- a/doc/source/kubernetes.e2e_test.rst +++ /dev/null @@ -1,24 +0,0 @@ -kubernetes.e2e\_test package -============================ - -Submodules ----------- - -.. toctree:: - :maxdepth: 4 - - kubernetes.e2e_test.base - kubernetes.e2e_test.port_server - kubernetes.e2e_test.test_apps - kubernetes.e2e_test.test_batch - kubernetes.e2e_test.test_client - kubernetes.e2e_test.test_utils - kubernetes.e2e_test.test_watch - -Module contents ---------------- - -.. automodule:: kubernetes.e2e_test - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.e2e_test.test_apps.rst b/doc/source/kubernetes.e2e_test.test_apps.rst deleted file mode 100644 index a4957d6142..0000000000 --- a/doc/source/kubernetes.e2e_test.test_apps.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.e2e\_test.test\_apps module -====================================== - -.. automodule:: kubernetes.e2e_test.test_apps - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.e2e_test.test_batch.rst b/doc/source/kubernetes.e2e_test.test_batch.rst deleted file mode 100644 index ab1ca153a8..0000000000 --- a/doc/source/kubernetes.e2e_test.test_batch.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.e2e\_test.test\_batch module -======================================= - -.. automodule:: kubernetes.e2e_test.test_batch - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.e2e_test.test_client.rst b/doc/source/kubernetes.e2e_test.test_client.rst deleted file mode 100644 index 9cb16aa1cb..0000000000 --- a/doc/source/kubernetes.e2e_test.test_client.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.e2e\_test.test\_client module -======================================== - -.. automodule:: kubernetes.e2e_test.test_client - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.e2e_test.test_utils.rst b/doc/source/kubernetes.e2e_test.test_utils.rst deleted file mode 100644 index dcbaf05135..0000000000 --- a/doc/source/kubernetes.e2e_test.test_utils.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.e2e\_test.test\_utils module -======================================= - -.. automodule:: kubernetes.e2e_test.test_utils - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.e2e_test.test_watch.rst b/doc/source/kubernetes.e2e_test.test_watch.rst deleted file mode 100644 index 5ebf524c8d..0000000000 --- a/doc/source/kubernetes.e2e_test.test_watch.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.e2e\_test.test\_watch module -======================================= - -.. automodule:: kubernetes.e2e_test.test_watch - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.rst b/doc/source/kubernetes.rst deleted file mode 100644 index df2f9da33c..0000000000 --- a/doc/source/kubernetes.rst +++ /dev/null @@ -1,26 +0,0 @@ -kubernetes package -================== - -Subpackages ------------ - -.. toctree:: - :maxdepth: 4 - - kubernetes.client - kubernetes.config - kubernetes.dynamic - kubernetes.e2e_test - kubernetes.leaderelection - kubernetes.stream - kubernetes.test - kubernetes.utils - kubernetes.watch - -Module contents ---------------- - -.. automodule:: kubernetes - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.rst b/doc/source/kubernetes.test.rst deleted file mode 100644 index 46d033cd52..0000000000 --- a/doc/source/kubernetes.test.rst +++ /dev/null @@ -1,691 +0,0 @@ -kubernetes.test package -======================= - -Submodules ----------- - -.. toctree:: - :maxdepth: 4 - - kubernetes.test.test_admissionregistration_api - kubernetes.test.test_admissionregistration_v1_api - kubernetes.test.test_admissionregistration_v1_service_reference - kubernetes.test.test_admissionregistration_v1_webhook_client_config - kubernetes.test.test_admissionregistration_v1alpha1_api - kubernetes.test.test_admissionregistration_v1beta1_api - kubernetes.test.test_apiextensions_api - kubernetes.test.test_apiextensions_v1_api - kubernetes.test.test_apiextensions_v1_service_reference - kubernetes.test.test_apiextensions_v1_webhook_client_config - kubernetes.test.test_apiregistration_api - kubernetes.test.test_apiregistration_v1_api - kubernetes.test.test_apiregistration_v1_service_reference - kubernetes.test.test_apis_api - kubernetes.test.test_apps_api - kubernetes.test.test_apps_v1_api - kubernetes.test.test_authentication_api - kubernetes.test.test_authentication_v1_api - kubernetes.test.test_authentication_v1_token_request - kubernetes.test.test_authentication_v1alpha1_api - kubernetes.test.test_authentication_v1beta1_api - kubernetes.test.test_authorization_api - kubernetes.test.test_authorization_v1_api - kubernetes.test.test_autoscaling_api - kubernetes.test.test_autoscaling_v1_api - kubernetes.test.test_autoscaling_v2_api - kubernetes.test.test_batch_api - kubernetes.test.test_batch_v1_api - kubernetes.test.test_certificates_api - kubernetes.test.test_certificates_v1_api - kubernetes.test.test_certificates_v1alpha1_api - kubernetes.test.test_coordination_api - kubernetes.test.test_coordination_v1_api - kubernetes.test.test_core_api - kubernetes.test.test_core_v1_api - kubernetes.test.test_core_v1_endpoint_port - kubernetes.test.test_core_v1_event - kubernetes.test.test_core_v1_event_list - kubernetes.test.test_core_v1_event_series - kubernetes.test.test_custom_objects_api - kubernetes.test.test_discovery_api - kubernetes.test.test_discovery_v1_api - kubernetes.test.test_discovery_v1_endpoint_port - kubernetes.test.test_events_api - kubernetes.test.test_events_v1_api - kubernetes.test.test_events_v1_event - kubernetes.test.test_events_v1_event_list - kubernetes.test.test_events_v1_event_series - kubernetes.test.test_flowcontrol_apiserver_api - kubernetes.test.test_flowcontrol_apiserver_v1_api - kubernetes.test.test_flowcontrol_apiserver_v1beta3_api - kubernetes.test.test_flowcontrol_v1_subject - kubernetes.test.test_internal_apiserver_api - kubernetes.test.test_internal_apiserver_v1alpha1_api - kubernetes.test.test_logs_api - kubernetes.test.test_networking_api - kubernetes.test.test_networking_v1_api - kubernetes.test.test_networking_v1alpha1_api - kubernetes.test.test_node_api - kubernetes.test.test_node_v1_api - kubernetes.test.test_openid_api - kubernetes.test.test_policy_api - kubernetes.test.test_policy_v1_api - kubernetes.test.test_rbac_authorization_api - kubernetes.test.test_rbac_authorization_v1_api - kubernetes.test.test_rbac_v1_subject - kubernetes.test.test_resource_api - kubernetes.test.test_resource_v1alpha2_api - kubernetes.test.test_scheduling_api - kubernetes.test.test_scheduling_v1_api - kubernetes.test.test_storage_api - kubernetes.test.test_storage_v1_api - kubernetes.test.test_storage_v1_token_request - kubernetes.test.test_storage_v1alpha1_api - kubernetes.test.test_storagemigration_api - kubernetes.test.test_storagemigration_v1alpha1_api - kubernetes.test.test_v1_affinity - kubernetes.test.test_v1_aggregation_rule - kubernetes.test.test_v1_api_group - kubernetes.test.test_v1_api_group_list - kubernetes.test.test_v1_api_resource - kubernetes.test.test_v1_api_resource_list - kubernetes.test.test_v1_api_service - kubernetes.test.test_v1_api_service_condition - kubernetes.test.test_v1_api_service_list - kubernetes.test.test_v1_api_service_spec - kubernetes.test.test_v1_api_service_status - kubernetes.test.test_v1_api_versions - kubernetes.test.test_v1_app_armor_profile - kubernetes.test.test_v1_attached_volume - kubernetes.test.test_v1_audit_annotation - kubernetes.test.test_v1_aws_elastic_block_store_volume_source - kubernetes.test.test_v1_azure_disk_volume_source - kubernetes.test.test_v1_azure_file_persistent_volume_source - kubernetes.test.test_v1_azure_file_volume_source - kubernetes.test.test_v1_binding - kubernetes.test.test_v1_bound_object_reference - kubernetes.test.test_v1_capabilities - kubernetes.test.test_v1_ceph_fs_persistent_volume_source - kubernetes.test.test_v1_ceph_fs_volume_source - kubernetes.test.test_v1_certificate_signing_request - kubernetes.test.test_v1_certificate_signing_request_condition - kubernetes.test.test_v1_certificate_signing_request_list - kubernetes.test.test_v1_certificate_signing_request_spec - kubernetes.test.test_v1_certificate_signing_request_status - kubernetes.test.test_v1_cinder_persistent_volume_source - kubernetes.test.test_v1_cinder_volume_source - kubernetes.test.test_v1_claim_source - kubernetes.test.test_v1_client_ip_config - kubernetes.test.test_v1_cluster_role - kubernetes.test.test_v1_cluster_role_binding - kubernetes.test.test_v1_cluster_role_binding_list - kubernetes.test.test_v1_cluster_role_list - kubernetes.test.test_v1_cluster_trust_bundle_projection - kubernetes.test.test_v1_component_condition - kubernetes.test.test_v1_component_status - kubernetes.test.test_v1_component_status_list - kubernetes.test.test_v1_condition - kubernetes.test.test_v1_config_map - kubernetes.test.test_v1_config_map_env_source - kubernetes.test.test_v1_config_map_key_selector - kubernetes.test.test_v1_config_map_list - kubernetes.test.test_v1_config_map_node_config_source - kubernetes.test.test_v1_config_map_projection - kubernetes.test.test_v1_config_map_volume_source - kubernetes.test.test_v1_container - kubernetes.test.test_v1_container_image - kubernetes.test.test_v1_container_port - kubernetes.test.test_v1_container_resize_policy - kubernetes.test.test_v1_container_state - kubernetes.test.test_v1_container_state_running - kubernetes.test.test_v1_container_state_terminated - kubernetes.test.test_v1_container_state_waiting - kubernetes.test.test_v1_container_status - kubernetes.test.test_v1_controller_revision - kubernetes.test.test_v1_controller_revision_list - kubernetes.test.test_v1_cron_job - kubernetes.test.test_v1_cron_job_list - kubernetes.test.test_v1_cron_job_spec - kubernetes.test.test_v1_cron_job_status - kubernetes.test.test_v1_cross_version_object_reference - kubernetes.test.test_v1_csi_driver - kubernetes.test.test_v1_csi_driver_list - kubernetes.test.test_v1_csi_driver_spec - kubernetes.test.test_v1_csi_node - kubernetes.test.test_v1_csi_node_driver - kubernetes.test.test_v1_csi_node_list - kubernetes.test.test_v1_csi_node_spec - kubernetes.test.test_v1_csi_persistent_volume_source - kubernetes.test.test_v1_csi_storage_capacity - kubernetes.test.test_v1_csi_storage_capacity_list - kubernetes.test.test_v1_csi_volume_source - kubernetes.test.test_v1_custom_resource_column_definition - kubernetes.test.test_v1_custom_resource_conversion - kubernetes.test.test_v1_custom_resource_definition - kubernetes.test.test_v1_custom_resource_definition_condition - kubernetes.test.test_v1_custom_resource_definition_list - kubernetes.test.test_v1_custom_resource_definition_names - kubernetes.test.test_v1_custom_resource_definition_spec - kubernetes.test.test_v1_custom_resource_definition_status - kubernetes.test.test_v1_custom_resource_definition_version - kubernetes.test.test_v1_custom_resource_subresource_scale - kubernetes.test.test_v1_custom_resource_subresources - kubernetes.test.test_v1_custom_resource_validation - kubernetes.test.test_v1_daemon_endpoint - kubernetes.test.test_v1_daemon_set - kubernetes.test.test_v1_daemon_set_condition - kubernetes.test.test_v1_daemon_set_list - kubernetes.test.test_v1_daemon_set_spec - kubernetes.test.test_v1_daemon_set_status - kubernetes.test.test_v1_daemon_set_update_strategy - kubernetes.test.test_v1_delete_options - kubernetes.test.test_v1_deployment - kubernetes.test.test_v1_deployment_condition - kubernetes.test.test_v1_deployment_list - kubernetes.test.test_v1_deployment_spec - kubernetes.test.test_v1_deployment_status - kubernetes.test.test_v1_deployment_strategy - kubernetes.test.test_v1_downward_api_projection - kubernetes.test.test_v1_downward_api_volume_file - kubernetes.test.test_v1_downward_api_volume_source - kubernetes.test.test_v1_empty_dir_volume_source - kubernetes.test.test_v1_endpoint - kubernetes.test.test_v1_endpoint_address - kubernetes.test.test_v1_endpoint_conditions - kubernetes.test.test_v1_endpoint_hints - kubernetes.test.test_v1_endpoint_slice - kubernetes.test.test_v1_endpoint_slice_list - kubernetes.test.test_v1_endpoint_subset - kubernetes.test.test_v1_endpoints - kubernetes.test.test_v1_endpoints_list - kubernetes.test.test_v1_env_from_source - kubernetes.test.test_v1_env_var - kubernetes.test.test_v1_env_var_source - kubernetes.test.test_v1_ephemeral_container - kubernetes.test.test_v1_ephemeral_volume_source - kubernetes.test.test_v1_event_source - kubernetes.test.test_v1_eviction - kubernetes.test.test_v1_exec_action - kubernetes.test.test_v1_exempt_priority_level_configuration - kubernetes.test.test_v1_expression_warning - kubernetes.test.test_v1_external_documentation - kubernetes.test.test_v1_fc_volume_source - kubernetes.test.test_v1_flex_persistent_volume_source - kubernetes.test.test_v1_flex_volume_source - kubernetes.test.test_v1_flocker_volume_source - kubernetes.test.test_v1_flow_distinguisher_method - kubernetes.test.test_v1_flow_schema - kubernetes.test.test_v1_flow_schema_condition - kubernetes.test.test_v1_flow_schema_list - kubernetes.test.test_v1_flow_schema_spec - kubernetes.test.test_v1_flow_schema_status - kubernetes.test.test_v1_for_zone - kubernetes.test.test_v1_gce_persistent_disk_volume_source - kubernetes.test.test_v1_git_repo_volume_source - kubernetes.test.test_v1_glusterfs_persistent_volume_source - kubernetes.test.test_v1_glusterfs_volume_source - kubernetes.test.test_v1_group_subject - kubernetes.test.test_v1_group_version_for_discovery - kubernetes.test.test_v1_grpc_action - kubernetes.test.test_v1_horizontal_pod_autoscaler - kubernetes.test.test_v1_horizontal_pod_autoscaler_list - kubernetes.test.test_v1_horizontal_pod_autoscaler_spec - kubernetes.test.test_v1_horizontal_pod_autoscaler_status - kubernetes.test.test_v1_host_alias - kubernetes.test.test_v1_host_ip - kubernetes.test.test_v1_host_path_volume_source - kubernetes.test.test_v1_http_get_action - kubernetes.test.test_v1_http_header - kubernetes.test.test_v1_http_ingress_path - kubernetes.test.test_v1_http_ingress_rule_value - kubernetes.test.test_v1_ingress - kubernetes.test.test_v1_ingress_backend - kubernetes.test.test_v1_ingress_class - kubernetes.test.test_v1_ingress_class_list - kubernetes.test.test_v1_ingress_class_parameters_reference - kubernetes.test.test_v1_ingress_class_spec - kubernetes.test.test_v1_ingress_list - kubernetes.test.test_v1_ingress_load_balancer_ingress - kubernetes.test.test_v1_ingress_load_balancer_status - kubernetes.test.test_v1_ingress_port_status - kubernetes.test.test_v1_ingress_rule - kubernetes.test.test_v1_ingress_service_backend - kubernetes.test.test_v1_ingress_spec - kubernetes.test.test_v1_ingress_status - kubernetes.test.test_v1_ingress_tls - kubernetes.test.test_v1_ip_block - kubernetes.test.test_v1_iscsi_persistent_volume_source - kubernetes.test.test_v1_iscsi_volume_source - kubernetes.test.test_v1_job - kubernetes.test.test_v1_job_condition - kubernetes.test.test_v1_job_list - kubernetes.test.test_v1_job_spec - kubernetes.test.test_v1_job_status - kubernetes.test.test_v1_job_template_spec - kubernetes.test.test_v1_json_schema_props - kubernetes.test.test_v1_key_to_path - kubernetes.test.test_v1_label_selector - kubernetes.test.test_v1_label_selector_requirement - kubernetes.test.test_v1_lease - kubernetes.test.test_v1_lease_list - kubernetes.test.test_v1_lease_spec - kubernetes.test.test_v1_lifecycle - kubernetes.test.test_v1_lifecycle_handler - kubernetes.test.test_v1_limit_range - kubernetes.test.test_v1_limit_range_item - kubernetes.test.test_v1_limit_range_list - kubernetes.test.test_v1_limit_range_spec - kubernetes.test.test_v1_limit_response - kubernetes.test.test_v1_limited_priority_level_configuration - kubernetes.test.test_v1_list_meta - kubernetes.test.test_v1_load_balancer_ingress - kubernetes.test.test_v1_load_balancer_status - kubernetes.test.test_v1_local_object_reference - kubernetes.test.test_v1_local_subject_access_review - kubernetes.test.test_v1_local_volume_source - kubernetes.test.test_v1_managed_fields_entry - kubernetes.test.test_v1_match_condition - kubernetes.test.test_v1_match_resources - kubernetes.test.test_v1_modify_volume_status - kubernetes.test.test_v1_mutating_webhook - kubernetes.test.test_v1_mutating_webhook_configuration - kubernetes.test.test_v1_mutating_webhook_configuration_list - kubernetes.test.test_v1_named_rule_with_operations - kubernetes.test.test_v1_namespace - kubernetes.test.test_v1_namespace_condition - kubernetes.test.test_v1_namespace_list - kubernetes.test.test_v1_namespace_spec - kubernetes.test.test_v1_namespace_status - kubernetes.test.test_v1_network_policy - kubernetes.test.test_v1_network_policy_egress_rule - kubernetes.test.test_v1_network_policy_ingress_rule - kubernetes.test.test_v1_network_policy_list - kubernetes.test.test_v1_network_policy_peer - kubernetes.test.test_v1_network_policy_port - kubernetes.test.test_v1_network_policy_spec - kubernetes.test.test_v1_nfs_volume_source - kubernetes.test.test_v1_node - kubernetes.test.test_v1_node_address - kubernetes.test.test_v1_node_affinity - kubernetes.test.test_v1_node_condition - kubernetes.test.test_v1_node_config_source - kubernetes.test.test_v1_node_config_status - kubernetes.test.test_v1_node_daemon_endpoints - kubernetes.test.test_v1_node_list - kubernetes.test.test_v1_node_runtime_handler - kubernetes.test.test_v1_node_runtime_handler_features - kubernetes.test.test_v1_node_selector - kubernetes.test.test_v1_node_selector_requirement - kubernetes.test.test_v1_node_selector_term - kubernetes.test.test_v1_node_spec - kubernetes.test.test_v1_node_status - kubernetes.test.test_v1_node_system_info - kubernetes.test.test_v1_non_resource_attributes - kubernetes.test.test_v1_non_resource_policy_rule - kubernetes.test.test_v1_non_resource_rule - kubernetes.test.test_v1_object_field_selector - kubernetes.test.test_v1_object_meta - kubernetes.test.test_v1_object_reference - kubernetes.test.test_v1_overhead - kubernetes.test.test_v1_owner_reference - kubernetes.test.test_v1_param_kind - kubernetes.test.test_v1_param_ref - kubernetes.test.test_v1_persistent_volume - kubernetes.test.test_v1_persistent_volume_claim - kubernetes.test.test_v1_persistent_volume_claim_condition - kubernetes.test.test_v1_persistent_volume_claim_list - kubernetes.test.test_v1_persistent_volume_claim_spec - kubernetes.test.test_v1_persistent_volume_claim_status - kubernetes.test.test_v1_persistent_volume_claim_template - kubernetes.test.test_v1_persistent_volume_claim_volume_source - kubernetes.test.test_v1_persistent_volume_list - kubernetes.test.test_v1_persistent_volume_spec - kubernetes.test.test_v1_persistent_volume_status - kubernetes.test.test_v1_photon_persistent_disk_volume_source - kubernetes.test.test_v1_pod - kubernetes.test.test_v1_pod_affinity - kubernetes.test.test_v1_pod_affinity_term - kubernetes.test.test_v1_pod_anti_affinity - kubernetes.test.test_v1_pod_condition - kubernetes.test.test_v1_pod_disruption_budget - kubernetes.test.test_v1_pod_disruption_budget_list - kubernetes.test.test_v1_pod_disruption_budget_spec - kubernetes.test.test_v1_pod_disruption_budget_status - kubernetes.test.test_v1_pod_dns_config - kubernetes.test.test_v1_pod_dns_config_option - kubernetes.test.test_v1_pod_failure_policy - kubernetes.test.test_v1_pod_failure_policy_on_exit_codes_requirement - kubernetes.test.test_v1_pod_failure_policy_on_pod_conditions_pattern - kubernetes.test.test_v1_pod_failure_policy_rule - kubernetes.test.test_v1_pod_ip - kubernetes.test.test_v1_pod_list - kubernetes.test.test_v1_pod_os - kubernetes.test.test_v1_pod_readiness_gate - kubernetes.test.test_v1_pod_resource_claim - kubernetes.test.test_v1_pod_resource_claim_status - kubernetes.test.test_v1_pod_scheduling_gate - kubernetes.test.test_v1_pod_security_context - kubernetes.test.test_v1_pod_spec - kubernetes.test.test_v1_pod_status - kubernetes.test.test_v1_pod_template - kubernetes.test.test_v1_pod_template_list - kubernetes.test.test_v1_pod_template_spec - kubernetes.test.test_v1_policy_rule - kubernetes.test.test_v1_policy_rules_with_subjects - kubernetes.test.test_v1_port_status - kubernetes.test.test_v1_portworx_volume_source - kubernetes.test.test_v1_preconditions - kubernetes.test.test_v1_preferred_scheduling_term - kubernetes.test.test_v1_priority_class - kubernetes.test.test_v1_priority_class_list - kubernetes.test.test_v1_priority_level_configuration - kubernetes.test.test_v1_priority_level_configuration_condition - kubernetes.test.test_v1_priority_level_configuration_list - kubernetes.test.test_v1_priority_level_configuration_reference - kubernetes.test.test_v1_priority_level_configuration_spec - kubernetes.test.test_v1_priority_level_configuration_status - kubernetes.test.test_v1_probe - kubernetes.test.test_v1_projected_volume_source - kubernetes.test.test_v1_queuing_configuration - kubernetes.test.test_v1_quobyte_volume_source - kubernetes.test.test_v1_rbd_persistent_volume_source - kubernetes.test.test_v1_rbd_volume_source - kubernetes.test.test_v1_replica_set - kubernetes.test.test_v1_replica_set_condition - kubernetes.test.test_v1_replica_set_list - kubernetes.test.test_v1_replica_set_spec - kubernetes.test.test_v1_replica_set_status - kubernetes.test.test_v1_replication_controller - kubernetes.test.test_v1_replication_controller_condition - kubernetes.test.test_v1_replication_controller_list - kubernetes.test.test_v1_replication_controller_spec - kubernetes.test.test_v1_replication_controller_status - kubernetes.test.test_v1_resource_attributes - kubernetes.test.test_v1_resource_claim - kubernetes.test.test_v1_resource_field_selector - kubernetes.test.test_v1_resource_policy_rule - kubernetes.test.test_v1_resource_quota - kubernetes.test.test_v1_resource_quota_list - kubernetes.test.test_v1_resource_quota_spec - kubernetes.test.test_v1_resource_quota_status - kubernetes.test.test_v1_resource_requirements - kubernetes.test.test_v1_resource_rule - kubernetes.test.test_v1_role - kubernetes.test.test_v1_role_binding - kubernetes.test.test_v1_role_binding_list - kubernetes.test.test_v1_role_list - kubernetes.test.test_v1_role_ref - kubernetes.test.test_v1_rolling_update_daemon_set - kubernetes.test.test_v1_rolling_update_deployment - kubernetes.test.test_v1_rolling_update_stateful_set_strategy - kubernetes.test.test_v1_rule_with_operations - kubernetes.test.test_v1_runtime_class - kubernetes.test.test_v1_runtime_class_list - kubernetes.test.test_v1_scale - kubernetes.test.test_v1_scale_io_persistent_volume_source - kubernetes.test.test_v1_scale_io_volume_source - kubernetes.test.test_v1_scale_spec - kubernetes.test.test_v1_scale_status - kubernetes.test.test_v1_scheduling - kubernetes.test.test_v1_scope_selector - kubernetes.test.test_v1_scoped_resource_selector_requirement - kubernetes.test.test_v1_se_linux_options - kubernetes.test.test_v1_seccomp_profile - kubernetes.test.test_v1_secret - kubernetes.test.test_v1_secret_env_source - kubernetes.test.test_v1_secret_key_selector - kubernetes.test.test_v1_secret_list - kubernetes.test.test_v1_secret_projection - kubernetes.test.test_v1_secret_reference - kubernetes.test.test_v1_secret_volume_source - kubernetes.test.test_v1_security_context - kubernetes.test.test_v1_selectable_field - kubernetes.test.test_v1_self_subject_access_review - kubernetes.test.test_v1_self_subject_access_review_spec - kubernetes.test.test_v1_self_subject_review - kubernetes.test.test_v1_self_subject_review_status - kubernetes.test.test_v1_self_subject_rules_review - kubernetes.test.test_v1_self_subject_rules_review_spec - kubernetes.test.test_v1_server_address_by_client_cidr - kubernetes.test.test_v1_service - kubernetes.test.test_v1_service_account - kubernetes.test.test_v1_service_account_list - kubernetes.test.test_v1_service_account_subject - kubernetes.test.test_v1_service_account_token_projection - kubernetes.test.test_v1_service_backend_port - kubernetes.test.test_v1_service_list - kubernetes.test.test_v1_service_port - kubernetes.test.test_v1_service_spec - kubernetes.test.test_v1_service_status - kubernetes.test.test_v1_session_affinity_config - kubernetes.test.test_v1_sleep_action - kubernetes.test.test_v1_stateful_set - kubernetes.test.test_v1_stateful_set_condition - kubernetes.test.test_v1_stateful_set_list - kubernetes.test.test_v1_stateful_set_ordinals - kubernetes.test.test_v1_stateful_set_persistent_volume_claim_retention_policy - kubernetes.test.test_v1_stateful_set_spec - kubernetes.test.test_v1_stateful_set_status - kubernetes.test.test_v1_stateful_set_update_strategy - kubernetes.test.test_v1_status - kubernetes.test.test_v1_status_cause - kubernetes.test.test_v1_status_details - kubernetes.test.test_v1_storage_class - kubernetes.test.test_v1_storage_class_list - kubernetes.test.test_v1_storage_os_persistent_volume_source - kubernetes.test.test_v1_storage_os_volume_source - kubernetes.test.test_v1_subject_access_review - kubernetes.test.test_v1_subject_access_review_spec - kubernetes.test.test_v1_subject_access_review_status - kubernetes.test.test_v1_subject_rules_review_status - kubernetes.test.test_v1_success_policy - kubernetes.test.test_v1_success_policy_rule - kubernetes.test.test_v1_sysctl - kubernetes.test.test_v1_taint - kubernetes.test.test_v1_tcp_socket_action - kubernetes.test.test_v1_token_request_spec - kubernetes.test.test_v1_token_request_status - kubernetes.test.test_v1_token_review - kubernetes.test.test_v1_token_review_spec - kubernetes.test.test_v1_token_review_status - kubernetes.test.test_v1_toleration - kubernetes.test.test_v1_topology_selector_label_requirement - kubernetes.test.test_v1_topology_selector_term - kubernetes.test.test_v1_topology_spread_constraint - kubernetes.test.test_v1_type_checking - kubernetes.test.test_v1_typed_local_object_reference - kubernetes.test.test_v1_typed_object_reference - kubernetes.test.test_v1_uncounted_terminated_pods - kubernetes.test.test_v1_user_info - kubernetes.test.test_v1_user_subject - kubernetes.test.test_v1_validating_admission_policy - kubernetes.test.test_v1_validating_admission_policy_binding - kubernetes.test.test_v1_validating_admission_policy_binding_list - kubernetes.test.test_v1_validating_admission_policy_binding_spec - kubernetes.test.test_v1_validating_admission_policy_list - kubernetes.test.test_v1_validating_admission_policy_spec - kubernetes.test.test_v1_validating_admission_policy_status - kubernetes.test.test_v1_validating_webhook - kubernetes.test.test_v1_validating_webhook_configuration - kubernetes.test.test_v1_validating_webhook_configuration_list - kubernetes.test.test_v1_validation - kubernetes.test.test_v1_validation_rule - kubernetes.test.test_v1_variable - kubernetes.test.test_v1_volume - kubernetes.test.test_v1_volume_attachment - kubernetes.test.test_v1_volume_attachment_list - kubernetes.test.test_v1_volume_attachment_source - kubernetes.test.test_v1_volume_attachment_spec - kubernetes.test.test_v1_volume_attachment_status - kubernetes.test.test_v1_volume_device - kubernetes.test.test_v1_volume_error - kubernetes.test.test_v1_volume_mount - kubernetes.test.test_v1_volume_mount_status - kubernetes.test.test_v1_volume_node_affinity - kubernetes.test.test_v1_volume_node_resources - kubernetes.test.test_v1_volume_projection - kubernetes.test.test_v1_volume_resource_requirements - kubernetes.test.test_v1_vsphere_virtual_disk_volume_source - kubernetes.test.test_v1_watch_event - kubernetes.test.test_v1_webhook_conversion - kubernetes.test.test_v1_weighted_pod_affinity_term - kubernetes.test.test_v1_windows_security_context_options - kubernetes.test.test_v1alpha1_audit_annotation - kubernetes.test.test_v1alpha1_cluster_trust_bundle - kubernetes.test.test_v1alpha1_cluster_trust_bundle_list - kubernetes.test.test_v1alpha1_cluster_trust_bundle_spec - kubernetes.test.test_v1alpha1_expression_warning - kubernetes.test.test_v1alpha1_group_version_resource - kubernetes.test.test_v1alpha1_ip_address - kubernetes.test.test_v1alpha1_ip_address_list - kubernetes.test.test_v1alpha1_ip_address_spec - kubernetes.test.test_v1alpha1_match_condition - kubernetes.test.test_v1alpha1_match_resources - kubernetes.test.test_v1alpha1_migration_condition - kubernetes.test.test_v1alpha1_named_rule_with_operations - kubernetes.test.test_v1alpha1_param_kind - kubernetes.test.test_v1alpha1_param_ref - kubernetes.test.test_v1alpha1_parent_reference - kubernetes.test.test_v1alpha1_self_subject_review - kubernetes.test.test_v1alpha1_self_subject_review_status - kubernetes.test.test_v1alpha1_server_storage_version - kubernetes.test.test_v1alpha1_service_cidr - kubernetes.test.test_v1alpha1_service_cidr_list - kubernetes.test.test_v1alpha1_service_cidr_spec - kubernetes.test.test_v1alpha1_service_cidr_status - kubernetes.test.test_v1alpha1_storage_version - kubernetes.test.test_v1alpha1_storage_version_condition - kubernetes.test.test_v1alpha1_storage_version_list - kubernetes.test.test_v1alpha1_storage_version_migration - kubernetes.test.test_v1alpha1_storage_version_migration_list - kubernetes.test.test_v1alpha1_storage_version_migration_spec - kubernetes.test.test_v1alpha1_storage_version_migration_status - kubernetes.test.test_v1alpha1_storage_version_status - kubernetes.test.test_v1alpha1_type_checking - kubernetes.test.test_v1alpha1_validating_admission_policy - kubernetes.test.test_v1alpha1_validating_admission_policy_binding - kubernetes.test.test_v1alpha1_validating_admission_policy_binding_list - kubernetes.test.test_v1alpha1_validating_admission_policy_binding_spec - kubernetes.test.test_v1alpha1_validating_admission_policy_list - kubernetes.test.test_v1alpha1_validating_admission_policy_spec - kubernetes.test.test_v1alpha1_validating_admission_policy_status - kubernetes.test.test_v1alpha1_validation - kubernetes.test.test_v1alpha1_variable - kubernetes.test.test_v1alpha1_volume_attributes_class - kubernetes.test.test_v1alpha1_volume_attributes_class_list - kubernetes.test.test_v1alpha2_allocation_result - kubernetes.test.test_v1alpha2_driver_allocation_result - kubernetes.test.test_v1alpha2_driver_requests - kubernetes.test.test_v1alpha2_named_resources_allocation_result - kubernetes.test.test_v1alpha2_named_resources_attribute - kubernetes.test.test_v1alpha2_named_resources_filter - kubernetes.test.test_v1alpha2_named_resources_instance - kubernetes.test.test_v1alpha2_named_resources_int_slice - kubernetes.test.test_v1alpha2_named_resources_request - kubernetes.test.test_v1alpha2_named_resources_resources - kubernetes.test.test_v1alpha2_named_resources_string_slice - kubernetes.test.test_v1alpha2_pod_scheduling_context - kubernetes.test.test_v1alpha2_pod_scheduling_context_list - kubernetes.test.test_v1alpha2_pod_scheduling_context_spec - kubernetes.test.test_v1alpha2_pod_scheduling_context_status - kubernetes.test.test_v1alpha2_resource_claim - kubernetes.test.test_v1alpha2_resource_claim_consumer_reference - kubernetes.test.test_v1alpha2_resource_claim_list - kubernetes.test.test_v1alpha2_resource_claim_parameters - kubernetes.test.test_v1alpha2_resource_claim_parameters_list - kubernetes.test.test_v1alpha2_resource_claim_parameters_reference - kubernetes.test.test_v1alpha2_resource_claim_scheduling_status - kubernetes.test.test_v1alpha2_resource_claim_spec - kubernetes.test.test_v1alpha2_resource_claim_status - kubernetes.test.test_v1alpha2_resource_claim_template - kubernetes.test.test_v1alpha2_resource_claim_template_list - kubernetes.test.test_v1alpha2_resource_claim_template_spec - kubernetes.test.test_v1alpha2_resource_class - kubernetes.test.test_v1alpha2_resource_class_list - kubernetes.test.test_v1alpha2_resource_class_parameters - kubernetes.test.test_v1alpha2_resource_class_parameters_list - kubernetes.test.test_v1alpha2_resource_class_parameters_reference - kubernetes.test.test_v1alpha2_resource_filter - kubernetes.test.test_v1alpha2_resource_handle - kubernetes.test.test_v1alpha2_resource_request - kubernetes.test.test_v1alpha2_resource_slice - kubernetes.test.test_v1alpha2_resource_slice_list - kubernetes.test.test_v1alpha2_structured_resource_handle - kubernetes.test.test_v1alpha2_vendor_parameters - kubernetes.test.test_v1beta1_audit_annotation - kubernetes.test.test_v1beta1_expression_warning - kubernetes.test.test_v1beta1_match_condition - kubernetes.test.test_v1beta1_match_resources - kubernetes.test.test_v1beta1_named_rule_with_operations - kubernetes.test.test_v1beta1_param_kind - kubernetes.test.test_v1beta1_param_ref - kubernetes.test.test_v1beta1_self_subject_review - kubernetes.test.test_v1beta1_self_subject_review_status - kubernetes.test.test_v1beta1_type_checking - kubernetes.test.test_v1beta1_validating_admission_policy - kubernetes.test.test_v1beta1_validating_admission_policy_binding - kubernetes.test.test_v1beta1_validating_admission_policy_binding_list - kubernetes.test.test_v1beta1_validating_admission_policy_binding_spec - kubernetes.test.test_v1beta1_validating_admission_policy_list - kubernetes.test.test_v1beta1_validating_admission_policy_spec - kubernetes.test.test_v1beta1_validating_admission_policy_status - kubernetes.test.test_v1beta1_validation - kubernetes.test.test_v1beta1_variable - kubernetes.test.test_v1beta3_exempt_priority_level_configuration - kubernetes.test.test_v1beta3_flow_distinguisher_method - kubernetes.test.test_v1beta3_flow_schema - kubernetes.test.test_v1beta3_flow_schema_condition - kubernetes.test.test_v1beta3_flow_schema_list - kubernetes.test.test_v1beta3_flow_schema_spec - kubernetes.test.test_v1beta3_flow_schema_status - kubernetes.test.test_v1beta3_group_subject - kubernetes.test.test_v1beta3_limit_response - kubernetes.test.test_v1beta3_limited_priority_level_configuration - kubernetes.test.test_v1beta3_non_resource_policy_rule - kubernetes.test.test_v1beta3_policy_rules_with_subjects - kubernetes.test.test_v1beta3_priority_level_configuration - kubernetes.test.test_v1beta3_priority_level_configuration_condition - kubernetes.test.test_v1beta3_priority_level_configuration_list - kubernetes.test.test_v1beta3_priority_level_configuration_reference - kubernetes.test.test_v1beta3_priority_level_configuration_spec - kubernetes.test.test_v1beta3_priority_level_configuration_status - kubernetes.test.test_v1beta3_queuing_configuration - kubernetes.test.test_v1beta3_resource_policy_rule - kubernetes.test.test_v1beta3_service_account_subject - kubernetes.test.test_v1beta3_subject - kubernetes.test.test_v1beta3_user_subject - kubernetes.test.test_v2_container_resource_metric_source - kubernetes.test.test_v2_container_resource_metric_status - kubernetes.test.test_v2_cross_version_object_reference - kubernetes.test.test_v2_external_metric_source - kubernetes.test.test_v2_external_metric_status - kubernetes.test.test_v2_horizontal_pod_autoscaler - kubernetes.test.test_v2_horizontal_pod_autoscaler_behavior - kubernetes.test.test_v2_horizontal_pod_autoscaler_condition - kubernetes.test.test_v2_horizontal_pod_autoscaler_list - kubernetes.test.test_v2_horizontal_pod_autoscaler_spec - kubernetes.test.test_v2_horizontal_pod_autoscaler_status - kubernetes.test.test_v2_hpa_scaling_policy - kubernetes.test.test_v2_hpa_scaling_rules - kubernetes.test.test_v2_metric_identifier - kubernetes.test.test_v2_metric_spec - kubernetes.test.test_v2_metric_status - kubernetes.test.test_v2_metric_target - kubernetes.test.test_v2_metric_value_status - kubernetes.test.test_v2_object_metric_source - kubernetes.test.test_v2_object_metric_status - kubernetes.test.test_v2_pods_metric_source - kubernetes.test.test_v2_pods_metric_status - kubernetes.test.test_v2_resource_metric_source - kubernetes.test.test_v2_resource_metric_status - kubernetes.test.test_version_api - kubernetes.test.test_version_info - kubernetes.test.test_well_known_api - -Module contents ---------------- - -.. automodule:: kubernetes.test - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_admissionregistration_api.rst b/doc/source/kubernetes.test.test_admissionregistration_api.rst deleted file mode 100644 index 7efa7fe4b7..0000000000 --- a/doc/source/kubernetes.test.test_admissionregistration_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_admissionregistration\_api module -======================================================= - -.. automodule:: kubernetes.test.test_admissionregistration_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_admissionregistration_v1_api.rst b/doc/source/kubernetes.test.test_admissionregistration_v1_api.rst deleted file mode 100644 index dcd7f81865..0000000000 --- a/doc/source/kubernetes.test.test_admissionregistration_v1_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_admissionregistration\_v1\_api module -=========================================================== - -.. automodule:: kubernetes.test.test_admissionregistration_v1_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_admissionregistration_v1_service_reference.rst b/doc/source/kubernetes.test.test_admissionregistration_v1_service_reference.rst deleted file mode 100644 index b7f74ac6d3..0000000000 --- a/doc/source/kubernetes.test.test_admissionregistration_v1_service_reference.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_admissionregistration\_v1\_service\_reference module -========================================================================== - -.. automodule:: kubernetes.test.test_admissionregistration_v1_service_reference - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_admissionregistration_v1_webhook_client_config.rst b/doc/source/kubernetes.test.test_admissionregistration_v1_webhook_client_config.rst deleted file mode 100644 index 62af186476..0000000000 --- a/doc/source/kubernetes.test.test_admissionregistration_v1_webhook_client_config.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_admissionregistration\_v1\_webhook\_client\_config module -=============================================================================== - -.. automodule:: kubernetes.test.test_admissionregistration_v1_webhook_client_config - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_admissionregistration_v1alpha1_api.rst b/doc/source/kubernetes.test.test_admissionregistration_v1alpha1_api.rst deleted file mode 100644 index 3f2bdfe03b..0000000000 --- a/doc/source/kubernetes.test.test_admissionregistration_v1alpha1_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_admissionregistration\_v1alpha1\_api module -================================================================= - -.. automodule:: kubernetes.test.test_admissionregistration_v1alpha1_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_admissionregistration_v1beta1_api.rst b/doc/source/kubernetes.test.test_admissionregistration_v1beta1_api.rst deleted file mode 100644 index 6ab20345c8..0000000000 --- a/doc/source/kubernetes.test.test_admissionregistration_v1beta1_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_admissionregistration\_v1beta1\_api module -================================================================ - -.. automodule:: kubernetes.test.test_admissionregistration_v1beta1_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_apiextensions_api.rst b/doc/source/kubernetes.test.test_apiextensions_api.rst deleted file mode 100644 index 34004c8583..0000000000 --- a/doc/source/kubernetes.test.test_apiextensions_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_apiextensions\_api module -=============================================== - -.. automodule:: kubernetes.test.test_apiextensions_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_apiextensions_v1_api.rst b/doc/source/kubernetes.test.test_apiextensions_v1_api.rst deleted file mode 100644 index 10f0c9cee8..0000000000 --- a/doc/source/kubernetes.test.test_apiextensions_v1_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_apiextensions\_v1\_api module -=================================================== - -.. automodule:: kubernetes.test.test_apiextensions_v1_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_apiextensions_v1_service_reference.rst b/doc/source/kubernetes.test.test_apiextensions_v1_service_reference.rst deleted file mode 100644 index 2e1873846a..0000000000 --- a/doc/source/kubernetes.test.test_apiextensions_v1_service_reference.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_apiextensions\_v1\_service\_reference module -================================================================== - -.. automodule:: kubernetes.test.test_apiextensions_v1_service_reference - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_apiextensions_v1_webhook_client_config.rst b/doc/source/kubernetes.test.test_apiextensions_v1_webhook_client_config.rst deleted file mode 100644 index 5301c25e14..0000000000 --- a/doc/source/kubernetes.test.test_apiextensions_v1_webhook_client_config.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_apiextensions\_v1\_webhook\_client\_config module -======================================================================= - -.. automodule:: kubernetes.test.test_apiextensions_v1_webhook_client_config - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_apiregistration_api.rst b/doc/source/kubernetes.test.test_apiregistration_api.rst deleted file mode 100644 index dfc8c35a05..0000000000 --- a/doc/source/kubernetes.test.test_apiregistration_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_apiregistration\_api module -================================================= - -.. automodule:: kubernetes.test.test_apiregistration_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_apiregistration_v1_api.rst b/doc/source/kubernetes.test.test_apiregistration_v1_api.rst deleted file mode 100644 index 0e00bcd4cb..0000000000 --- a/doc/source/kubernetes.test.test_apiregistration_v1_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_apiregistration\_v1\_api module -===================================================== - -.. automodule:: kubernetes.test.test_apiregistration_v1_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_apiregistration_v1_service_reference.rst b/doc/source/kubernetes.test.test_apiregistration_v1_service_reference.rst deleted file mode 100644 index 894f51839b..0000000000 --- a/doc/source/kubernetes.test.test_apiregistration_v1_service_reference.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_apiregistration\_v1\_service\_reference module -==================================================================== - -.. automodule:: kubernetes.test.test_apiregistration_v1_service_reference - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_apis_api.rst b/doc/source/kubernetes.test.test_apis_api.rst deleted file mode 100644 index f64a507335..0000000000 --- a/doc/source/kubernetes.test.test_apis_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_apis\_api module -====================================== - -.. automodule:: kubernetes.test.test_apis_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_apps_api.rst b/doc/source/kubernetes.test.test_apps_api.rst deleted file mode 100644 index e7016ba6bc..0000000000 --- a/doc/source/kubernetes.test.test_apps_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_apps\_api module -====================================== - -.. automodule:: kubernetes.test.test_apps_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_apps_v1_api.rst b/doc/source/kubernetes.test.test_apps_v1_api.rst deleted file mode 100644 index 27ac5bb7ed..0000000000 --- a/doc/source/kubernetes.test.test_apps_v1_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_apps\_v1\_api module -========================================== - -.. automodule:: kubernetes.test.test_apps_v1_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_authentication_api.rst b/doc/source/kubernetes.test.test_authentication_api.rst deleted file mode 100644 index f5418b0cda..0000000000 --- a/doc/source/kubernetes.test.test_authentication_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_authentication\_api module -================================================ - -.. automodule:: kubernetes.test.test_authentication_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_authentication_v1_api.rst b/doc/source/kubernetes.test.test_authentication_v1_api.rst deleted file mode 100644 index 9683ac7e7d..0000000000 --- a/doc/source/kubernetes.test.test_authentication_v1_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_authentication\_v1\_api module -==================================================== - -.. automodule:: kubernetes.test.test_authentication_v1_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_authentication_v1_token_request.rst b/doc/source/kubernetes.test.test_authentication_v1_token_request.rst deleted file mode 100644 index b4d3164844..0000000000 --- a/doc/source/kubernetes.test.test_authentication_v1_token_request.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_authentication\_v1\_token\_request module -=============================================================== - -.. automodule:: kubernetes.test.test_authentication_v1_token_request - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_authentication_v1alpha1_api.rst b/doc/source/kubernetes.test.test_authentication_v1alpha1_api.rst deleted file mode 100644 index 9d0514acdd..0000000000 --- a/doc/source/kubernetes.test.test_authentication_v1alpha1_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_authentication\_v1alpha1\_api module -========================================================== - -.. automodule:: kubernetes.test.test_authentication_v1alpha1_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_authentication_v1beta1_api.rst b/doc/source/kubernetes.test.test_authentication_v1beta1_api.rst deleted file mode 100644 index 1e09160a41..0000000000 --- a/doc/source/kubernetes.test.test_authentication_v1beta1_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_authentication\_v1beta1\_api module -========================================================= - -.. automodule:: kubernetes.test.test_authentication_v1beta1_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_authorization_api.rst b/doc/source/kubernetes.test.test_authorization_api.rst deleted file mode 100644 index 4cab598483..0000000000 --- a/doc/source/kubernetes.test.test_authorization_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_authorization\_api module -=============================================== - -.. automodule:: kubernetes.test.test_authorization_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_authorization_v1_api.rst b/doc/source/kubernetes.test.test_authorization_v1_api.rst deleted file mode 100644 index 091a7e0ea8..0000000000 --- a/doc/source/kubernetes.test.test_authorization_v1_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_authorization\_v1\_api module -=================================================== - -.. automodule:: kubernetes.test.test_authorization_v1_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_autoscaling_api.rst b/doc/source/kubernetes.test.test_autoscaling_api.rst deleted file mode 100644 index e39b5305f1..0000000000 --- a/doc/source/kubernetes.test.test_autoscaling_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_autoscaling\_api module -============================================= - -.. automodule:: kubernetes.test.test_autoscaling_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_autoscaling_v1_api.rst b/doc/source/kubernetes.test.test_autoscaling_v1_api.rst deleted file mode 100644 index e1a7c1a1e1..0000000000 --- a/doc/source/kubernetes.test.test_autoscaling_v1_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_autoscaling\_v1\_api module -================================================= - -.. automodule:: kubernetes.test.test_autoscaling_v1_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_autoscaling_v2_api.rst b/doc/source/kubernetes.test.test_autoscaling_v2_api.rst deleted file mode 100644 index cb2dc7d74f..0000000000 --- a/doc/source/kubernetes.test.test_autoscaling_v2_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_autoscaling\_v2\_api module -================================================= - -.. automodule:: kubernetes.test.test_autoscaling_v2_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_batch_api.rst b/doc/source/kubernetes.test.test_batch_api.rst deleted file mode 100644 index a7f3a2970f..0000000000 --- a/doc/source/kubernetes.test.test_batch_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_batch\_api module -======================================= - -.. automodule:: kubernetes.test.test_batch_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_batch_v1_api.rst b/doc/source/kubernetes.test.test_batch_v1_api.rst deleted file mode 100644 index feb2df0f13..0000000000 --- a/doc/source/kubernetes.test.test_batch_v1_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_batch\_v1\_api module -=========================================== - -.. automodule:: kubernetes.test.test_batch_v1_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_certificates_api.rst b/doc/source/kubernetes.test.test_certificates_api.rst deleted file mode 100644 index bd871a0c13..0000000000 --- a/doc/source/kubernetes.test.test_certificates_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_certificates\_api module -============================================== - -.. automodule:: kubernetes.test.test_certificates_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_certificates_v1_api.rst b/doc/source/kubernetes.test.test_certificates_v1_api.rst deleted file mode 100644 index 89310320dd..0000000000 --- a/doc/source/kubernetes.test.test_certificates_v1_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_certificates\_v1\_api module -================================================== - -.. automodule:: kubernetes.test.test_certificates_v1_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_certificates_v1alpha1_api.rst b/doc/source/kubernetes.test.test_certificates_v1alpha1_api.rst deleted file mode 100644 index 03dca9fbc7..0000000000 --- a/doc/source/kubernetes.test.test_certificates_v1alpha1_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_certificates\_v1alpha1\_api module -======================================================== - -.. automodule:: kubernetes.test.test_certificates_v1alpha1_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_coordination_api.rst b/doc/source/kubernetes.test.test_coordination_api.rst deleted file mode 100644 index f500bf2886..0000000000 --- a/doc/source/kubernetes.test.test_coordination_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_coordination\_api module -============================================== - -.. automodule:: kubernetes.test.test_coordination_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_coordination_v1_api.rst b/doc/source/kubernetes.test.test_coordination_v1_api.rst deleted file mode 100644 index 10ac8bb305..0000000000 --- a/doc/source/kubernetes.test.test_coordination_v1_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_coordination\_v1\_api module -================================================== - -.. automodule:: kubernetes.test.test_coordination_v1_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_core_api.rst b/doc/source/kubernetes.test.test_core_api.rst deleted file mode 100644 index 47b6e231bb..0000000000 --- a/doc/source/kubernetes.test.test_core_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_core\_api module -====================================== - -.. automodule:: kubernetes.test.test_core_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_core_v1_api.rst b/doc/source/kubernetes.test.test_core_v1_api.rst deleted file mode 100644 index 2576a01eb5..0000000000 --- a/doc/source/kubernetes.test.test_core_v1_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_core\_v1\_api module -========================================== - -.. automodule:: kubernetes.test.test_core_v1_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_core_v1_endpoint_port.rst b/doc/source/kubernetes.test.test_core_v1_endpoint_port.rst deleted file mode 100644 index 3655e7b7e8..0000000000 --- a/doc/source/kubernetes.test.test_core_v1_endpoint_port.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_core\_v1\_endpoint\_port module -===================================================== - -.. automodule:: kubernetes.test.test_core_v1_endpoint_port - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_core_v1_event.rst b/doc/source/kubernetes.test.test_core_v1_event.rst deleted file mode 100644 index 9cb0c42d6c..0000000000 --- a/doc/source/kubernetes.test.test_core_v1_event.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_core\_v1\_event module -============================================ - -.. automodule:: kubernetes.test.test_core_v1_event - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_core_v1_event_list.rst b/doc/source/kubernetes.test.test_core_v1_event_list.rst deleted file mode 100644 index d9f5945722..0000000000 --- a/doc/source/kubernetes.test.test_core_v1_event_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_core\_v1\_event\_list module -================================================== - -.. automodule:: kubernetes.test.test_core_v1_event_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_core_v1_event_series.rst b/doc/source/kubernetes.test.test_core_v1_event_series.rst deleted file mode 100644 index 506a473967..0000000000 --- a/doc/source/kubernetes.test.test_core_v1_event_series.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_core\_v1\_event\_series module -==================================================== - -.. automodule:: kubernetes.test.test_core_v1_event_series - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_custom_objects_api.rst b/doc/source/kubernetes.test.test_custom_objects_api.rst deleted file mode 100644 index b78973416d..0000000000 --- a/doc/source/kubernetes.test.test_custom_objects_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_custom\_objects\_api module -================================================= - -.. automodule:: kubernetes.test.test_custom_objects_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_discovery_api.rst b/doc/source/kubernetes.test.test_discovery_api.rst deleted file mode 100644 index 84e4f91cf7..0000000000 --- a/doc/source/kubernetes.test.test_discovery_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_discovery\_api module -=========================================== - -.. automodule:: kubernetes.test.test_discovery_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_discovery_v1_api.rst b/doc/source/kubernetes.test.test_discovery_v1_api.rst deleted file mode 100644 index 53a08c7542..0000000000 --- a/doc/source/kubernetes.test.test_discovery_v1_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_discovery\_v1\_api module -=============================================== - -.. automodule:: kubernetes.test.test_discovery_v1_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_discovery_v1_endpoint_port.rst b/doc/source/kubernetes.test.test_discovery_v1_endpoint_port.rst deleted file mode 100644 index bb94890581..0000000000 --- a/doc/source/kubernetes.test.test_discovery_v1_endpoint_port.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_discovery\_v1\_endpoint\_port module -========================================================== - -.. automodule:: kubernetes.test.test_discovery_v1_endpoint_port - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_events_api.rst b/doc/source/kubernetes.test.test_events_api.rst deleted file mode 100644 index ffbe76ccaf..0000000000 --- a/doc/source/kubernetes.test.test_events_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_events\_api module -======================================== - -.. automodule:: kubernetes.test.test_events_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_events_v1_api.rst b/doc/source/kubernetes.test.test_events_v1_api.rst deleted file mode 100644 index 2126adb79f..0000000000 --- a/doc/source/kubernetes.test.test_events_v1_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_events\_v1\_api module -============================================ - -.. automodule:: kubernetes.test.test_events_v1_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_events_v1_event.rst b/doc/source/kubernetes.test.test_events_v1_event.rst deleted file mode 100644 index 874901dd9f..0000000000 --- a/doc/source/kubernetes.test.test_events_v1_event.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_events\_v1\_event module -============================================== - -.. automodule:: kubernetes.test.test_events_v1_event - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_events_v1_event_list.rst b/doc/source/kubernetes.test.test_events_v1_event_list.rst deleted file mode 100644 index 63756bf015..0000000000 --- a/doc/source/kubernetes.test.test_events_v1_event_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_events\_v1\_event\_list module -==================================================== - -.. automodule:: kubernetes.test.test_events_v1_event_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_events_v1_event_series.rst b/doc/source/kubernetes.test.test_events_v1_event_series.rst deleted file mode 100644 index 079bae244e..0000000000 --- a/doc/source/kubernetes.test.test_events_v1_event_series.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_events\_v1\_event\_series module -====================================================== - -.. automodule:: kubernetes.test.test_events_v1_event_series - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_flowcontrol_apiserver_api.rst b/doc/source/kubernetes.test.test_flowcontrol_apiserver_api.rst deleted file mode 100644 index 6d77f9ff18..0000000000 --- a/doc/source/kubernetes.test.test_flowcontrol_apiserver_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_flowcontrol\_apiserver\_api module -======================================================== - -.. automodule:: kubernetes.test.test_flowcontrol_apiserver_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_flowcontrol_apiserver_v1_api.rst b/doc/source/kubernetes.test.test_flowcontrol_apiserver_v1_api.rst deleted file mode 100644 index 0cd4fd9c68..0000000000 --- a/doc/source/kubernetes.test.test_flowcontrol_apiserver_v1_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_flowcontrol\_apiserver\_v1\_api module -============================================================ - -.. automodule:: kubernetes.test.test_flowcontrol_apiserver_v1_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_flowcontrol_apiserver_v1beta3_api.rst b/doc/source/kubernetes.test.test_flowcontrol_apiserver_v1beta3_api.rst deleted file mode 100644 index 771bc35773..0000000000 --- a/doc/source/kubernetes.test.test_flowcontrol_apiserver_v1beta3_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_flowcontrol\_apiserver\_v1beta3\_api module -================================================================= - -.. automodule:: kubernetes.test.test_flowcontrol_apiserver_v1beta3_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_flowcontrol_v1_subject.rst b/doc/source/kubernetes.test.test_flowcontrol_v1_subject.rst deleted file mode 100644 index 0689e15974..0000000000 --- a/doc/source/kubernetes.test.test_flowcontrol_v1_subject.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_flowcontrol\_v1\_subject module -===================================================== - -.. automodule:: kubernetes.test.test_flowcontrol_v1_subject - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_internal_apiserver_api.rst b/doc/source/kubernetes.test.test_internal_apiserver_api.rst deleted file mode 100644 index 583f37b812..0000000000 --- a/doc/source/kubernetes.test.test_internal_apiserver_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_internal\_apiserver\_api module -===================================================== - -.. automodule:: kubernetes.test.test_internal_apiserver_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_internal_apiserver_v1alpha1_api.rst b/doc/source/kubernetes.test.test_internal_apiserver_v1alpha1_api.rst deleted file mode 100644 index 8dedb9356d..0000000000 --- a/doc/source/kubernetes.test.test_internal_apiserver_v1alpha1_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_internal\_apiserver\_v1alpha1\_api module -=============================================================== - -.. automodule:: kubernetes.test.test_internal_apiserver_v1alpha1_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_logs_api.rst b/doc/source/kubernetes.test.test_logs_api.rst deleted file mode 100644 index d65a1259ba..0000000000 --- a/doc/source/kubernetes.test.test_logs_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_logs\_api module -====================================== - -.. automodule:: kubernetes.test.test_logs_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_networking_api.rst b/doc/source/kubernetes.test.test_networking_api.rst deleted file mode 100644 index 4a561bc00c..0000000000 --- a/doc/source/kubernetes.test.test_networking_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_networking\_api module -============================================ - -.. automodule:: kubernetes.test.test_networking_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_networking_v1_api.rst b/doc/source/kubernetes.test.test_networking_v1_api.rst deleted file mode 100644 index 5ccefd6587..0000000000 --- a/doc/source/kubernetes.test.test_networking_v1_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_networking\_v1\_api module -================================================ - -.. automodule:: kubernetes.test.test_networking_v1_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_networking_v1alpha1_api.rst b/doc/source/kubernetes.test.test_networking_v1alpha1_api.rst deleted file mode 100644 index 39c2864cc9..0000000000 --- a/doc/source/kubernetes.test.test_networking_v1alpha1_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_networking\_v1alpha1\_api module -====================================================== - -.. automodule:: kubernetes.test.test_networking_v1alpha1_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_node_api.rst b/doc/source/kubernetes.test.test_node_api.rst deleted file mode 100644 index 1b6b87392d..0000000000 --- a/doc/source/kubernetes.test.test_node_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_node\_api module -====================================== - -.. automodule:: kubernetes.test.test_node_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_node_v1_api.rst b/doc/source/kubernetes.test.test_node_v1_api.rst deleted file mode 100644 index 5a6cc8778f..0000000000 --- a/doc/source/kubernetes.test.test_node_v1_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_node\_v1\_api module -========================================== - -.. automodule:: kubernetes.test.test_node_v1_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_openid_api.rst b/doc/source/kubernetes.test.test_openid_api.rst deleted file mode 100644 index fb83a66618..0000000000 --- a/doc/source/kubernetes.test.test_openid_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_openid\_api module -======================================== - -.. automodule:: kubernetes.test.test_openid_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_policy_api.rst b/doc/source/kubernetes.test.test_policy_api.rst deleted file mode 100644 index 59512f49ed..0000000000 --- a/doc/source/kubernetes.test.test_policy_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_policy\_api module -======================================== - -.. automodule:: kubernetes.test.test_policy_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_policy_v1_api.rst b/doc/source/kubernetes.test.test_policy_v1_api.rst deleted file mode 100644 index fe0bc8d866..0000000000 --- a/doc/source/kubernetes.test.test_policy_v1_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_policy\_v1\_api module -============================================ - -.. automodule:: kubernetes.test.test_policy_v1_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_rbac_authorization_api.rst b/doc/source/kubernetes.test.test_rbac_authorization_api.rst deleted file mode 100644 index 5117ff6a83..0000000000 --- a/doc/source/kubernetes.test.test_rbac_authorization_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_rbac\_authorization\_api module -===================================================== - -.. automodule:: kubernetes.test.test_rbac_authorization_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_rbac_authorization_v1_api.rst b/doc/source/kubernetes.test.test_rbac_authorization_v1_api.rst deleted file mode 100644 index 1aabfdbc25..0000000000 --- a/doc/source/kubernetes.test.test_rbac_authorization_v1_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_rbac\_authorization\_v1\_api module -========================================================= - -.. automodule:: kubernetes.test.test_rbac_authorization_v1_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_rbac_v1_subject.rst b/doc/source/kubernetes.test.test_rbac_v1_subject.rst deleted file mode 100644 index 582c52e18b..0000000000 --- a/doc/source/kubernetes.test.test_rbac_v1_subject.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_rbac\_v1\_subject module -============================================== - -.. automodule:: kubernetes.test.test_rbac_v1_subject - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_resource_api.rst b/doc/source/kubernetes.test.test_resource_api.rst deleted file mode 100644 index fb88f576c2..0000000000 --- a/doc/source/kubernetes.test.test_resource_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_resource\_api module -========================================== - -.. automodule:: kubernetes.test.test_resource_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_resource_v1alpha2_api.rst b/doc/source/kubernetes.test.test_resource_v1alpha2_api.rst deleted file mode 100644 index 3be1192352..0000000000 --- a/doc/source/kubernetes.test.test_resource_v1alpha2_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_resource\_v1alpha2\_api module -==================================================== - -.. automodule:: kubernetes.test.test_resource_v1alpha2_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_scheduling_api.rst b/doc/source/kubernetes.test.test_scheduling_api.rst deleted file mode 100644 index e4e119664c..0000000000 --- a/doc/source/kubernetes.test.test_scheduling_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_scheduling\_api module -============================================ - -.. automodule:: kubernetes.test.test_scheduling_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_scheduling_v1_api.rst b/doc/source/kubernetes.test.test_scheduling_v1_api.rst deleted file mode 100644 index 9c76569b85..0000000000 --- a/doc/source/kubernetes.test.test_scheduling_v1_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_scheduling\_v1\_api module -================================================ - -.. automodule:: kubernetes.test.test_scheduling_v1_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_storage_api.rst b/doc/source/kubernetes.test.test_storage_api.rst deleted file mode 100644 index 64367c6360..0000000000 --- a/doc/source/kubernetes.test.test_storage_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_storage\_api module -========================================= - -.. automodule:: kubernetes.test.test_storage_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_storage_v1_api.rst b/doc/source/kubernetes.test.test_storage_v1_api.rst deleted file mode 100644 index 55ce72bd5b..0000000000 --- a/doc/source/kubernetes.test.test_storage_v1_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_storage\_v1\_api module -============================================= - -.. automodule:: kubernetes.test.test_storage_v1_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_storage_v1_token_request.rst b/doc/source/kubernetes.test.test_storage_v1_token_request.rst deleted file mode 100644 index b0b442ca9b..0000000000 --- a/doc/source/kubernetes.test.test_storage_v1_token_request.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_storage\_v1\_token\_request module -======================================================== - -.. automodule:: kubernetes.test.test_storage_v1_token_request - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_storage_v1alpha1_api.rst b/doc/source/kubernetes.test.test_storage_v1alpha1_api.rst deleted file mode 100644 index a2fe7a50ce..0000000000 --- a/doc/source/kubernetes.test.test_storage_v1alpha1_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_storage\_v1alpha1\_api module -=================================================== - -.. automodule:: kubernetes.test.test_storage_v1alpha1_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_storagemigration_api.rst b/doc/source/kubernetes.test.test_storagemigration_api.rst deleted file mode 100644 index 48cee25882..0000000000 --- a/doc/source/kubernetes.test.test_storagemigration_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_storagemigration\_api module -================================================== - -.. automodule:: kubernetes.test.test_storagemigration_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_storagemigration_v1alpha1_api.rst b/doc/source/kubernetes.test.test_storagemigration_v1alpha1_api.rst deleted file mode 100644 index 20650193e6..0000000000 --- a/doc/source/kubernetes.test.test_storagemigration_v1alpha1_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_storagemigration\_v1alpha1\_api module -============================================================ - -.. automodule:: kubernetes.test.test_storagemigration_v1alpha1_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_affinity.rst b/doc/source/kubernetes.test.test_v1_affinity.rst deleted file mode 100644 index 139f1ef1f8..0000000000 --- a/doc/source/kubernetes.test.test_v1_affinity.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_affinity module -========================================= - -.. automodule:: kubernetes.test.test_v1_affinity - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_aggregation_rule.rst b/doc/source/kubernetes.test.test_v1_aggregation_rule.rst deleted file mode 100644 index 4bb0683415..0000000000 --- a/doc/source/kubernetes.test.test_v1_aggregation_rule.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_aggregation\_rule module -================================================== - -.. automodule:: kubernetes.test.test_v1_aggregation_rule - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_api_group.rst b/doc/source/kubernetes.test.test_v1_api_group.rst deleted file mode 100644 index 17b476dea1..0000000000 --- a/doc/source/kubernetes.test.test_v1_api_group.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_api\_group module -=========================================== - -.. automodule:: kubernetes.test.test_v1_api_group - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_api_group_list.rst b/doc/source/kubernetes.test.test_v1_api_group_list.rst deleted file mode 100644 index bea949b68d..0000000000 --- a/doc/source/kubernetes.test.test_v1_api_group_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_api\_group\_list module -================================================= - -.. automodule:: kubernetes.test.test_v1_api_group_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_api_resource.rst b/doc/source/kubernetes.test.test_v1_api_resource.rst deleted file mode 100644 index 5ea2419751..0000000000 --- a/doc/source/kubernetes.test.test_v1_api_resource.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_api\_resource module -============================================== - -.. automodule:: kubernetes.test.test_v1_api_resource - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_api_resource_list.rst b/doc/source/kubernetes.test.test_v1_api_resource_list.rst deleted file mode 100644 index 4e74913c35..0000000000 --- a/doc/source/kubernetes.test.test_v1_api_resource_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_api\_resource\_list module -==================================================== - -.. automodule:: kubernetes.test.test_v1_api_resource_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_api_service.rst b/doc/source/kubernetes.test.test_v1_api_service.rst deleted file mode 100644 index 86ed6d094c..0000000000 --- a/doc/source/kubernetes.test.test_v1_api_service.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_api\_service module -============================================= - -.. automodule:: kubernetes.test.test_v1_api_service - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_api_service_condition.rst b/doc/source/kubernetes.test.test_v1_api_service_condition.rst deleted file mode 100644 index 4297b2a38a..0000000000 --- a/doc/source/kubernetes.test.test_v1_api_service_condition.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_api\_service\_condition module -======================================================== - -.. automodule:: kubernetes.test.test_v1_api_service_condition - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_api_service_list.rst b/doc/source/kubernetes.test.test_v1_api_service_list.rst deleted file mode 100644 index 321b7cddfb..0000000000 --- a/doc/source/kubernetes.test.test_v1_api_service_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_api\_service\_list module -=================================================== - -.. automodule:: kubernetes.test.test_v1_api_service_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_api_service_spec.rst b/doc/source/kubernetes.test.test_v1_api_service_spec.rst deleted file mode 100644 index 4782a4c387..0000000000 --- a/doc/source/kubernetes.test.test_v1_api_service_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_api\_service\_spec module -=================================================== - -.. automodule:: kubernetes.test.test_v1_api_service_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_api_service_status.rst b/doc/source/kubernetes.test.test_v1_api_service_status.rst deleted file mode 100644 index 556e54686d..0000000000 --- a/doc/source/kubernetes.test.test_v1_api_service_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_api\_service\_status module -===================================================== - -.. automodule:: kubernetes.test.test_v1_api_service_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_api_versions.rst b/doc/source/kubernetes.test.test_v1_api_versions.rst deleted file mode 100644 index cbd588cf75..0000000000 --- a/doc/source/kubernetes.test.test_v1_api_versions.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_api\_versions module -============================================== - -.. automodule:: kubernetes.test.test_v1_api_versions - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_app_armor_profile.rst b/doc/source/kubernetes.test.test_v1_app_armor_profile.rst deleted file mode 100644 index 171901aa0a..0000000000 --- a/doc/source/kubernetes.test.test_v1_app_armor_profile.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_app\_armor\_profile module -==================================================== - -.. automodule:: kubernetes.test.test_v1_app_armor_profile - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_attached_volume.rst b/doc/source/kubernetes.test.test_v1_attached_volume.rst deleted file mode 100644 index f174feb2ec..0000000000 --- a/doc/source/kubernetes.test.test_v1_attached_volume.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_attached\_volume module -================================================= - -.. automodule:: kubernetes.test.test_v1_attached_volume - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_audit_annotation.rst b/doc/source/kubernetes.test.test_v1_audit_annotation.rst deleted file mode 100644 index 5ea2d4f189..0000000000 --- a/doc/source/kubernetes.test.test_v1_audit_annotation.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_audit\_annotation module -================================================== - -.. automodule:: kubernetes.test.test_v1_audit_annotation - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_aws_elastic_block_store_volume_source.rst b/doc/source/kubernetes.test.test_v1_aws_elastic_block_store_volume_source.rst deleted file mode 100644 index 1a6aabe36f..0000000000 --- a/doc/source/kubernetes.test.test_v1_aws_elastic_block_store_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_aws\_elastic\_block\_store\_volume\_source module -=========================================================================== - -.. automodule:: kubernetes.test.test_v1_aws_elastic_block_store_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_azure_disk_volume_source.rst b/doc/source/kubernetes.test.test_v1_azure_disk_volume_source.rst deleted file mode 100644 index a1e0b344d1..0000000000 --- a/doc/source/kubernetes.test.test_v1_azure_disk_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_azure\_disk\_volume\_source module -============================================================ - -.. automodule:: kubernetes.test.test_v1_azure_disk_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_azure_file_persistent_volume_source.rst b/doc/source/kubernetes.test.test_v1_azure_file_persistent_volume_source.rst deleted file mode 100644 index b00a23e85b..0000000000 --- a/doc/source/kubernetes.test.test_v1_azure_file_persistent_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_azure\_file\_persistent\_volume\_source module -======================================================================== - -.. automodule:: kubernetes.test.test_v1_azure_file_persistent_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_azure_file_volume_source.rst b/doc/source/kubernetes.test.test_v1_azure_file_volume_source.rst deleted file mode 100644 index 8b27064499..0000000000 --- a/doc/source/kubernetes.test.test_v1_azure_file_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_azure\_file\_volume\_source module -============================================================ - -.. automodule:: kubernetes.test.test_v1_azure_file_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_binding.rst b/doc/source/kubernetes.test.test_v1_binding.rst deleted file mode 100644 index d76563efff..0000000000 --- a/doc/source/kubernetes.test.test_v1_binding.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_binding module -======================================== - -.. automodule:: kubernetes.test.test_v1_binding - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_bound_object_reference.rst b/doc/source/kubernetes.test.test_v1_bound_object_reference.rst deleted file mode 100644 index f1a47c78b5..0000000000 --- a/doc/source/kubernetes.test.test_v1_bound_object_reference.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_bound\_object\_reference module -========================================================= - -.. automodule:: kubernetes.test.test_v1_bound_object_reference - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_capabilities.rst b/doc/source/kubernetes.test.test_v1_capabilities.rst deleted file mode 100644 index f9898505e1..0000000000 --- a/doc/source/kubernetes.test.test_v1_capabilities.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_capabilities module -============================================= - -.. automodule:: kubernetes.test.test_v1_capabilities - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_ceph_fs_persistent_volume_source.rst b/doc/source/kubernetes.test.test_v1_ceph_fs_persistent_volume_source.rst deleted file mode 100644 index e691e468e8..0000000000 --- a/doc/source/kubernetes.test.test_v1_ceph_fs_persistent_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_ceph\_fs\_persistent\_volume\_source module -===================================================================== - -.. automodule:: kubernetes.test.test_v1_ceph_fs_persistent_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_ceph_fs_volume_source.rst b/doc/source/kubernetes.test.test_v1_ceph_fs_volume_source.rst deleted file mode 100644 index 5b548136f7..0000000000 --- a/doc/source/kubernetes.test.test_v1_ceph_fs_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_ceph\_fs\_volume\_source module -========================================================= - -.. automodule:: kubernetes.test.test_v1_ceph_fs_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_certificate_signing_request.rst b/doc/source/kubernetes.test.test_v1_certificate_signing_request.rst deleted file mode 100644 index 4f9c8326a0..0000000000 --- a/doc/source/kubernetes.test.test_v1_certificate_signing_request.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_certificate\_signing\_request module -============================================================== - -.. automodule:: kubernetes.test.test_v1_certificate_signing_request - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_certificate_signing_request_condition.rst b/doc/source/kubernetes.test.test_v1_certificate_signing_request_condition.rst deleted file mode 100644 index a28808cff5..0000000000 --- a/doc/source/kubernetes.test.test_v1_certificate_signing_request_condition.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_certificate\_signing\_request\_condition module -========================================================================= - -.. automodule:: kubernetes.test.test_v1_certificate_signing_request_condition - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_certificate_signing_request_list.rst b/doc/source/kubernetes.test.test_v1_certificate_signing_request_list.rst deleted file mode 100644 index 13cc2f8ae9..0000000000 --- a/doc/source/kubernetes.test.test_v1_certificate_signing_request_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_certificate\_signing\_request\_list module -==================================================================== - -.. automodule:: kubernetes.test.test_v1_certificate_signing_request_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_certificate_signing_request_spec.rst b/doc/source/kubernetes.test.test_v1_certificate_signing_request_spec.rst deleted file mode 100644 index 0b5979c5b9..0000000000 --- a/doc/source/kubernetes.test.test_v1_certificate_signing_request_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_certificate\_signing\_request\_spec module -==================================================================== - -.. automodule:: kubernetes.test.test_v1_certificate_signing_request_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_certificate_signing_request_status.rst b/doc/source/kubernetes.test.test_v1_certificate_signing_request_status.rst deleted file mode 100644 index e2326d3393..0000000000 --- a/doc/source/kubernetes.test.test_v1_certificate_signing_request_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_certificate\_signing\_request\_status module -====================================================================== - -.. automodule:: kubernetes.test.test_v1_certificate_signing_request_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_cinder_persistent_volume_source.rst b/doc/source/kubernetes.test.test_v1_cinder_persistent_volume_source.rst deleted file mode 100644 index 92e7d6cbbe..0000000000 --- a/doc/source/kubernetes.test.test_v1_cinder_persistent_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_cinder\_persistent\_volume\_source module -=================================================================== - -.. automodule:: kubernetes.test.test_v1_cinder_persistent_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_cinder_volume_source.rst b/doc/source/kubernetes.test.test_v1_cinder_volume_source.rst deleted file mode 100644 index edb8989a02..0000000000 --- a/doc/source/kubernetes.test.test_v1_cinder_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_cinder\_volume\_source module -======================================================= - -.. automodule:: kubernetes.test.test_v1_cinder_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_claim_source.rst b/doc/source/kubernetes.test.test_v1_claim_source.rst deleted file mode 100644 index d48e821ca3..0000000000 --- a/doc/source/kubernetes.test.test_v1_claim_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_claim\_source module -============================================== - -.. automodule:: kubernetes.test.test_v1_claim_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_client_ip_config.rst b/doc/source/kubernetes.test.test_v1_client_ip_config.rst deleted file mode 100644 index 3bbbe4f3c7..0000000000 --- a/doc/source/kubernetes.test.test_v1_client_ip_config.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_client\_ip\_config module -=================================================== - -.. automodule:: kubernetes.test.test_v1_client_ip_config - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_cluster_role.rst b/doc/source/kubernetes.test.test_v1_cluster_role.rst deleted file mode 100644 index 05d9f7c11e..0000000000 --- a/doc/source/kubernetes.test.test_v1_cluster_role.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_cluster\_role module -============================================== - -.. automodule:: kubernetes.test.test_v1_cluster_role - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_cluster_role_binding.rst b/doc/source/kubernetes.test.test_v1_cluster_role_binding.rst deleted file mode 100644 index 2787bb42be..0000000000 --- a/doc/source/kubernetes.test.test_v1_cluster_role_binding.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_cluster\_role\_binding module -======================================================= - -.. automodule:: kubernetes.test.test_v1_cluster_role_binding - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_cluster_role_binding_list.rst b/doc/source/kubernetes.test.test_v1_cluster_role_binding_list.rst deleted file mode 100644 index 311f51194a..0000000000 --- a/doc/source/kubernetes.test.test_v1_cluster_role_binding_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_cluster\_role\_binding\_list module -============================================================= - -.. automodule:: kubernetes.test.test_v1_cluster_role_binding_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_cluster_role_list.rst b/doc/source/kubernetes.test.test_v1_cluster_role_list.rst deleted file mode 100644 index 5a012dd1b6..0000000000 --- a/doc/source/kubernetes.test.test_v1_cluster_role_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_cluster\_role\_list module -==================================================== - -.. automodule:: kubernetes.test.test_v1_cluster_role_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_cluster_trust_bundle_projection.rst b/doc/source/kubernetes.test.test_v1_cluster_trust_bundle_projection.rst deleted file mode 100644 index 7ea7daacbc..0000000000 --- a/doc/source/kubernetes.test.test_v1_cluster_trust_bundle_projection.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_cluster\_trust\_bundle\_projection module -=================================================================== - -.. automodule:: kubernetes.test.test_v1_cluster_trust_bundle_projection - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_component_condition.rst b/doc/source/kubernetes.test.test_v1_component_condition.rst deleted file mode 100644 index d0dab40de9..0000000000 --- a/doc/source/kubernetes.test.test_v1_component_condition.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_component\_condition module -===================================================== - -.. automodule:: kubernetes.test.test_v1_component_condition - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_component_status.rst b/doc/source/kubernetes.test.test_v1_component_status.rst deleted file mode 100644 index 7eaf4ac23a..0000000000 --- a/doc/source/kubernetes.test.test_v1_component_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_component\_status module -================================================== - -.. automodule:: kubernetes.test.test_v1_component_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_component_status_list.rst b/doc/source/kubernetes.test.test_v1_component_status_list.rst deleted file mode 100644 index d081c42237..0000000000 --- a/doc/source/kubernetes.test.test_v1_component_status_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_component\_status\_list module -======================================================== - -.. automodule:: kubernetes.test.test_v1_component_status_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_condition.rst b/doc/source/kubernetes.test.test_v1_condition.rst deleted file mode 100644 index be3d9956fc..0000000000 --- a/doc/source/kubernetes.test.test_v1_condition.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_condition module -========================================== - -.. automodule:: kubernetes.test.test_v1_condition - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_config_map.rst b/doc/source/kubernetes.test.test_v1_config_map.rst deleted file mode 100644 index 5daa0d88d1..0000000000 --- a/doc/source/kubernetes.test.test_v1_config_map.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_config\_map module -============================================ - -.. automodule:: kubernetes.test.test_v1_config_map - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_config_map_env_source.rst b/doc/source/kubernetes.test.test_v1_config_map_env_source.rst deleted file mode 100644 index f9cd6d3766..0000000000 --- a/doc/source/kubernetes.test.test_v1_config_map_env_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_config\_map\_env\_source module -========================================================= - -.. automodule:: kubernetes.test.test_v1_config_map_env_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_config_map_key_selector.rst b/doc/source/kubernetes.test.test_v1_config_map_key_selector.rst deleted file mode 100644 index 4e2c28efe3..0000000000 --- a/doc/source/kubernetes.test.test_v1_config_map_key_selector.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_config\_map\_key\_selector module -=========================================================== - -.. automodule:: kubernetes.test.test_v1_config_map_key_selector - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_config_map_list.rst b/doc/source/kubernetes.test.test_v1_config_map_list.rst deleted file mode 100644 index ed84181335..0000000000 --- a/doc/source/kubernetes.test.test_v1_config_map_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_config\_map\_list module -================================================== - -.. automodule:: kubernetes.test.test_v1_config_map_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_config_map_node_config_source.rst b/doc/source/kubernetes.test.test_v1_config_map_node_config_source.rst deleted file mode 100644 index ba7f19a879..0000000000 --- a/doc/source/kubernetes.test.test_v1_config_map_node_config_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_config\_map\_node\_config\_source module -================================================================== - -.. automodule:: kubernetes.test.test_v1_config_map_node_config_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_config_map_projection.rst b/doc/source/kubernetes.test.test_v1_config_map_projection.rst deleted file mode 100644 index 4046f98074..0000000000 --- a/doc/source/kubernetes.test.test_v1_config_map_projection.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_config\_map\_projection module -======================================================== - -.. automodule:: kubernetes.test.test_v1_config_map_projection - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_config_map_volume_source.rst b/doc/source/kubernetes.test.test_v1_config_map_volume_source.rst deleted file mode 100644 index 7aa3cbc207..0000000000 --- a/doc/source/kubernetes.test.test_v1_config_map_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_config\_map\_volume\_source module -============================================================ - -.. automodule:: kubernetes.test.test_v1_config_map_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_container.rst b/doc/source/kubernetes.test.test_v1_container.rst deleted file mode 100644 index 33ad23e35f..0000000000 --- a/doc/source/kubernetes.test.test_v1_container.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_container module -========================================== - -.. automodule:: kubernetes.test.test_v1_container - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_container_image.rst b/doc/source/kubernetes.test.test_v1_container_image.rst deleted file mode 100644 index b4fabb228a..0000000000 --- a/doc/source/kubernetes.test.test_v1_container_image.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_container\_image module -================================================= - -.. automodule:: kubernetes.test.test_v1_container_image - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_container_port.rst b/doc/source/kubernetes.test.test_v1_container_port.rst deleted file mode 100644 index c538a3d74e..0000000000 --- a/doc/source/kubernetes.test.test_v1_container_port.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_container\_port module -================================================ - -.. automodule:: kubernetes.test.test_v1_container_port - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_container_resize_policy.rst b/doc/source/kubernetes.test.test_v1_container_resize_policy.rst deleted file mode 100644 index fcca62a565..0000000000 --- a/doc/source/kubernetes.test.test_v1_container_resize_policy.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_container\_resize\_policy module -========================================================== - -.. automodule:: kubernetes.test.test_v1_container_resize_policy - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_container_state.rst b/doc/source/kubernetes.test.test_v1_container_state.rst deleted file mode 100644 index 9be7d2ddd1..0000000000 --- a/doc/source/kubernetes.test.test_v1_container_state.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_container\_state module -================================================= - -.. automodule:: kubernetes.test.test_v1_container_state - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_container_state_running.rst b/doc/source/kubernetes.test.test_v1_container_state_running.rst deleted file mode 100644 index 0b8b8dc09a..0000000000 --- a/doc/source/kubernetes.test.test_v1_container_state_running.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_container\_state\_running module -========================================================== - -.. automodule:: kubernetes.test.test_v1_container_state_running - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_container_state_terminated.rst b/doc/source/kubernetes.test.test_v1_container_state_terminated.rst deleted file mode 100644 index ab642924e9..0000000000 --- a/doc/source/kubernetes.test.test_v1_container_state_terminated.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_container\_state\_terminated module -============================================================= - -.. automodule:: kubernetes.test.test_v1_container_state_terminated - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_container_state_waiting.rst b/doc/source/kubernetes.test.test_v1_container_state_waiting.rst deleted file mode 100644 index fa2ae13055..0000000000 --- a/doc/source/kubernetes.test.test_v1_container_state_waiting.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_container\_state\_waiting module -========================================================== - -.. automodule:: kubernetes.test.test_v1_container_state_waiting - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_container_status.rst b/doc/source/kubernetes.test.test_v1_container_status.rst deleted file mode 100644 index c3e9576aa0..0000000000 --- a/doc/source/kubernetes.test.test_v1_container_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_container\_status module -================================================== - -.. automodule:: kubernetes.test.test_v1_container_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_controller_revision.rst b/doc/source/kubernetes.test.test_v1_controller_revision.rst deleted file mode 100644 index 76b8f9958c..0000000000 --- a/doc/source/kubernetes.test.test_v1_controller_revision.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_controller\_revision module -===================================================== - -.. automodule:: kubernetes.test.test_v1_controller_revision - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_controller_revision_list.rst b/doc/source/kubernetes.test.test_v1_controller_revision_list.rst deleted file mode 100644 index 2d4c8b34e0..0000000000 --- a/doc/source/kubernetes.test.test_v1_controller_revision_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_controller\_revision\_list module -=========================================================== - -.. automodule:: kubernetes.test.test_v1_controller_revision_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_cron_job.rst b/doc/source/kubernetes.test.test_v1_cron_job.rst deleted file mode 100644 index aac0f1d694..0000000000 --- a/doc/source/kubernetes.test.test_v1_cron_job.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_cron\_job module -========================================== - -.. automodule:: kubernetes.test.test_v1_cron_job - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_cron_job_list.rst b/doc/source/kubernetes.test.test_v1_cron_job_list.rst deleted file mode 100644 index de528868bb..0000000000 --- a/doc/source/kubernetes.test.test_v1_cron_job_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_cron\_job\_list module -================================================ - -.. automodule:: kubernetes.test.test_v1_cron_job_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_cron_job_spec.rst b/doc/source/kubernetes.test.test_v1_cron_job_spec.rst deleted file mode 100644 index da78a30f67..0000000000 --- a/doc/source/kubernetes.test.test_v1_cron_job_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_cron\_job\_spec module -================================================ - -.. automodule:: kubernetes.test.test_v1_cron_job_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_cron_job_status.rst b/doc/source/kubernetes.test.test_v1_cron_job_status.rst deleted file mode 100644 index 8b88c5f0aa..0000000000 --- a/doc/source/kubernetes.test.test_v1_cron_job_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_cron\_job\_status module -================================================== - -.. automodule:: kubernetes.test.test_v1_cron_job_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_cross_version_object_reference.rst b/doc/source/kubernetes.test.test_v1_cross_version_object_reference.rst deleted file mode 100644 index 014d1571d9..0000000000 --- a/doc/source/kubernetes.test.test_v1_cross_version_object_reference.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_cross\_version\_object\_reference module -================================================================== - -.. automodule:: kubernetes.test.test_v1_cross_version_object_reference - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_csi_driver.rst b/doc/source/kubernetes.test.test_v1_csi_driver.rst deleted file mode 100644 index 01089ed1f2..0000000000 --- a/doc/source/kubernetes.test.test_v1_csi_driver.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_csi\_driver module -============================================ - -.. automodule:: kubernetes.test.test_v1_csi_driver - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_csi_driver_list.rst b/doc/source/kubernetes.test.test_v1_csi_driver_list.rst deleted file mode 100644 index a4549d3d43..0000000000 --- a/doc/source/kubernetes.test.test_v1_csi_driver_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_csi\_driver\_list module -================================================== - -.. automodule:: kubernetes.test.test_v1_csi_driver_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_csi_driver_spec.rst b/doc/source/kubernetes.test.test_v1_csi_driver_spec.rst deleted file mode 100644 index 4babd16cb5..0000000000 --- a/doc/source/kubernetes.test.test_v1_csi_driver_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_csi\_driver\_spec module -================================================== - -.. automodule:: kubernetes.test.test_v1_csi_driver_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_csi_node.rst b/doc/source/kubernetes.test.test_v1_csi_node.rst deleted file mode 100644 index 6e83ad2a06..0000000000 --- a/doc/source/kubernetes.test.test_v1_csi_node.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_csi\_node module -========================================== - -.. automodule:: kubernetes.test.test_v1_csi_node - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_csi_node_driver.rst b/doc/source/kubernetes.test.test_v1_csi_node_driver.rst deleted file mode 100644 index 3438241902..0000000000 --- a/doc/source/kubernetes.test.test_v1_csi_node_driver.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_csi\_node\_driver module -================================================== - -.. automodule:: kubernetes.test.test_v1_csi_node_driver - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_csi_node_list.rst b/doc/source/kubernetes.test.test_v1_csi_node_list.rst deleted file mode 100644 index 8eaf71ccca..0000000000 --- a/doc/source/kubernetes.test.test_v1_csi_node_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_csi\_node\_list module -================================================ - -.. automodule:: kubernetes.test.test_v1_csi_node_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_csi_node_spec.rst b/doc/source/kubernetes.test.test_v1_csi_node_spec.rst deleted file mode 100644 index ea2ff920c2..0000000000 --- a/doc/source/kubernetes.test.test_v1_csi_node_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_csi\_node\_spec module -================================================ - -.. automodule:: kubernetes.test.test_v1_csi_node_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_csi_persistent_volume_source.rst b/doc/source/kubernetes.test.test_v1_csi_persistent_volume_source.rst deleted file mode 100644 index a5dc54d1cf..0000000000 --- a/doc/source/kubernetes.test.test_v1_csi_persistent_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_csi\_persistent\_volume\_source module -================================================================ - -.. automodule:: kubernetes.test.test_v1_csi_persistent_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_csi_storage_capacity.rst b/doc/source/kubernetes.test.test_v1_csi_storage_capacity.rst deleted file mode 100644 index 9df603e9fd..0000000000 --- a/doc/source/kubernetes.test.test_v1_csi_storage_capacity.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_csi\_storage\_capacity module -======================================================= - -.. automodule:: kubernetes.test.test_v1_csi_storage_capacity - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_csi_storage_capacity_list.rst b/doc/source/kubernetes.test.test_v1_csi_storage_capacity_list.rst deleted file mode 100644 index 41f6b100de..0000000000 --- a/doc/source/kubernetes.test.test_v1_csi_storage_capacity_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_csi\_storage\_capacity\_list module -============================================================= - -.. automodule:: kubernetes.test.test_v1_csi_storage_capacity_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_csi_volume_source.rst b/doc/source/kubernetes.test.test_v1_csi_volume_source.rst deleted file mode 100644 index 62c51a000a..0000000000 --- a/doc/source/kubernetes.test.test_v1_csi_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_csi\_volume\_source module -==================================================== - -.. automodule:: kubernetes.test.test_v1_csi_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_custom_resource_column_definition.rst b/doc/source/kubernetes.test.test_v1_custom_resource_column_definition.rst deleted file mode 100644 index 5c05d822c9..0000000000 --- a/doc/source/kubernetes.test.test_v1_custom_resource_column_definition.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_custom\_resource\_column\_definition module -===================================================================== - -.. automodule:: kubernetes.test.test_v1_custom_resource_column_definition - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_custom_resource_conversion.rst b/doc/source/kubernetes.test.test_v1_custom_resource_conversion.rst deleted file mode 100644 index d7ee6a89ee..0000000000 --- a/doc/source/kubernetes.test.test_v1_custom_resource_conversion.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_custom\_resource\_conversion module -============================================================= - -.. automodule:: kubernetes.test.test_v1_custom_resource_conversion - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_custom_resource_definition.rst b/doc/source/kubernetes.test.test_v1_custom_resource_definition.rst deleted file mode 100644 index 8ee8e9ddbd..0000000000 --- a/doc/source/kubernetes.test.test_v1_custom_resource_definition.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_custom\_resource\_definition module -============================================================= - -.. automodule:: kubernetes.test.test_v1_custom_resource_definition - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_custom_resource_definition_condition.rst b/doc/source/kubernetes.test.test_v1_custom_resource_definition_condition.rst deleted file mode 100644 index 1f8a377f67..0000000000 --- a/doc/source/kubernetes.test.test_v1_custom_resource_definition_condition.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_custom\_resource\_definition\_condition module -======================================================================== - -.. automodule:: kubernetes.test.test_v1_custom_resource_definition_condition - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_custom_resource_definition_list.rst b/doc/source/kubernetes.test.test_v1_custom_resource_definition_list.rst deleted file mode 100644 index 02807bed05..0000000000 --- a/doc/source/kubernetes.test.test_v1_custom_resource_definition_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_custom\_resource\_definition\_list module -=================================================================== - -.. automodule:: kubernetes.test.test_v1_custom_resource_definition_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_custom_resource_definition_names.rst b/doc/source/kubernetes.test.test_v1_custom_resource_definition_names.rst deleted file mode 100644 index 268f4fb7a9..0000000000 --- a/doc/source/kubernetes.test.test_v1_custom_resource_definition_names.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_custom\_resource\_definition\_names module -==================================================================== - -.. automodule:: kubernetes.test.test_v1_custom_resource_definition_names - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_custom_resource_definition_spec.rst b/doc/source/kubernetes.test.test_v1_custom_resource_definition_spec.rst deleted file mode 100644 index a081105473..0000000000 --- a/doc/source/kubernetes.test.test_v1_custom_resource_definition_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_custom\_resource\_definition\_spec module -=================================================================== - -.. automodule:: kubernetes.test.test_v1_custom_resource_definition_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_custom_resource_definition_status.rst b/doc/source/kubernetes.test.test_v1_custom_resource_definition_status.rst deleted file mode 100644 index 9b3cbfec47..0000000000 --- a/doc/source/kubernetes.test.test_v1_custom_resource_definition_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_custom\_resource\_definition\_status module -===================================================================== - -.. automodule:: kubernetes.test.test_v1_custom_resource_definition_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_custom_resource_definition_version.rst b/doc/source/kubernetes.test.test_v1_custom_resource_definition_version.rst deleted file mode 100644 index d7a7910d08..0000000000 --- a/doc/source/kubernetes.test.test_v1_custom_resource_definition_version.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_custom\_resource\_definition\_version module -====================================================================== - -.. automodule:: kubernetes.test.test_v1_custom_resource_definition_version - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_custom_resource_subresource_scale.rst b/doc/source/kubernetes.test.test_v1_custom_resource_subresource_scale.rst deleted file mode 100644 index c8d57c3cc3..0000000000 --- a/doc/source/kubernetes.test.test_v1_custom_resource_subresource_scale.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_custom\_resource\_subresource\_scale module -===================================================================== - -.. automodule:: kubernetes.test.test_v1_custom_resource_subresource_scale - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_custom_resource_subresources.rst b/doc/source/kubernetes.test.test_v1_custom_resource_subresources.rst deleted file mode 100644 index f807a1ebe9..0000000000 --- a/doc/source/kubernetes.test.test_v1_custom_resource_subresources.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_custom\_resource\_subresources module -=============================================================== - -.. automodule:: kubernetes.test.test_v1_custom_resource_subresources - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_custom_resource_validation.rst b/doc/source/kubernetes.test.test_v1_custom_resource_validation.rst deleted file mode 100644 index 8d4b229afa..0000000000 --- a/doc/source/kubernetes.test.test_v1_custom_resource_validation.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_custom\_resource\_validation module -============================================================= - -.. automodule:: kubernetes.test.test_v1_custom_resource_validation - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_daemon_endpoint.rst b/doc/source/kubernetes.test.test_v1_daemon_endpoint.rst deleted file mode 100644 index fa621e2d81..0000000000 --- a/doc/source/kubernetes.test.test_v1_daemon_endpoint.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_daemon\_endpoint module -================================================= - -.. automodule:: kubernetes.test.test_v1_daemon_endpoint - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_daemon_set.rst b/doc/source/kubernetes.test.test_v1_daemon_set.rst deleted file mode 100644 index c0e087f1e2..0000000000 --- a/doc/source/kubernetes.test.test_v1_daemon_set.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_daemon\_set module -============================================ - -.. automodule:: kubernetes.test.test_v1_daemon_set - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_daemon_set_condition.rst b/doc/source/kubernetes.test.test_v1_daemon_set_condition.rst deleted file mode 100644 index 3537ba86a6..0000000000 --- a/doc/source/kubernetes.test.test_v1_daemon_set_condition.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_daemon\_set\_condition module -======================================================= - -.. automodule:: kubernetes.test.test_v1_daemon_set_condition - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_daemon_set_list.rst b/doc/source/kubernetes.test.test_v1_daemon_set_list.rst deleted file mode 100644 index be2415fc93..0000000000 --- a/doc/source/kubernetes.test.test_v1_daemon_set_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_daemon\_set\_list module -================================================== - -.. automodule:: kubernetes.test.test_v1_daemon_set_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_daemon_set_spec.rst b/doc/source/kubernetes.test.test_v1_daemon_set_spec.rst deleted file mode 100644 index acddd8ad28..0000000000 --- a/doc/source/kubernetes.test.test_v1_daemon_set_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_daemon\_set\_spec module -================================================== - -.. automodule:: kubernetes.test.test_v1_daemon_set_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_daemon_set_status.rst b/doc/source/kubernetes.test.test_v1_daemon_set_status.rst deleted file mode 100644 index 3cc9959d5d..0000000000 --- a/doc/source/kubernetes.test.test_v1_daemon_set_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_daemon\_set\_status module -==================================================== - -.. automodule:: kubernetes.test.test_v1_daemon_set_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_daemon_set_update_strategy.rst b/doc/source/kubernetes.test.test_v1_daemon_set_update_strategy.rst deleted file mode 100644 index f18ee72133..0000000000 --- a/doc/source/kubernetes.test.test_v1_daemon_set_update_strategy.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_daemon\_set\_update\_strategy module -============================================================== - -.. automodule:: kubernetes.test.test_v1_daemon_set_update_strategy - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_delete_options.rst b/doc/source/kubernetes.test.test_v1_delete_options.rst deleted file mode 100644 index a3e28ffd18..0000000000 --- a/doc/source/kubernetes.test.test_v1_delete_options.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_delete\_options module -================================================ - -.. automodule:: kubernetes.test.test_v1_delete_options - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_deployment.rst b/doc/source/kubernetes.test.test_v1_deployment.rst deleted file mode 100644 index 05bbb2ea82..0000000000 --- a/doc/source/kubernetes.test.test_v1_deployment.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_deployment module -=========================================== - -.. automodule:: kubernetes.test.test_v1_deployment - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_deployment_condition.rst b/doc/source/kubernetes.test.test_v1_deployment_condition.rst deleted file mode 100644 index 0f1d5e8ce6..0000000000 --- a/doc/source/kubernetes.test.test_v1_deployment_condition.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_deployment\_condition module -====================================================== - -.. automodule:: kubernetes.test.test_v1_deployment_condition - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_deployment_list.rst b/doc/source/kubernetes.test.test_v1_deployment_list.rst deleted file mode 100644 index de104b649c..0000000000 --- a/doc/source/kubernetes.test.test_v1_deployment_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_deployment\_list module -================================================= - -.. automodule:: kubernetes.test.test_v1_deployment_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_deployment_spec.rst b/doc/source/kubernetes.test.test_v1_deployment_spec.rst deleted file mode 100644 index f487dae2d1..0000000000 --- a/doc/source/kubernetes.test.test_v1_deployment_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_deployment\_spec module -================================================= - -.. automodule:: kubernetes.test.test_v1_deployment_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_deployment_status.rst b/doc/source/kubernetes.test.test_v1_deployment_status.rst deleted file mode 100644 index 1bc60a7be7..0000000000 --- a/doc/source/kubernetes.test.test_v1_deployment_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_deployment\_status module -=================================================== - -.. automodule:: kubernetes.test.test_v1_deployment_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_deployment_strategy.rst b/doc/source/kubernetes.test.test_v1_deployment_strategy.rst deleted file mode 100644 index 1d5fa270fe..0000000000 --- a/doc/source/kubernetes.test.test_v1_deployment_strategy.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_deployment\_strategy module -===================================================== - -.. automodule:: kubernetes.test.test_v1_deployment_strategy - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_downward_api_projection.rst b/doc/source/kubernetes.test.test_v1_downward_api_projection.rst deleted file mode 100644 index acbab43726..0000000000 --- a/doc/source/kubernetes.test.test_v1_downward_api_projection.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_downward\_api\_projection module -========================================================== - -.. automodule:: kubernetes.test.test_v1_downward_api_projection - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_downward_api_volume_file.rst b/doc/source/kubernetes.test.test_v1_downward_api_volume_file.rst deleted file mode 100644 index d05da52aef..0000000000 --- a/doc/source/kubernetes.test.test_v1_downward_api_volume_file.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_downward\_api\_volume\_file module -============================================================ - -.. automodule:: kubernetes.test.test_v1_downward_api_volume_file - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_downward_api_volume_source.rst b/doc/source/kubernetes.test.test_v1_downward_api_volume_source.rst deleted file mode 100644 index c65ca701f4..0000000000 --- a/doc/source/kubernetes.test.test_v1_downward_api_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_downward\_api\_volume\_source module -============================================================== - -.. automodule:: kubernetes.test.test_v1_downward_api_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_empty_dir_volume_source.rst b/doc/source/kubernetes.test.test_v1_empty_dir_volume_source.rst deleted file mode 100644 index afa7e64166..0000000000 --- a/doc/source/kubernetes.test.test_v1_empty_dir_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_empty\_dir\_volume\_source module -=========================================================== - -.. automodule:: kubernetes.test.test_v1_empty_dir_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_endpoint.rst b/doc/source/kubernetes.test.test_v1_endpoint.rst deleted file mode 100644 index 31a243f3cb..0000000000 --- a/doc/source/kubernetes.test.test_v1_endpoint.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_endpoint module -========================================= - -.. automodule:: kubernetes.test.test_v1_endpoint - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_endpoint_address.rst b/doc/source/kubernetes.test.test_v1_endpoint_address.rst deleted file mode 100644 index ec1abaa751..0000000000 --- a/doc/source/kubernetes.test.test_v1_endpoint_address.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_endpoint\_address module -================================================== - -.. automodule:: kubernetes.test.test_v1_endpoint_address - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_endpoint_conditions.rst b/doc/source/kubernetes.test.test_v1_endpoint_conditions.rst deleted file mode 100644 index 9f450f1e73..0000000000 --- a/doc/source/kubernetes.test.test_v1_endpoint_conditions.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_endpoint\_conditions module -===================================================== - -.. automodule:: kubernetes.test.test_v1_endpoint_conditions - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_endpoint_hints.rst b/doc/source/kubernetes.test.test_v1_endpoint_hints.rst deleted file mode 100644 index 664a15a47b..0000000000 --- a/doc/source/kubernetes.test.test_v1_endpoint_hints.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_endpoint\_hints module -================================================ - -.. automodule:: kubernetes.test.test_v1_endpoint_hints - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_endpoint_slice.rst b/doc/source/kubernetes.test.test_v1_endpoint_slice.rst deleted file mode 100644 index 8acbc2db66..0000000000 --- a/doc/source/kubernetes.test.test_v1_endpoint_slice.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_endpoint\_slice module -================================================ - -.. automodule:: kubernetes.test.test_v1_endpoint_slice - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_endpoint_slice_list.rst b/doc/source/kubernetes.test.test_v1_endpoint_slice_list.rst deleted file mode 100644 index 1f9e8e5543..0000000000 --- a/doc/source/kubernetes.test.test_v1_endpoint_slice_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_endpoint\_slice\_list module -====================================================== - -.. automodule:: kubernetes.test.test_v1_endpoint_slice_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_endpoint_subset.rst b/doc/source/kubernetes.test.test_v1_endpoint_subset.rst deleted file mode 100644 index 70df054d3a..0000000000 --- a/doc/source/kubernetes.test.test_v1_endpoint_subset.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_endpoint\_subset module -================================================= - -.. automodule:: kubernetes.test.test_v1_endpoint_subset - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_endpoints.rst b/doc/source/kubernetes.test.test_v1_endpoints.rst deleted file mode 100644 index be2ae755e4..0000000000 --- a/doc/source/kubernetes.test.test_v1_endpoints.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_endpoints module -========================================== - -.. automodule:: kubernetes.test.test_v1_endpoints - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_endpoints_list.rst b/doc/source/kubernetes.test.test_v1_endpoints_list.rst deleted file mode 100644 index 7239990ecc..0000000000 --- a/doc/source/kubernetes.test.test_v1_endpoints_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_endpoints\_list module -================================================ - -.. automodule:: kubernetes.test.test_v1_endpoints_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_env_from_source.rst b/doc/source/kubernetes.test.test_v1_env_from_source.rst deleted file mode 100644 index 3e284d37e0..0000000000 --- a/doc/source/kubernetes.test.test_v1_env_from_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_env\_from\_source module -================================================== - -.. automodule:: kubernetes.test.test_v1_env_from_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_env_var.rst b/doc/source/kubernetes.test.test_v1_env_var.rst deleted file mode 100644 index d2ca78d7f7..0000000000 --- a/doc/source/kubernetes.test.test_v1_env_var.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_env\_var module -========================================= - -.. automodule:: kubernetes.test.test_v1_env_var - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_env_var_source.rst b/doc/source/kubernetes.test.test_v1_env_var_source.rst deleted file mode 100644 index eb446d9db5..0000000000 --- a/doc/source/kubernetes.test.test_v1_env_var_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_env\_var\_source module -================================================= - -.. automodule:: kubernetes.test.test_v1_env_var_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_ephemeral_container.rst b/doc/source/kubernetes.test.test_v1_ephemeral_container.rst deleted file mode 100644 index 2011982fcc..0000000000 --- a/doc/source/kubernetes.test.test_v1_ephemeral_container.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_ephemeral\_container module -===================================================== - -.. automodule:: kubernetes.test.test_v1_ephemeral_container - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_ephemeral_volume_source.rst b/doc/source/kubernetes.test.test_v1_ephemeral_volume_source.rst deleted file mode 100644 index 923dc9a5a1..0000000000 --- a/doc/source/kubernetes.test.test_v1_ephemeral_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_ephemeral\_volume\_source module -========================================================== - -.. automodule:: kubernetes.test.test_v1_ephemeral_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_event_source.rst b/doc/source/kubernetes.test.test_v1_event_source.rst deleted file mode 100644 index 3288fd4a87..0000000000 --- a/doc/source/kubernetes.test.test_v1_event_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_event\_source module -============================================== - -.. automodule:: kubernetes.test.test_v1_event_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_eviction.rst b/doc/source/kubernetes.test.test_v1_eviction.rst deleted file mode 100644 index 71ca27e7b0..0000000000 --- a/doc/source/kubernetes.test.test_v1_eviction.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_eviction module -========================================= - -.. automodule:: kubernetes.test.test_v1_eviction - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_exec_action.rst b/doc/source/kubernetes.test.test_v1_exec_action.rst deleted file mode 100644 index 330c106e7e..0000000000 --- a/doc/source/kubernetes.test.test_v1_exec_action.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_exec\_action module -============================================= - -.. automodule:: kubernetes.test.test_v1_exec_action - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_exempt_priority_level_configuration.rst b/doc/source/kubernetes.test.test_v1_exempt_priority_level_configuration.rst deleted file mode 100644 index f6bae010a0..0000000000 --- a/doc/source/kubernetes.test.test_v1_exempt_priority_level_configuration.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_exempt\_priority\_level\_configuration module -======================================================================= - -.. automodule:: kubernetes.test.test_v1_exempt_priority_level_configuration - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_expression_warning.rst b/doc/source/kubernetes.test.test_v1_expression_warning.rst deleted file mode 100644 index a2fec7cc3d..0000000000 --- a/doc/source/kubernetes.test.test_v1_expression_warning.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_expression\_warning module -==================================================== - -.. automodule:: kubernetes.test.test_v1_expression_warning - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_external_documentation.rst b/doc/source/kubernetes.test.test_v1_external_documentation.rst deleted file mode 100644 index afbb1dcaa7..0000000000 --- a/doc/source/kubernetes.test.test_v1_external_documentation.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_external\_documentation module -======================================================== - -.. automodule:: kubernetes.test.test_v1_external_documentation - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_fc_volume_source.rst b/doc/source/kubernetes.test.test_v1_fc_volume_source.rst deleted file mode 100644 index c8570c101d..0000000000 --- a/doc/source/kubernetes.test.test_v1_fc_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_fc\_volume\_source module -=================================================== - -.. automodule:: kubernetes.test.test_v1_fc_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_flex_persistent_volume_source.rst b/doc/source/kubernetes.test.test_v1_flex_persistent_volume_source.rst deleted file mode 100644 index 43fd8ab74d..0000000000 --- a/doc/source/kubernetes.test.test_v1_flex_persistent_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_flex\_persistent\_volume\_source module -================================================================= - -.. automodule:: kubernetes.test.test_v1_flex_persistent_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_flex_volume_source.rst b/doc/source/kubernetes.test.test_v1_flex_volume_source.rst deleted file mode 100644 index f7449ae72d..0000000000 --- a/doc/source/kubernetes.test.test_v1_flex_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_flex\_volume\_source module -===================================================== - -.. automodule:: kubernetes.test.test_v1_flex_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_flocker_volume_source.rst b/doc/source/kubernetes.test.test_v1_flocker_volume_source.rst deleted file mode 100644 index 6f88363b58..0000000000 --- a/doc/source/kubernetes.test.test_v1_flocker_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_flocker\_volume\_source module -======================================================== - -.. automodule:: kubernetes.test.test_v1_flocker_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_flow_distinguisher_method.rst b/doc/source/kubernetes.test.test_v1_flow_distinguisher_method.rst deleted file mode 100644 index 18c5b691df..0000000000 --- a/doc/source/kubernetes.test.test_v1_flow_distinguisher_method.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_flow\_distinguisher\_method module -============================================================ - -.. automodule:: kubernetes.test.test_v1_flow_distinguisher_method - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_flow_schema.rst b/doc/source/kubernetes.test.test_v1_flow_schema.rst deleted file mode 100644 index cdd8765861..0000000000 --- a/doc/source/kubernetes.test.test_v1_flow_schema.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_flow\_schema module -============================================= - -.. automodule:: kubernetes.test.test_v1_flow_schema - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_flow_schema_condition.rst b/doc/source/kubernetes.test.test_v1_flow_schema_condition.rst deleted file mode 100644 index 70bfc205d0..0000000000 --- a/doc/source/kubernetes.test.test_v1_flow_schema_condition.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_flow\_schema\_condition module -======================================================== - -.. automodule:: kubernetes.test.test_v1_flow_schema_condition - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_flow_schema_list.rst b/doc/source/kubernetes.test.test_v1_flow_schema_list.rst deleted file mode 100644 index 1c96e92baa..0000000000 --- a/doc/source/kubernetes.test.test_v1_flow_schema_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_flow\_schema\_list module -=================================================== - -.. automodule:: kubernetes.test.test_v1_flow_schema_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_flow_schema_spec.rst b/doc/source/kubernetes.test.test_v1_flow_schema_spec.rst deleted file mode 100644 index c4be0beb49..0000000000 --- a/doc/source/kubernetes.test.test_v1_flow_schema_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_flow\_schema\_spec module -=================================================== - -.. automodule:: kubernetes.test.test_v1_flow_schema_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_flow_schema_status.rst b/doc/source/kubernetes.test.test_v1_flow_schema_status.rst deleted file mode 100644 index f1c2f40c7c..0000000000 --- a/doc/source/kubernetes.test.test_v1_flow_schema_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_flow\_schema\_status module -===================================================== - -.. automodule:: kubernetes.test.test_v1_flow_schema_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_for_zone.rst b/doc/source/kubernetes.test.test_v1_for_zone.rst deleted file mode 100644 index 5ab767527e..0000000000 --- a/doc/source/kubernetes.test.test_v1_for_zone.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_for\_zone module -========================================== - -.. automodule:: kubernetes.test.test_v1_for_zone - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_gce_persistent_disk_volume_source.rst b/doc/source/kubernetes.test.test_v1_gce_persistent_disk_volume_source.rst deleted file mode 100644 index ac692c6164..0000000000 --- a/doc/source/kubernetes.test.test_v1_gce_persistent_disk_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_gce\_persistent\_disk\_volume\_source module -====================================================================== - -.. automodule:: kubernetes.test.test_v1_gce_persistent_disk_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_git_repo_volume_source.rst b/doc/source/kubernetes.test.test_v1_git_repo_volume_source.rst deleted file mode 100644 index 4c0805ab0e..0000000000 --- a/doc/source/kubernetes.test.test_v1_git_repo_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_git\_repo\_volume\_source module -========================================================== - -.. automodule:: kubernetes.test.test_v1_git_repo_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_glusterfs_persistent_volume_source.rst b/doc/source/kubernetes.test.test_v1_glusterfs_persistent_volume_source.rst deleted file mode 100644 index 4517924f66..0000000000 --- a/doc/source/kubernetes.test.test_v1_glusterfs_persistent_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_glusterfs\_persistent\_volume\_source module -====================================================================== - -.. automodule:: kubernetes.test.test_v1_glusterfs_persistent_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_glusterfs_volume_source.rst b/doc/source/kubernetes.test.test_v1_glusterfs_volume_source.rst deleted file mode 100644 index 9e69551890..0000000000 --- a/doc/source/kubernetes.test.test_v1_glusterfs_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_glusterfs\_volume\_source module -========================================================== - -.. automodule:: kubernetes.test.test_v1_glusterfs_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_group_subject.rst b/doc/source/kubernetes.test.test_v1_group_subject.rst deleted file mode 100644 index db8124a6aa..0000000000 --- a/doc/source/kubernetes.test.test_v1_group_subject.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_group\_subject module -=============================================== - -.. automodule:: kubernetes.test.test_v1_group_subject - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_group_version_for_discovery.rst b/doc/source/kubernetes.test.test_v1_group_version_for_discovery.rst deleted file mode 100644 index 6517d1ec92..0000000000 --- a/doc/source/kubernetes.test.test_v1_group_version_for_discovery.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_group\_version\_for\_discovery module -=============================================================== - -.. automodule:: kubernetes.test.test_v1_group_version_for_discovery - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_grpc_action.rst b/doc/source/kubernetes.test.test_v1_grpc_action.rst deleted file mode 100644 index d480c2a5e2..0000000000 --- a/doc/source/kubernetes.test.test_v1_grpc_action.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_grpc\_action module -============================================= - -.. automodule:: kubernetes.test.test_v1_grpc_action - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_horizontal_pod_autoscaler.rst b/doc/source/kubernetes.test.test_v1_horizontal_pod_autoscaler.rst deleted file mode 100644 index 0bf92bc2e6..0000000000 --- a/doc/source/kubernetes.test.test_v1_horizontal_pod_autoscaler.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_horizontal\_pod\_autoscaler module -============================================================ - -.. automodule:: kubernetes.test.test_v1_horizontal_pod_autoscaler - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_horizontal_pod_autoscaler_list.rst b/doc/source/kubernetes.test.test_v1_horizontal_pod_autoscaler_list.rst deleted file mode 100644 index ae7263d02a..0000000000 --- a/doc/source/kubernetes.test.test_v1_horizontal_pod_autoscaler_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_horizontal\_pod\_autoscaler\_list module -================================================================== - -.. automodule:: kubernetes.test.test_v1_horizontal_pod_autoscaler_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_horizontal_pod_autoscaler_spec.rst b/doc/source/kubernetes.test.test_v1_horizontal_pod_autoscaler_spec.rst deleted file mode 100644 index c30ce98a7a..0000000000 --- a/doc/source/kubernetes.test.test_v1_horizontal_pod_autoscaler_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_horizontal\_pod\_autoscaler\_spec module -================================================================== - -.. automodule:: kubernetes.test.test_v1_horizontal_pod_autoscaler_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_horizontal_pod_autoscaler_status.rst b/doc/source/kubernetes.test.test_v1_horizontal_pod_autoscaler_status.rst deleted file mode 100644 index aec99d73aa..0000000000 --- a/doc/source/kubernetes.test.test_v1_horizontal_pod_autoscaler_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_horizontal\_pod\_autoscaler\_status module -==================================================================== - -.. automodule:: kubernetes.test.test_v1_horizontal_pod_autoscaler_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_host_alias.rst b/doc/source/kubernetes.test.test_v1_host_alias.rst deleted file mode 100644 index 5527e0f534..0000000000 --- a/doc/source/kubernetes.test.test_v1_host_alias.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_host\_alias module -============================================ - -.. automodule:: kubernetes.test.test_v1_host_alias - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_host_ip.rst b/doc/source/kubernetes.test.test_v1_host_ip.rst deleted file mode 100644 index b1cfc5b3c9..0000000000 --- a/doc/source/kubernetes.test.test_v1_host_ip.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_host\_ip module -========================================= - -.. automodule:: kubernetes.test.test_v1_host_ip - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_host_path_volume_source.rst b/doc/source/kubernetes.test.test_v1_host_path_volume_source.rst deleted file mode 100644 index 220fbb7a92..0000000000 --- a/doc/source/kubernetes.test.test_v1_host_path_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_host\_path\_volume\_source module -=========================================================== - -.. automodule:: kubernetes.test.test_v1_host_path_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_http_get_action.rst b/doc/source/kubernetes.test.test_v1_http_get_action.rst deleted file mode 100644 index 98371e0412..0000000000 --- a/doc/source/kubernetes.test.test_v1_http_get_action.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_http\_get\_action module -================================================== - -.. automodule:: kubernetes.test.test_v1_http_get_action - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_http_header.rst b/doc/source/kubernetes.test.test_v1_http_header.rst deleted file mode 100644 index 5cebc1a79a..0000000000 --- a/doc/source/kubernetes.test.test_v1_http_header.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_http\_header module -============================================= - -.. automodule:: kubernetes.test.test_v1_http_header - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_http_ingress_path.rst b/doc/source/kubernetes.test.test_v1_http_ingress_path.rst deleted file mode 100644 index d92d05bf36..0000000000 --- a/doc/source/kubernetes.test.test_v1_http_ingress_path.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_http\_ingress\_path module -==================================================== - -.. automodule:: kubernetes.test.test_v1_http_ingress_path - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_http_ingress_rule_value.rst b/doc/source/kubernetes.test.test_v1_http_ingress_rule_value.rst deleted file mode 100644 index 1c856d7b88..0000000000 --- a/doc/source/kubernetes.test.test_v1_http_ingress_rule_value.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_http\_ingress\_rule\_value module -=========================================================== - -.. automodule:: kubernetes.test.test_v1_http_ingress_rule_value - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_ingress.rst b/doc/source/kubernetes.test.test_v1_ingress.rst deleted file mode 100644 index 6310884cb3..0000000000 --- a/doc/source/kubernetes.test.test_v1_ingress.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_ingress module -======================================== - -.. automodule:: kubernetes.test.test_v1_ingress - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_ingress_backend.rst b/doc/source/kubernetes.test.test_v1_ingress_backend.rst deleted file mode 100644 index ca6f0cbe92..0000000000 --- a/doc/source/kubernetes.test.test_v1_ingress_backend.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_ingress\_backend module -================================================= - -.. automodule:: kubernetes.test.test_v1_ingress_backend - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_ingress_class.rst b/doc/source/kubernetes.test.test_v1_ingress_class.rst deleted file mode 100644 index b77bb8a849..0000000000 --- a/doc/source/kubernetes.test.test_v1_ingress_class.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_ingress\_class module -=============================================== - -.. automodule:: kubernetes.test.test_v1_ingress_class - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_ingress_class_list.rst b/doc/source/kubernetes.test.test_v1_ingress_class_list.rst deleted file mode 100644 index df4f33b8d3..0000000000 --- a/doc/source/kubernetes.test.test_v1_ingress_class_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_ingress\_class\_list module -===================================================== - -.. automodule:: kubernetes.test.test_v1_ingress_class_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_ingress_class_parameters_reference.rst b/doc/source/kubernetes.test.test_v1_ingress_class_parameters_reference.rst deleted file mode 100644 index c63890d918..0000000000 --- a/doc/source/kubernetes.test.test_v1_ingress_class_parameters_reference.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_ingress\_class\_parameters\_reference module -====================================================================== - -.. automodule:: kubernetes.test.test_v1_ingress_class_parameters_reference - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_ingress_class_spec.rst b/doc/source/kubernetes.test.test_v1_ingress_class_spec.rst deleted file mode 100644 index 5caefb7d86..0000000000 --- a/doc/source/kubernetes.test.test_v1_ingress_class_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_ingress\_class\_spec module -===================================================== - -.. automodule:: kubernetes.test.test_v1_ingress_class_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_ingress_list.rst b/doc/source/kubernetes.test.test_v1_ingress_list.rst deleted file mode 100644 index 936e9b87c5..0000000000 --- a/doc/source/kubernetes.test.test_v1_ingress_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_ingress\_list module -============================================== - -.. automodule:: kubernetes.test.test_v1_ingress_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_ingress_load_balancer_ingress.rst b/doc/source/kubernetes.test.test_v1_ingress_load_balancer_ingress.rst deleted file mode 100644 index c683e4e975..0000000000 --- a/doc/source/kubernetes.test.test_v1_ingress_load_balancer_ingress.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_ingress\_load\_balancer\_ingress module -================================================================= - -.. automodule:: kubernetes.test.test_v1_ingress_load_balancer_ingress - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_ingress_load_balancer_status.rst b/doc/source/kubernetes.test.test_v1_ingress_load_balancer_status.rst deleted file mode 100644 index 89cf060578..0000000000 --- a/doc/source/kubernetes.test.test_v1_ingress_load_balancer_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_ingress\_load\_balancer\_status module -================================================================ - -.. automodule:: kubernetes.test.test_v1_ingress_load_balancer_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_ingress_port_status.rst b/doc/source/kubernetes.test.test_v1_ingress_port_status.rst deleted file mode 100644 index 8417b2104e..0000000000 --- a/doc/source/kubernetes.test.test_v1_ingress_port_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_ingress\_port\_status module -====================================================== - -.. automodule:: kubernetes.test.test_v1_ingress_port_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_ingress_rule.rst b/doc/source/kubernetes.test.test_v1_ingress_rule.rst deleted file mode 100644 index 18ef0042e9..0000000000 --- a/doc/source/kubernetes.test.test_v1_ingress_rule.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_ingress\_rule module -============================================== - -.. automodule:: kubernetes.test.test_v1_ingress_rule - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_ingress_service_backend.rst b/doc/source/kubernetes.test.test_v1_ingress_service_backend.rst deleted file mode 100644 index 4ec4904e99..0000000000 --- a/doc/source/kubernetes.test.test_v1_ingress_service_backend.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_ingress\_service\_backend module -========================================================== - -.. automodule:: kubernetes.test.test_v1_ingress_service_backend - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_ingress_spec.rst b/doc/source/kubernetes.test.test_v1_ingress_spec.rst deleted file mode 100644 index 00b2a59064..0000000000 --- a/doc/source/kubernetes.test.test_v1_ingress_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_ingress\_spec module -============================================== - -.. automodule:: kubernetes.test.test_v1_ingress_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_ingress_status.rst b/doc/source/kubernetes.test.test_v1_ingress_status.rst deleted file mode 100644 index a391cd23db..0000000000 --- a/doc/source/kubernetes.test.test_v1_ingress_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_ingress\_status module -================================================ - -.. automodule:: kubernetes.test.test_v1_ingress_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_ingress_tls.rst b/doc/source/kubernetes.test.test_v1_ingress_tls.rst deleted file mode 100644 index 260ec63afc..0000000000 --- a/doc/source/kubernetes.test.test_v1_ingress_tls.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_ingress\_tls module -============================================= - -.. automodule:: kubernetes.test.test_v1_ingress_tls - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_ip_block.rst b/doc/source/kubernetes.test.test_v1_ip_block.rst deleted file mode 100644 index a228b7fa30..0000000000 --- a/doc/source/kubernetes.test.test_v1_ip_block.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_ip\_block module -========================================== - -.. automodule:: kubernetes.test.test_v1_ip_block - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_iscsi_persistent_volume_source.rst b/doc/source/kubernetes.test.test_v1_iscsi_persistent_volume_source.rst deleted file mode 100644 index 74a367f953..0000000000 --- a/doc/source/kubernetes.test.test_v1_iscsi_persistent_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_iscsi\_persistent\_volume\_source module -================================================================== - -.. automodule:: kubernetes.test.test_v1_iscsi_persistent_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_iscsi_volume_source.rst b/doc/source/kubernetes.test.test_v1_iscsi_volume_source.rst deleted file mode 100644 index 73a5f5ab44..0000000000 --- a/doc/source/kubernetes.test.test_v1_iscsi_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_iscsi\_volume\_source module -====================================================== - -.. automodule:: kubernetes.test.test_v1_iscsi_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_job.rst b/doc/source/kubernetes.test.test_v1_job.rst deleted file mode 100644 index 1ae6fa5ad8..0000000000 --- a/doc/source/kubernetes.test.test_v1_job.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_job module -==================================== - -.. automodule:: kubernetes.test.test_v1_job - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_job_condition.rst b/doc/source/kubernetes.test.test_v1_job_condition.rst deleted file mode 100644 index 06dd06a3bd..0000000000 --- a/doc/source/kubernetes.test.test_v1_job_condition.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_job\_condition module -=============================================== - -.. automodule:: kubernetes.test.test_v1_job_condition - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_job_list.rst b/doc/source/kubernetes.test.test_v1_job_list.rst deleted file mode 100644 index 59301a948c..0000000000 --- a/doc/source/kubernetes.test.test_v1_job_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_job\_list module -========================================== - -.. automodule:: kubernetes.test.test_v1_job_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_job_spec.rst b/doc/source/kubernetes.test.test_v1_job_spec.rst deleted file mode 100644 index 249b3ec1a5..0000000000 --- a/doc/source/kubernetes.test.test_v1_job_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_job\_spec module -========================================== - -.. automodule:: kubernetes.test.test_v1_job_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_job_status.rst b/doc/source/kubernetes.test.test_v1_job_status.rst deleted file mode 100644 index f35fc460be..0000000000 --- a/doc/source/kubernetes.test.test_v1_job_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_job\_status module -============================================ - -.. automodule:: kubernetes.test.test_v1_job_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_job_template_spec.rst b/doc/source/kubernetes.test.test_v1_job_template_spec.rst deleted file mode 100644 index 2024eb06a4..0000000000 --- a/doc/source/kubernetes.test.test_v1_job_template_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_job\_template\_spec module -==================================================== - -.. automodule:: kubernetes.test.test_v1_job_template_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_json_schema_props.rst b/doc/source/kubernetes.test.test_v1_json_schema_props.rst deleted file mode 100644 index aeee1cbe6e..0000000000 --- a/doc/source/kubernetes.test.test_v1_json_schema_props.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_json\_schema\_props module -==================================================== - -.. automodule:: kubernetes.test.test_v1_json_schema_props - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_key_to_path.rst b/doc/source/kubernetes.test.test_v1_key_to_path.rst deleted file mode 100644 index c05d9fe4f0..0000000000 --- a/doc/source/kubernetes.test.test_v1_key_to_path.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_key\_to\_path module -============================================== - -.. automodule:: kubernetes.test.test_v1_key_to_path - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_label_selector.rst b/doc/source/kubernetes.test.test_v1_label_selector.rst deleted file mode 100644 index 94613d34d6..0000000000 --- a/doc/source/kubernetes.test.test_v1_label_selector.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_label\_selector module -================================================ - -.. automodule:: kubernetes.test.test_v1_label_selector - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_label_selector_requirement.rst b/doc/source/kubernetes.test.test_v1_label_selector_requirement.rst deleted file mode 100644 index 880bae9704..0000000000 --- a/doc/source/kubernetes.test.test_v1_label_selector_requirement.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_label\_selector\_requirement module -============================================================= - -.. automodule:: kubernetes.test.test_v1_label_selector_requirement - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_lease.rst b/doc/source/kubernetes.test.test_v1_lease.rst deleted file mode 100644 index c30e65bc1d..0000000000 --- a/doc/source/kubernetes.test.test_v1_lease.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_lease module -====================================== - -.. automodule:: kubernetes.test.test_v1_lease - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_lease_list.rst b/doc/source/kubernetes.test.test_v1_lease_list.rst deleted file mode 100644 index 4a5d39dee0..0000000000 --- a/doc/source/kubernetes.test.test_v1_lease_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_lease\_list module -============================================ - -.. automodule:: kubernetes.test.test_v1_lease_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_lease_spec.rst b/doc/source/kubernetes.test.test_v1_lease_spec.rst deleted file mode 100644 index f78c40199f..0000000000 --- a/doc/source/kubernetes.test.test_v1_lease_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_lease\_spec module -============================================ - -.. automodule:: kubernetes.test.test_v1_lease_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_lifecycle.rst b/doc/source/kubernetes.test.test_v1_lifecycle.rst deleted file mode 100644 index 742c49bf6c..0000000000 --- a/doc/source/kubernetes.test.test_v1_lifecycle.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_lifecycle module -========================================== - -.. automodule:: kubernetes.test.test_v1_lifecycle - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_lifecycle_handler.rst b/doc/source/kubernetes.test.test_v1_lifecycle_handler.rst deleted file mode 100644 index 123a26e463..0000000000 --- a/doc/source/kubernetes.test.test_v1_lifecycle_handler.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_lifecycle\_handler module -=================================================== - -.. automodule:: kubernetes.test.test_v1_lifecycle_handler - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_limit_range.rst b/doc/source/kubernetes.test.test_v1_limit_range.rst deleted file mode 100644 index bd277ed94d..0000000000 --- a/doc/source/kubernetes.test.test_v1_limit_range.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_limit\_range module -============================================= - -.. automodule:: kubernetes.test.test_v1_limit_range - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_limit_range_item.rst b/doc/source/kubernetes.test.test_v1_limit_range_item.rst deleted file mode 100644 index 65e52783b7..0000000000 --- a/doc/source/kubernetes.test.test_v1_limit_range_item.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_limit\_range\_item module -=================================================== - -.. automodule:: kubernetes.test.test_v1_limit_range_item - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_limit_range_list.rst b/doc/source/kubernetes.test.test_v1_limit_range_list.rst deleted file mode 100644 index c5f19e3333..0000000000 --- a/doc/source/kubernetes.test.test_v1_limit_range_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_limit\_range\_list module -=================================================== - -.. automodule:: kubernetes.test.test_v1_limit_range_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_limit_range_spec.rst b/doc/source/kubernetes.test.test_v1_limit_range_spec.rst deleted file mode 100644 index 321b3d3cae..0000000000 --- a/doc/source/kubernetes.test.test_v1_limit_range_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_limit\_range\_spec module -=================================================== - -.. automodule:: kubernetes.test.test_v1_limit_range_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_limit_response.rst b/doc/source/kubernetes.test.test_v1_limit_response.rst deleted file mode 100644 index bb235bc6d7..0000000000 --- a/doc/source/kubernetes.test.test_v1_limit_response.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_limit\_response module -================================================ - -.. automodule:: kubernetes.test.test_v1_limit_response - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_limited_priority_level_configuration.rst b/doc/source/kubernetes.test.test_v1_limited_priority_level_configuration.rst deleted file mode 100644 index 63adea59db..0000000000 --- a/doc/source/kubernetes.test.test_v1_limited_priority_level_configuration.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_limited\_priority\_level\_configuration module -======================================================================== - -.. automodule:: kubernetes.test.test_v1_limited_priority_level_configuration - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_list_meta.rst b/doc/source/kubernetes.test.test_v1_list_meta.rst deleted file mode 100644 index aa67bb6227..0000000000 --- a/doc/source/kubernetes.test.test_v1_list_meta.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_list\_meta module -=========================================== - -.. automodule:: kubernetes.test.test_v1_list_meta - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_load_balancer_ingress.rst b/doc/source/kubernetes.test.test_v1_load_balancer_ingress.rst deleted file mode 100644 index af82a75981..0000000000 --- a/doc/source/kubernetes.test.test_v1_load_balancer_ingress.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_load\_balancer\_ingress module -======================================================== - -.. automodule:: kubernetes.test.test_v1_load_balancer_ingress - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_load_balancer_status.rst b/doc/source/kubernetes.test.test_v1_load_balancer_status.rst deleted file mode 100644 index 14e75a8c05..0000000000 --- a/doc/source/kubernetes.test.test_v1_load_balancer_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_load\_balancer\_status module -======================================================= - -.. automodule:: kubernetes.test.test_v1_load_balancer_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_local_object_reference.rst b/doc/source/kubernetes.test.test_v1_local_object_reference.rst deleted file mode 100644 index 496f659afc..0000000000 --- a/doc/source/kubernetes.test.test_v1_local_object_reference.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_local\_object\_reference module -========================================================= - -.. automodule:: kubernetes.test.test_v1_local_object_reference - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_local_subject_access_review.rst b/doc/source/kubernetes.test.test_v1_local_subject_access_review.rst deleted file mode 100644 index 174f63089c..0000000000 --- a/doc/source/kubernetes.test.test_v1_local_subject_access_review.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_local\_subject\_access\_review module -=============================================================== - -.. automodule:: kubernetes.test.test_v1_local_subject_access_review - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_local_volume_source.rst b/doc/source/kubernetes.test.test_v1_local_volume_source.rst deleted file mode 100644 index a32cbb4b89..0000000000 --- a/doc/source/kubernetes.test.test_v1_local_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_local\_volume\_source module -====================================================== - -.. automodule:: kubernetes.test.test_v1_local_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_managed_fields_entry.rst b/doc/source/kubernetes.test.test_v1_managed_fields_entry.rst deleted file mode 100644 index f5d9831e17..0000000000 --- a/doc/source/kubernetes.test.test_v1_managed_fields_entry.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_managed\_fields\_entry module -======================================================= - -.. automodule:: kubernetes.test.test_v1_managed_fields_entry - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_match_condition.rst b/doc/source/kubernetes.test.test_v1_match_condition.rst deleted file mode 100644 index 09197b5714..0000000000 --- a/doc/source/kubernetes.test.test_v1_match_condition.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_match\_condition module -================================================= - -.. automodule:: kubernetes.test.test_v1_match_condition - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_match_resources.rst b/doc/source/kubernetes.test.test_v1_match_resources.rst deleted file mode 100644 index 31b6843f6e..0000000000 --- a/doc/source/kubernetes.test.test_v1_match_resources.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_match\_resources module -================================================= - -.. automodule:: kubernetes.test.test_v1_match_resources - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_modify_volume_status.rst b/doc/source/kubernetes.test.test_v1_modify_volume_status.rst deleted file mode 100644 index 56d5ff30af..0000000000 --- a/doc/source/kubernetes.test.test_v1_modify_volume_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_modify\_volume\_status module -======================================================= - -.. automodule:: kubernetes.test.test_v1_modify_volume_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_mutating_webhook.rst b/doc/source/kubernetes.test.test_v1_mutating_webhook.rst deleted file mode 100644 index 87a591f6b4..0000000000 --- a/doc/source/kubernetes.test.test_v1_mutating_webhook.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_mutating\_webhook module -================================================== - -.. automodule:: kubernetes.test.test_v1_mutating_webhook - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_mutating_webhook_configuration.rst b/doc/source/kubernetes.test.test_v1_mutating_webhook_configuration.rst deleted file mode 100644 index 5e946a9cb0..0000000000 --- a/doc/source/kubernetes.test.test_v1_mutating_webhook_configuration.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_mutating\_webhook\_configuration module -================================================================= - -.. automodule:: kubernetes.test.test_v1_mutating_webhook_configuration - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_mutating_webhook_configuration_list.rst b/doc/source/kubernetes.test.test_v1_mutating_webhook_configuration_list.rst deleted file mode 100644 index 0793069c82..0000000000 --- a/doc/source/kubernetes.test.test_v1_mutating_webhook_configuration_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_mutating\_webhook\_configuration\_list module -======================================================================= - -.. automodule:: kubernetes.test.test_v1_mutating_webhook_configuration_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_named_rule_with_operations.rst b/doc/source/kubernetes.test.test_v1_named_rule_with_operations.rst deleted file mode 100644 index 85c99caf2b..0000000000 --- a/doc/source/kubernetes.test.test_v1_named_rule_with_operations.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_named\_rule\_with\_operations module -============================================================== - -.. automodule:: kubernetes.test.test_v1_named_rule_with_operations - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_namespace.rst b/doc/source/kubernetes.test.test_v1_namespace.rst deleted file mode 100644 index fa61a9dca7..0000000000 --- a/doc/source/kubernetes.test.test_v1_namespace.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_namespace module -========================================== - -.. automodule:: kubernetes.test.test_v1_namespace - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_namespace_condition.rst b/doc/source/kubernetes.test.test_v1_namespace_condition.rst deleted file mode 100644 index dd09aab00b..0000000000 --- a/doc/source/kubernetes.test.test_v1_namespace_condition.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_namespace\_condition module -===================================================== - -.. automodule:: kubernetes.test.test_v1_namespace_condition - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_namespace_list.rst b/doc/source/kubernetes.test.test_v1_namespace_list.rst deleted file mode 100644 index bfc8e74faa..0000000000 --- a/doc/source/kubernetes.test.test_v1_namespace_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_namespace\_list module -================================================ - -.. automodule:: kubernetes.test.test_v1_namespace_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_namespace_spec.rst b/doc/source/kubernetes.test.test_v1_namespace_spec.rst deleted file mode 100644 index d7fd6d66e2..0000000000 --- a/doc/source/kubernetes.test.test_v1_namespace_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_namespace\_spec module -================================================ - -.. automodule:: kubernetes.test.test_v1_namespace_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_namespace_status.rst b/doc/source/kubernetes.test.test_v1_namespace_status.rst deleted file mode 100644 index b7dc506170..0000000000 --- a/doc/source/kubernetes.test.test_v1_namespace_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_namespace\_status module -================================================== - -.. automodule:: kubernetes.test.test_v1_namespace_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_network_policy.rst b/doc/source/kubernetes.test.test_v1_network_policy.rst deleted file mode 100644 index e778280c37..0000000000 --- a/doc/source/kubernetes.test.test_v1_network_policy.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_network\_policy module -================================================ - -.. automodule:: kubernetes.test.test_v1_network_policy - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_network_policy_egress_rule.rst b/doc/source/kubernetes.test.test_v1_network_policy_egress_rule.rst deleted file mode 100644 index 21eff42e34..0000000000 --- a/doc/source/kubernetes.test.test_v1_network_policy_egress_rule.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_network\_policy\_egress\_rule module -============================================================== - -.. automodule:: kubernetes.test.test_v1_network_policy_egress_rule - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_network_policy_ingress_rule.rst b/doc/source/kubernetes.test.test_v1_network_policy_ingress_rule.rst deleted file mode 100644 index 479e14724a..0000000000 --- a/doc/source/kubernetes.test.test_v1_network_policy_ingress_rule.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_network\_policy\_ingress\_rule module -=============================================================== - -.. automodule:: kubernetes.test.test_v1_network_policy_ingress_rule - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_network_policy_list.rst b/doc/source/kubernetes.test.test_v1_network_policy_list.rst deleted file mode 100644 index 4c579038e4..0000000000 --- a/doc/source/kubernetes.test.test_v1_network_policy_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_network\_policy\_list module -====================================================== - -.. automodule:: kubernetes.test.test_v1_network_policy_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_network_policy_peer.rst b/doc/source/kubernetes.test.test_v1_network_policy_peer.rst deleted file mode 100644 index afdc1515e0..0000000000 --- a/doc/source/kubernetes.test.test_v1_network_policy_peer.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_network\_policy\_peer module -====================================================== - -.. automodule:: kubernetes.test.test_v1_network_policy_peer - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_network_policy_port.rst b/doc/source/kubernetes.test.test_v1_network_policy_port.rst deleted file mode 100644 index 9d8bc92e19..0000000000 --- a/doc/source/kubernetes.test.test_v1_network_policy_port.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_network\_policy\_port module -====================================================== - -.. automodule:: kubernetes.test.test_v1_network_policy_port - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_network_policy_spec.rst b/doc/source/kubernetes.test.test_v1_network_policy_spec.rst deleted file mode 100644 index 22a0390475..0000000000 --- a/doc/source/kubernetes.test.test_v1_network_policy_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_network\_policy\_spec module -====================================================== - -.. automodule:: kubernetes.test.test_v1_network_policy_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_nfs_volume_source.rst b/doc/source/kubernetes.test.test_v1_nfs_volume_source.rst deleted file mode 100644 index 9da2de9974..0000000000 --- a/doc/source/kubernetes.test.test_v1_nfs_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_nfs\_volume\_source module -==================================================== - -.. automodule:: kubernetes.test.test_v1_nfs_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_node.rst b/doc/source/kubernetes.test.test_v1_node.rst deleted file mode 100644 index af7329f3b6..0000000000 --- a/doc/source/kubernetes.test.test_v1_node.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_node module -===================================== - -.. automodule:: kubernetes.test.test_v1_node - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_node_address.rst b/doc/source/kubernetes.test.test_v1_node_address.rst deleted file mode 100644 index a1ad2b516a..0000000000 --- a/doc/source/kubernetes.test.test_v1_node_address.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_node\_address module -============================================== - -.. automodule:: kubernetes.test.test_v1_node_address - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_node_affinity.rst b/doc/source/kubernetes.test.test_v1_node_affinity.rst deleted file mode 100644 index 8d8b5e309e..0000000000 --- a/doc/source/kubernetes.test.test_v1_node_affinity.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_node\_affinity module -=============================================== - -.. automodule:: kubernetes.test.test_v1_node_affinity - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_node_condition.rst b/doc/source/kubernetes.test.test_v1_node_condition.rst deleted file mode 100644 index d7bacdcff7..0000000000 --- a/doc/source/kubernetes.test.test_v1_node_condition.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_node\_condition module -================================================ - -.. automodule:: kubernetes.test.test_v1_node_condition - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_node_config_source.rst b/doc/source/kubernetes.test.test_v1_node_config_source.rst deleted file mode 100644 index 5f34cd6ea2..0000000000 --- a/doc/source/kubernetes.test.test_v1_node_config_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_node\_config\_source module -===================================================== - -.. automodule:: kubernetes.test.test_v1_node_config_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_node_config_status.rst b/doc/source/kubernetes.test.test_v1_node_config_status.rst deleted file mode 100644 index 02436b9939..0000000000 --- a/doc/source/kubernetes.test.test_v1_node_config_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_node\_config\_status module -===================================================== - -.. automodule:: kubernetes.test.test_v1_node_config_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_node_daemon_endpoints.rst b/doc/source/kubernetes.test.test_v1_node_daemon_endpoints.rst deleted file mode 100644 index 4b52db35e0..0000000000 --- a/doc/source/kubernetes.test.test_v1_node_daemon_endpoints.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_node\_daemon\_endpoints module -======================================================== - -.. automodule:: kubernetes.test.test_v1_node_daemon_endpoints - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_node_list.rst b/doc/source/kubernetes.test.test_v1_node_list.rst deleted file mode 100644 index 316a151e9f..0000000000 --- a/doc/source/kubernetes.test.test_v1_node_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_node\_list module -=========================================== - -.. automodule:: kubernetes.test.test_v1_node_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_node_runtime_handler.rst b/doc/source/kubernetes.test.test_v1_node_runtime_handler.rst deleted file mode 100644 index 73346b50d5..0000000000 --- a/doc/source/kubernetes.test.test_v1_node_runtime_handler.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_node\_runtime\_handler module -======================================================= - -.. automodule:: kubernetes.test.test_v1_node_runtime_handler - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_node_runtime_handler_features.rst b/doc/source/kubernetes.test.test_v1_node_runtime_handler_features.rst deleted file mode 100644 index 1b42b6cb44..0000000000 --- a/doc/source/kubernetes.test.test_v1_node_runtime_handler_features.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_node\_runtime\_handler\_features module -================================================================= - -.. automodule:: kubernetes.test.test_v1_node_runtime_handler_features - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_node_selector.rst b/doc/source/kubernetes.test.test_v1_node_selector.rst deleted file mode 100644 index 22234629d2..0000000000 --- a/doc/source/kubernetes.test.test_v1_node_selector.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_node\_selector module -=============================================== - -.. automodule:: kubernetes.test.test_v1_node_selector - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_node_selector_requirement.rst b/doc/source/kubernetes.test.test_v1_node_selector_requirement.rst deleted file mode 100644 index a9e5060813..0000000000 --- a/doc/source/kubernetes.test.test_v1_node_selector_requirement.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_node\_selector\_requirement module -============================================================ - -.. automodule:: kubernetes.test.test_v1_node_selector_requirement - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_node_selector_term.rst b/doc/source/kubernetes.test.test_v1_node_selector_term.rst deleted file mode 100644 index 766c2660ca..0000000000 --- a/doc/source/kubernetes.test.test_v1_node_selector_term.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_node\_selector\_term module -===================================================== - -.. automodule:: kubernetes.test.test_v1_node_selector_term - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_node_spec.rst b/doc/source/kubernetes.test.test_v1_node_spec.rst deleted file mode 100644 index 1e23b9588b..0000000000 --- a/doc/source/kubernetes.test.test_v1_node_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_node\_spec module -=========================================== - -.. automodule:: kubernetes.test.test_v1_node_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_node_status.rst b/doc/source/kubernetes.test.test_v1_node_status.rst deleted file mode 100644 index 1c84c3905f..0000000000 --- a/doc/source/kubernetes.test.test_v1_node_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_node\_status module -============================================= - -.. automodule:: kubernetes.test.test_v1_node_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_node_system_info.rst b/doc/source/kubernetes.test.test_v1_node_system_info.rst deleted file mode 100644 index 59d743454e..0000000000 --- a/doc/source/kubernetes.test.test_v1_node_system_info.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_node\_system\_info module -=================================================== - -.. automodule:: kubernetes.test.test_v1_node_system_info - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_non_resource_attributes.rst b/doc/source/kubernetes.test.test_v1_non_resource_attributes.rst deleted file mode 100644 index 86ad710e3d..0000000000 --- a/doc/source/kubernetes.test.test_v1_non_resource_attributes.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_non\_resource\_attributes module -========================================================== - -.. automodule:: kubernetes.test.test_v1_non_resource_attributes - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_non_resource_policy_rule.rst b/doc/source/kubernetes.test.test_v1_non_resource_policy_rule.rst deleted file mode 100644 index 22dc2524e1..0000000000 --- a/doc/source/kubernetes.test.test_v1_non_resource_policy_rule.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_non\_resource\_policy\_rule module -============================================================ - -.. automodule:: kubernetes.test.test_v1_non_resource_policy_rule - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_non_resource_rule.rst b/doc/source/kubernetes.test.test_v1_non_resource_rule.rst deleted file mode 100644 index 0597dcadc8..0000000000 --- a/doc/source/kubernetes.test.test_v1_non_resource_rule.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_non\_resource\_rule module -==================================================== - -.. automodule:: kubernetes.test.test_v1_non_resource_rule - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_object_field_selector.rst b/doc/source/kubernetes.test.test_v1_object_field_selector.rst deleted file mode 100644 index 113fb20366..0000000000 --- a/doc/source/kubernetes.test.test_v1_object_field_selector.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_object\_field\_selector module -======================================================== - -.. automodule:: kubernetes.test.test_v1_object_field_selector - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_object_meta.rst b/doc/source/kubernetes.test.test_v1_object_meta.rst deleted file mode 100644 index 366ad72ddc..0000000000 --- a/doc/source/kubernetes.test.test_v1_object_meta.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_object\_meta module -============================================= - -.. automodule:: kubernetes.test.test_v1_object_meta - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_object_reference.rst b/doc/source/kubernetes.test.test_v1_object_reference.rst deleted file mode 100644 index 147cb432b5..0000000000 --- a/doc/source/kubernetes.test.test_v1_object_reference.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_object\_reference module -================================================== - -.. automodule:: kubernetes.test.test_v1_object_reference - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_overhead.rst b/doc/source/kubernetes.test.test_v1_overhead.rst deleted file mode 100644 index d9df4e40ec..0000000000 --- a/doc/source/kubernetes.test.test_v1_overhead.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_overhead module -========================================= - -.. automodule:: kubernetes.test.test_v1_overhead - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_owner_reference.rst b/doc/source/kubernetes.test.test_v1_owner_reference.rst deleted file mode 100644 index 2e0ff6f8ee..0000000000 --- a/doc/source/kubernetes.test.test_v1_owner_reference.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_owner\_reference module -================================================= - -.. automodule:: kubernetes.test.test_v1_owner_reference - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_param_kind.rst b/doc/source/kubernetes.test.test_v1_param_kind.rst deleted file mode 100644 index ea5bb5668f..0000000000 --- a/doc/source/kubernetes.test.test_v1_param_kind.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_param\_kind module -============================================ - -.. automodule:: kubernetes.test.test_v1_param_kind - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_param_ref.rst b/doc/source/kubernetes.test.test_v1_param_ref.rst deleted file mode 100644 index c6d9a37c0e..0000000000 --- a/doc/source/kubernetes.test.test_v1_param_ref.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_param\_ref module -=========================================== - -.. automodule:: kubernetes.test.test_v1_param_ref - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_persistent_volume.rst b/doc/source/kubernetes.test.test_v1_persistent_volume.rst deleted file mode 100644 index 1253dc11b1..0000000000 --- a/doc/source/kubernetes.test.test_v1_persistent_volume.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_persistent\_volume module -=================================================== - -.. automodule:: kubernetes.test.test_v1_persistent_volume - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_persistent_volume_claim.rst b/doc/source/kubernetes.test.test_v1_persistent_volume_claim.rst deleted file mode 100644 index 95bbbf803f..0000000000 --- a/doc/source/kubernetes.test.test_v1_persistent_volume_claim.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_persistent\_volume\_claim module -========================================================== - -.. automodule:: kubernetes.test.test_v1_persistent_volume_claim - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_persistent_volume_claim_condition.rst b/doc/source/kubernetes.test.test_v1_persistent_volume_claim_condition.rst deleted file mode 100644 index 4f68909877..0000000000 --- a/doc/source/kubernetes.test.test_v1_persistent_volume_claim_condition.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_persistent\_volume\_claim\_condition module -===================================================================== - -.. automodule:: kubernetes.test.test_v1_persistent_volume_claim_condition - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_persistent_volume_claim_list.rst b/doc/source/kubernetes.test.test_v1_persistent_volume_claim_list.rst deleted file mode 100644 index 8feb427639..0000000000 --- a/doc/source/kubernetes.test.test_v1_persistent_volume_claim_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_persistent\_volume\_claim\_list module -================================================================ - -.. automodule:: kubernetes.test.test_v1_persistent_volume_claim_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_persistent_volume_claim_spec.rst b/doc/source/kubernetes.test.test_v1_persistent_volume_claim_spec.rst deleted file mode 100644 index 967d6eeaa1..0000000000 --- a/doc/source/kubernetes.test.test_v1_persistent_volume_claim_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_persistent\_volume\_claim\_spec module -================================================================ - -.. automodule:: kubernetes.test.test_v1_persistent_volume_claim_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_persistent_volume_claim_status.rst b/doc/source/kubernetes.test.test_v1_persistent_volume_claim_status.rst deleted file mode 100644 index b6f786eaba..0000000000 --- a/doc/source/kubernetes.test.test_v1_persistent_volume_claim_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_persistent\_volume\_claim\_status module -================================================================== - -.. automodule:: kubernetes.test.test_v1_persistent_volume_claim_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_persistent_volume_claim_template.rst b/doc/source/kubernetes.test.test_v1_persistent_volume_claim_template.rst deleted file mode 100644 index d338ec08a7..0000000000 --- a/doc/source/kubernetes.test.test_v1_persistent_volume_claim_template.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_persistent\_volume\_claim\_template module -==================================================================== - -.. automodule:: kubernetes.test.test_v1_persistent_volume_claim_template - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_persistent_volume_claim_volume_source.rst b/doc/source/kubernetes.test.test_v1_persistent_volume_claim_volume_source.rst deleted file mode 100644 index 090fb63fe9..0000000000 --- a/doc/source/kubernetes.test.test_v1_persistent_volume_claim_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_persistent\_volume\_claim\_volume\_source module -========================================================================== - -.. automodule:: kubernetes.test.test_v1_persistent_volume_claim_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_persistent_volume_list.rst b/doc/source/kubernetes.test.test_v1_persistent_volume_list.rst deleted file mode 100644 index d65a1d3c8f..0000000000 --- a/doc/source/kubernetes.test.test_v1_persistent_volume_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_persistent\_volume\_list module -========================================================= - -.. automodule:: kubernetes.test.test_v1_persistent_volume_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_persistent_volume_spec.rst b/doc/source/kubernetes.test.test_v1_persistent_volume_spec.rst deleted file mode 100644 index 7e67489a96..0000000000 --- a/doc/source/kubernetes.test.test_v1_persistent_volume_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_persistent\_volume\_spec module -========================================================= - -.. automodule:: kubernetes.test.test_v1_persistent_volume_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_persistent_volume_status.rst b/doc/source/kubernetes.test.test_v1_persistent_volume_status.rst deleted file mode 100644 index cd5848945a..0000000000 --- a/doc/source/kubernetes.test.test_v1_persistent_volume_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_persistent\_volume\_status module -=========================================================== - -.. automodule:: kubernetes.test.test_v1_persistent_volume_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_photon_persistent_disk_volume_source.rst b/doc/source/kubernetes.test.test_v1_photon_persistent_disk_volume_source.rst deleted file mode 100644 index fd57e3a7d4..0000000000 --- a/doc/source/kubernetes.test.test_v1_photon_persistent_disk_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_photon\_persistent\_disk\_volume\_source module -========================================================================= - -.. automodule:: kubernetes.test.test_v1_photon_persistent_disk_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_pod.rst b/doc/source/kubernetes.test.test_v1_pod.rst deleted file mode 100644 index b5bcfe3bb0..0000000000 --- a/doc/source/kubernetes.test.test_v1_pod.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_pod module -==================================== - -.. automodule:: kubernetes.test.test_v1_pod - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_pod_affinity.rst b/doc/source/kubernetes.test.test_v1_pod_affinity.rst deleted file mode 100644 index 87d52582e0..0000000000 --- a/doc/source/kubernetes.test.test_v1_pod_affinity.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_pod\_affinity module -============================================== - -.. automodule:: kubernetes.test.test_v1_pod_affinity - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_pod_affinity_term.rst b/doc/source/kubernetes.test.test_v1_pod_affinity_term.rst deleted file mode 100644 index 384c2d7700..0000000000 --- a/doc/source/kubernetes.test.test_v1_pod_affinity_term.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_pod\_affinity\_term module -==================================================== - -.. automodule:: kubernetes.test.test_v1_pod_affinity_term - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_pod_anti_affinity.rst b/doc/source/kubernetes.test.test_v1_pod_anti_affinity.rst deleted file mode 100644 index 31844aecba..0000000000 --- a/doc/source/kubernetes.test.test_v1_pod_anti_affinity.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_pod\_anti\_affinity module -==================================================== - -.. automodule:: kubernetes.test.test_v1_pod_anti_affinity - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_pod_condition.rst b/doc/source/kubernetes.test.test_v1_pod_condition.rst deleted file mode 100644 index 05f449e0e4..0000000000 --- a/doc/source/kubernetes.test.test_v1_pod_condition.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_pod\_condition module -=============================================== - -.. automodule:: kubernetes.test.test_v1_pod_condition - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_pod_disruption_budget.rst b/doc/source/kubernetes.test.test_v1_pod_disruption_budget.rst deleted file mode 100644 index e4e6fd18e3..0000000000 --- a/doc/source/kubernetes.test.test_v1_pod_disruption_budget.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_pod\_disruption\_budget module -======================================================== - -.. automodule:: kubernetes.test.test_v1_pod_disruption_budget - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_pod_disruption_budget_list.rst b/doc/source/kubernetes.test.test_v1_pod_disruption_budget_list.rst deleted file mode 100644 index de4f96d14e..0000000000 --- a/doc/source/kubernetes.test.test_v1_pod_disruption_budget_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_pod\_disruption\_budget\_list module -============================================================== - -.. automodule:: kubernetes.test.test_v1_pod_disruption_budget_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_pod_disruption_budget_spec.rst b/doc/source/kubernetes.test.test_v1_pod_disruption_budget_spec.rst deleted file mode 100644 index f736934eea..0000000000 --- a/doc/source/kubernetes.test.test_v1_pod_disruption_budget_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_pod\_disruption\_budget\_spec module -============================================================== - -.. automodule:: kubernetes.test.test_v1_pod_disruption_budget_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_pod_disruption_budget_status.rst b/doc/source/kubernetes.test.test_v1_pod_disruption_budget_status.rst deleted file mode 100644 index ab8d77b272..0000000000 --- a/doc/source/kubernetes.test.test_v1_pod_disruption_budget_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_pod\_disruption\_budget\_status module -================================================================ - -.. automodule:: kubernetes.test.test_v1_pod_disruption_budget_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_pod_dns_config.rst b/doc/source/kubernetes.test.test_v1_pod_dns_config.rst deleted file mode 100644 index 260ef0a8f8..0000000000 --- a/doc/source/kubernetes.test.test_v1_pod_dns_config.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_pod\_dns\_config module -================================================= - -.. automodule:: kubernetes.test.test_v1_pod_dns_config - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_pod_dns_config_option.rst b/doc/source/kubernetes.test.test_v1_pod_dns_config_option.rst deleted file mode 100644 index 67d2ae755a..0000000000 --- a/doc/source/kubernetes.test.test_v1_pod_dns_config_option.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_pod\_dns\_config\_option module -========================================================= - -.. automodule:: kubernetes.test.test_v1_pod_dns_config_option - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_pod_failure_policy.rst b/doc/source/kubernetes.test.test_v1_pod_failure_policy.rst deleted file mode 100644 index 4fa0e0bb0c..0000000000 --- a/doc/source/kubernetes.test.test_v1_pod_failure_policy.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_pod\_failure\_policy module -===================================================== - -.. automodule:: kubernetes.test.test_v1_pod_failure_policy - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_pod_failure_policy_on_exit_codes_requirement.rst b/doc/source/kubernetes.test.test_v1_pod_failure_policy_on_exit_codes_requirement.rst deleted file mode 100644 index 5c0d969167..0000000000 --- a/doc/source/kubernetes.test.test_v1_pod_failure_policy_on_exit_codes_requirement.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_pod\_failure\_policy\_on\_exit\_codes\_requirement module -=================================================================================== - -.. automodule:: kubernetes.test.test_v1_pod_failure_policy_on_exit_codes_requirement - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_pod_failure_policy_on_pod_conditions_pattern.rst b/doc/source/kubernetes.test.test_v1_pod_failure_policy_on_pod_conditions_pattern.rst deleted file mode 100644 index 5813888866..0000000000 --- a/doc/source/kubernetes.test.test_v1_pod_failure_policy_on_pod_conditions_pattern.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_pod\_failure\_policy\_on\_pod\_conditions\_pattern module -=================================================================================== - -.. automodule:: kubernetes.test.test_v1_pod_failure_policy_on_pod_conditions_pattern - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_pod_failure_policy_rule.rst b/doc/source/kubernetes.test.test_v1_pod_failure_policy_rule.rst deleted file mode 100644 index 444010149c..0000000000 --- a/doc/source/kubernetes.test.test_v1_pod_failure_policy_rule.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_pod\_failure\_policy\_rule module -=========================================================== - -.. automodule:: kubernetes.test.test_v1_pod_failure_policy_rule - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_pod_ip.rst b/doc/source/kubernetes.test.test_v1_pod_ip.rst deleted file mode 100644 index 8a1950ae48..0000000000 --- a/doc/source/kubernetes.test.test_v1_pod_ip.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_pod\_ip module -======================================== - -.. automodule:: kubernetes.test.test_v1_pod_ip - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_pod_list.rst b/doc/source/kubernetes.test.test_v1_pod_list.rst deleted file mode 100644 index 183291ceb1..0000000000 --- a/doc/source/kubernetes.test.test_v1_pod_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_pod\_list module -========================================== - -.. automodule:: kubernetes.test.test_v1_pod_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_pod_os.rst b/doc/source/kubernetes.test.test_v1_pod_os.rst deleted file mode 100644 index 43ec6d8adf..0000000000 --- a/doc/source/kubernetes.test.test_v1_pod_os.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_pod\_os module -======================================== - -.. automodule:: kubernetes.test.test_v1_pod_os - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_pod_readiness_gate.rst b/doc/source/kubernetes.test.test_v1_pod_readiness_gate.rst deleted file mode 100644 index 706aa211a7..0000000000 --- a/doc/source/kubernetes.test.test_v1_pod_readiness_gate.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_pod\_readiness\_gate module -===================================================== - -.. automodule:: kubernetes.test.test_v1_pod_readiness_gate - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_pod_resource_claim.rst b/doc/source/kubernetes.test.test_v1_pod_resource_claim.rst deleted file mode 100644 index 4055e14a35..0000000000 --- a/doc/source/kubernetes.test.test_v1_pod_resource_claim.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_pod\_resource\_claim module -===================================================== - -.. automodule:: kubernetes.test.test_v1_pod_resource_claim - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_pod_resource_claim_status.rst b/doc/source/kubernetes.test.test_v1_pod_resource_claim_status.rst deleted file mode 100644 index 45f845ee24..0000000000 --- a/doc/source/kubernetes.test.test_v1_pod_resource_claim_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_pod\_resource\_claim\_status module -============================================================= - -.. automodule:: kubernetes.test.test_v1_pod_resource_claim_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_pod_scheduling_gate.rst b/doc/source/kubernetes.test.test_v1_pod_scheduling_gate.rst deleted file mode 100644 index 03d6e53624..0000000000 --- a/doc/source/kubernetes.test.test_v1_pod_scheduling_gate.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_pod\_scheduling\_gate module -====================================================== - -.. automodule:: kubernetes.test.test_v1_pod_scheduling_gate - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_pod_security_context.rst b/doc/source/kubernetes.test.test_v1_pod_security_context.rst deleted file mode 100644 index 853a7c994f..0000000000 --- a/doc/source/kubernetes.test.test_v1_pod_security_context.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_pod\_security\_context module -======================================================= - -.. automodule:: kubernetes.test.test_v1_pod_security_context - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_pod_spec.rst b/doc/source/kubernetes.test.test_v1_pod_spec.rst deleted file mode 100644 index 0fb6fe8e36..0000000000 --- a/doc/source/kubernetes.test.test_v1_pod_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_pod\_spec module -========================================== - -.. automodule:: kubernetes.test.test_v1_pod_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_pod_status.rst b/doc/source/kubernetes.test.test_v1_pod_status.rst deleted file mode 100644 index a526615cb5..0000000000 --- a/doc/source/kubernetes.test.test_v1_pod_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_pod\_status module -============================================ - -.. automodule:: kubernetes.test.test_v1_pod_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_pod_template.rst b/doc/source/kubernetes.test.test_v1_pod_template.rst deleted file mode 100644 index c668b12ebb..0000000000 --- a/doc/source/kubernetes.test.test_v1_pod_template.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_pod\_template module -============================================== - -.. automodule:: kubernetes.test.test_v1_pod_template - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_pod_template_list.rst b/doc/source/kubernetes.test.test_v1_pod_template_list.rst deleted file mode 100644 index bfdbe0554b..0000000000 --- a/doc/source/kubernetes.test.test_v1_pod_template_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_pod\_template\_list module -==================================================== - -.. automodule:: kubernetes.test.test_v1_pod_template_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_pod_template_spec.rst b/doc/source/kubernetes.test.test_v1_pod_template_spec.rst deleted file mode 100644 index 0d10be177c..0000000000 --- a/doc/source/kubernetes.test.test_v1_pod_template_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_pod\_template\_spec module -==================================================== - -.. automodule:: kubernetes.test.test_v1_pod_template_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_policy_rule.rst b/doc/source/kubernetes.test.test_v1_policy_rule.rst deleted file mode 100644 index b3b54688d7..0000000000 --- a/doc/source/kubernetes.test.test_v1_policy_rule.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_policy\_rule module -============================================= - -.. automodule:: kubernetes.test.test_v1_policy_rule - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_policy_rules_with_subjects.rst b/doc/source/kubernetes.test.test_v1_policy_rules_with_subjects.rst deleted file mode 100644 index c3f4b58b83..0000000000 --- a/doc/source/kubernetes.test.test_v1_policy_rules_with_subjects.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_policy\_rules\_with\_subjects module -============================================================== - -.. automodule:: kubernetes.test.test_v1_policy_rules_with_subjects - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_port_status.rst b/doc/source/kubernetes.test.test_v1_port_status.rst deleted file mode 100644 index 8cc274d79d..0000000000 --- a/doc/source/kubernetes.test.test_v1_port_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_port\_status module -============================================= - -.. automodule:: kubernetes.test.test_v1_port_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_portworx_volume_source.rst b/doc/source/kubernetes.test.test_v1_portworx_volume_source.rst deleted file mode 100644 index 152cf96af2..0000000000 --- a/doc/source/kubernetes.test.test_v1_portworx_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_portworx\_volume\_source module -========================================================= - -.. automodule:: kubernetes.test.test_v1_portworx_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_preconditions.rst b/doc/source/kubernetes.test.test_v1_preconditions.rst deleted file mode 100644 index 248e1365d7..0000000000 --- a/doc/source/kubernetes.test.test_v1_preconditions.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_preconditions module -============================================== - -.. automodule:: kubernetes.test.test_v1_preconditions - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_preferred_scheduling_term.rst b/doc/source/kubernetes.test.test_v1_preferred_scheduling_term.rst deleted file mode 100644 index 252324f62c..0000000000 --- a/doc/source/kubernetes.test.test_v1_preferred_scheduling_term.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_preferred\_scheduling\_term module -============================================================ - -.. automodule:: kubernetes.test.test_v1_preferred_scheduling_term - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_priority_class.rst b/doc/source/kubernetes.test.test_v1_priority_class.rst deleted file mode 100644 index b9488638fe..0000000000 --- a/doc/source/kubernetes.test.test_v1_priority_class.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_priority\_class module -================================================ - -.. automodule:: kubernetes.test.test_v1_priority_class - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_priority_class_list.rst b/doc/source/kubernetes.test.test_v1_priority_class_list.rst deleted file mode 100644 index 9858a30467..0000000000 --- a/doc/source/kubernetes.test.test_v1_priority_class_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_priority\_class\_list module -====================================================== - -.. automodule:: kubernetes.test.test_v1_priority_class_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_priority_level_configuration.rst b/doc/source/kubernetes.test.test_v1_priority_level_configuration.rst deleted file mode 100644 index ba980f8a8f..0000000000 --- a/doc/source/kubernetes.test.test_v1_priority_level_configuration.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_priority\_level\_configuration module -=============================================================== - -.. automodule:: kubernetes.test.test_v1_priority_level_configuration - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_priority_level_configuration_condition.rst b/doc/source/kubernetes.test.test_v1_priority_level_configuration_condition.rst deleted file mode 100644 index 2f998a2fa3..0000000000 --- a/doc/source/kubernetes.test.test_v1_priority_level_configuration_condition.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_priority\_level\_configuration\_condition module -========================================================================== - -.. automodule:: kubernetes.test.test_v1_priority_level_configuration_condition - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_priority_level_configuration_list.rst b/doc/source/kubernetes.test.test_v1_priority_level_configuration_list.rst deleted file mode 100644 index c498760ac6..0000000000 --- a/doc/source/kubernetes.test.test_v1_priority_level_configuration_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_priority\_level\_configuration\_list module -===================================================================== - -.. automodule:: kubernetes.test.test_v1_priority_level_configuration_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_priority_level_configuration_reference.rst b/doc/source/kubernetes.test.test_v1_priority_level_configuration_reference.rst deleted file mode 100644 index f68980b5a8..0000000000 --- a/doc/source/kubernetes.test.test_v1_priority_level_configuration_reference.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_priority\_level\_configuration\_reference module -========================================================================== - -.. automodule:: kubernetes.test.test_v1_priority_level_configuration_reference - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_priority_level_configuration_spec.rst b/doc/source/kubernetes.test.test_v1_priority_level_configuration_spec.rst deleted file mode 100644 index ab5af29483..0000000000 --- a/doc/source/kubernetes.test.test_v1_priority_level_configuration_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_priority\_level\_configuration\_spec module -===================================================================== - -.. automodule:: kubernetes.test.test_v1_priority_level_configuration_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_priority_level_configuration_status.rst b/doc/source/kubernetes.test.test_v1_priority_level_configuration_status.rst deleted file mode 100644 index f9d52244d1..0000000000 --- a/doc/source/kubernetes.test.test_v1_priority_level_configuration_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_priority\_level\_configuration\_status module -======================================================================= - -.. automodule:: kubernetes.test.test_v1_priority_level_configuration_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_probe.rst b/doc/source/kubernetes.test.test_v1_probe.rst deleted file mode 100644 index ec85d3e169..0000000000 --- a/doc/source/kubernetes.test.test_v1_probe.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_probe module -====================================== - -.. automodule:: kubernetes.test.test_v1_probe - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_projected_volume_source.rst b/doc/source/kubernetes.test.test_v1_projected_volume_source.rst deleted file mode 100644 index 2e5619eb7a..0000000000 --- a/doc/source/kubernetes.test.test_v1_projected_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_projected\_volume\_source module -========================================================== - -.. automodule:: kubernetes.test.test_v1_projected_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_queuing_configuration.rst b/doc/source/kubernetes.test.test_v1_queuing_configuration.rst deleted file mode 100644 index 083a9c3058..0000000000 --- a/doc/source/kubernetes.test.test_v1_queuing_configuration.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_queuing\_configuration module -======================================================= - -.. automodule:: kubernetes.test.test_v1_queuing_configuration - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_quobyte_volume_source.rst b/doc/source/kubernetes.test.test_v1_quobyte_volume_source.rst deleted file mode 100644 index ca0e59ebd2..0000000000 --- a/doc/source/kubernetes.test.test_v1_quobyte_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_quobyte\_volume\_source module -======================================================== - -.. automodule:: kubernetes.test.test_v1_quobyte_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_rbd_persistent_volume_source.rst b/doc/source/kubernetes.test.test_v1_rbd_persistent_volume_source.rst deleted file mode 100644 index 6820646842..0000000000 --- a/doc/source/kubernetes.test.test_v1_rbd_persistent_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_rbd\_persistent\_volume\_source module -================================================================ - -.. automodule:: kubernetes.test.test_v1_rbd_persistent_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_rbd_volume_source.rst b/doc/source/kubernetes.test.test_v1_rbd_volume_source.rst deleted file mode 100644 index 2aafb79662..0000000000 --- a/doc/source/kubernetes.test.test_v1_rbd_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_rbd\_volume\_source module -==================================================== - -.. automodule:: kubernetes.test.test_v1_rbd_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_replica_set.rst b/doc/source/kubernetes.test.test_v1_replica_set.rst deleted file mode 100644 index 0062a94b8e..0000000000 --- a/doc/source/kubernetes.test.test_v1_replica_set.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_replica\_set module -============================================= - -.. automodule:: kubernetes.test.test_v1_replica_set - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_replica_set_condition.rst b/doc/source/kubernetes.test.test_v1_replica_set_condition.rst deleted file mode 100644 index cd006ba89d..0000000000 --- a/doc/source/kubernetes.test.test_v1_replica_set_condition.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_replica\_set\_condition module -======================================================== - -.. automodule:: kubernetes.test.test_v1_replica_set_condition - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_replica_set_list.rst b/doc/source/kubernetes.test.test_v1_replica_set_list.rst deleted file mode 100644 index 2b6ee2e792..0000000000 --- a/doc/source/kubernetes.test.test_v1_replica_set_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_replica\_set\_list module -=================================================== - -.. automodule:: kubernetes.test.test_v1_replica_set_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_replica_set_spec.rst b/doc/source/kubernetes.test.test_v1_replica_set_spec.rst deleted file mode 100644 index 7d8fb5e2da..0000000000 --- a/doc/source/kubernetes.test.test_v1_replica_set_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_replica\_set\_spec module -=================================================== - -.. automodule:: kubernetes.test.test_v1_replica_set_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_replica_set_status.rst b/doc/source/kubernetes.test.test_v1_replica_set_status.rst deleted file mode 100644 index 795510739b..0000000000 --- a/doc/source/kubernetes.test.test_v1_replica_set_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_replica\_set\_status module -===================================================== - -.. automodule:: kubernetes.test.test_v1_replica_set_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_replication_controller.rst b/doc/source/kubernetes.test.test_v1_replication_controller.rst deleted file mode 100644 index 31b9ffa6ea..0000000000 --- a/doc/source/kubernetes.test.test_v1_replication_controller.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_replication\_controller module -======================================================== - -.. automodule:: kubernetes.test.test_v1_replication_controller - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_replication_controller_condition.rst b/doc/source/kubernetes.test.test_v1_replication_controller_condition.rst deleted file mode 100644 index 344c6bb609..0000000000 --- a/doc/source/kubernetes.test.test_v1_replication_controller_condition.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_replication\_controller\_condition module -=================================================================== - -.. automodule:: kubernetes.test.test_v1_replication_controller_condition - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_replication_controller_list.rst b/doc/source/kubernetes.test.test_v1_replication_controller_list.rst deleted file mode 100644 index da20c5ffc5..0000000000 --- a/doc/source/kubernetes.test.test_v1_replication_controller_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_replication\_controller\_list module -============================================================== - -.. automodule:: kubernetes.test.test_v1_replication_controller_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_replication_controller_spec.rst b/doc/source/kubernetes.test.test_v1_replication_controller_spec.rst deleted file mode 100644 index 2aba16be33..0000000000 --- a/doc/source/kubernetes.test.test_v1_replication_controller_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_replication\_controller\_spec module -============================================================== - -.. automodule:: kubernetes.test.test_v1_replication_controller_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_replication_controller_status.rst b/doc/source/kubernetes.test.test_v1_replication_controller_status.rst deleted file mode 100644 index 1cca6d126f..0000000000 --- a/doc/source/kubernetes.test.test_v1_replication_controller_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_replication\_controller\_status module -================================================================ - -.. automodule:: kubernetes.test.test_v1_replication_controller_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_resource_attributes.rst b/doc/source/kubernetes.test.test_v1_resource_attributes.rst deleted file mode 100644 index 24f1a77cf1..0000000000 --- a/doc/source/kubernetes.test.test_v1_resource_attributes.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_resource\_attributes module -===================================================== - -.. automodule:: kubernetes.test.test_v1_resource_attributes - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_resource_claim.rst b/doc/source/kubernetes.test.test_v1_resource_claim.rst deleted file mode 100644 index 3dab0e3ea5..0000000000 --- a/doc/source/kubernetes.test.test_v1_resource_claim.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_resource\_claim module -================================================ - -.. automodule:: kubernetes.test.test_v1_resource_claim - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_resource_field_selector.rst b/doc/source/kubernetes.test.test_v1_resource_field_selector.rst deleted file mode 100644 index 9a37757b62..0000000000 --- a/doc/source/kubernetes.test.test_v1_resource_field_selector.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_resource\_field\_selector module -========================================================== - -.. automodule:: kubernetes.test.test_v1_resource_field_selector - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_resource_policy_rule.rst b/doc/source/kubernetes.test.test_v1_resource_policy_rule.rst deleted file mode 100644 index 78c882b10b..0000000000 --- a/doc/source/kubernetes.test.test_v1_resource_policy_rule.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_resource\_policy\_rule module -======================================================= - -.. automodule:: kubernetes.test.test_v1_resource_policy_rule - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_resource_quota.rst b/doc/source/kubernetes.test.test_v1_resource_quota.rst deleted file mode 100644 index 3acba15119..0000000000 --- a/doc/source/kubernetes.test.test_v1_resource_quota.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_resource\_quota module -================================================ - -.. automodule:: kubernetes.test.test_v1_resource_quota - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_resource_quota_list.rst b/doc/source/kubernetes.test.test_v1_resource_quota_list.rst deleted file mode 100644 index 082eead382..0000000000 --- a/doc/source/kubernetes.test.test_v1_resource_quota_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_resource\_quota\_list module -====================================================== - -.. automodule:: kubernetes.test.test_v1_resource_quota_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_resource_quota_spec.rst b/doc/source/kubernetes.test.test_v1_resource_quota_spec.rst deleted file mode 100644 index 84a0635fcc..0000000000 --- a/doc/source/kubernetes.test.test_v1_resource_quota_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_resource\_quota\_spec module -====================================================== - -.. automodule:: kubernetes.test.test_v1_resource_quota_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_resource_quota_status.rst b/doc/source/kubernetes.test.test_v1_resource_quota_status.rst deleted file mode 100644 index 72efbf5bec..0000000000 --- a/doc/source/kubernetes.test.test_v1_resource_quota_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_resource\_quota\_status module -======================================================== - -.. automodule:: kubernetes.test.test_v1_resource_quota_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_resource_requirements.rst b/doc/source/kubernetes.test.test_v1_resource_requirements.rst deleted file mode 100644 index 89ed75ff40..0000000000 --- a/doc/source/kubernetes.test.test_v1_resource_requirements.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_resource\_requirements module -======================================================= - -.. automodule:: kubernetes.test.test_v1_resource_requirements - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_resource_rule.rst b/doc/source/kubernetes.test.test_v1_resource_rule.rst deleted file mode 100644 index f28df6017a..0000000000 --- a/doc/source/kubernetes.test.test_v1_resource_rule.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_resource\_rule module -=============================================== - -.. automodule:: kubernetes.test.test_v1_resource_rule - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_role.rst b/doc/source/kubernetes.test.test_v1_role.rst deleted file mode 100644 index ce68d21176..0000000000 --- a/doc/source/kubernetes.test.test_v1_role.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_role module -===================================== - -.. automodule:: kubernetes.test.test_v1_role - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_role_binding.rst b/doc/source/kubernetes.test.test_v1_role_binding.rst deleted file mode 100644 index 20b875768b..0000000000 --- a/doc/source/kubernetes.test.test_v1_role_binding.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_role\_binding module -============================================== - -.. automodule:: kubernetes.test.test_v1_role_binding - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_role_binding_list.rst b/doc/source/kubernetes.test.test_v1_role_binding_list.rst deleted file mode 100644 index 14c8886be6..0000000000 --- a/doc/source/kubernetes.test.test_v1_role_binding_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_role\_binding\_list module -==================================================== - -.. automodule:: kubernetes.test.test_v1_role_binding_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_role_list.rst b/doc/source/kubernetes.test.test_v1_role_list.rst deleted file mode 100644 index 18d9929cfe..0000000000 --- a/doc/source/kubernetes.test.test_v1_role_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_role\_list module -=========================================== - -.. automodule:: kubernetes.test.test_v1_role_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_role_ref.rst b/doc/source/kubernetes.test.test_v1_role_ref.rst deleted file mode 100644 index 137f932104..0000000000 --- a/doc/source/kubernetes.test.test_v1_role_ref.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_role\_ref module -========================================== - -.. automodule:: kubernetes.test.test_v1_role_ref - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_rolling_update_daemon_set.rst b/doc/source/kubernetes.test.test_v1_rolling_update_daemon_set.rst deleted file mode 100644 index 0731840a36..0000000000 --- a/doc/source/kubernetes.test.test_v1_rolling_update_daemon_set.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_rolling\_update\_daemon\_set module -============================================================= - -.. automodule:: kubernetes.test.test_v1_rolling_update_daemon_set - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_rolling_update_deployment.rst b/doc/source/kubernetes.test.test_v1_rolling_update_deployment.rst deleted file mode 100644 index b9b10c24db..0000000000 --- a/doc/source/kubernetes.test.test_v1_rolling_update_deployment.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_rolling\_update\_deployment module -============================================================ - -.. automodule:: kubernetes.test.test_v1_rolling_update_deployment - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_rolling_update_stateful_set_strategy.rst b/doc/source/kubernetes.test.test_v1_rolling_update_stateful_set_strategy.rst deleted file mode 100644 index 7d662fe7f1..0000000000 --- a/doc/source/kubernetes.test.test_v1_rolling_update_stateful_set_strategy.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_rolling\_update\_stateful\_set\_strategy module -========================================================================= - -.. automodule:: kubernetes.test.test_v1_rolling_update_stateful_set_strategy - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_rule_with_operations.rst b/doc/source/kubernetes.test.test_v1_rule_with_operations.rst deleted file mode 100644 index aa7b997a51..0000000000 --- a/doc/source/kubernetes.test.test_v1_rule_with_operations.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_rule\_with\_operations module -======================================================= - -.. automodule:: kubernetes.test.test_v1_rule_with_operations - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_runtime_class.rst b/doc/source/kubernetes.test.test_v1_runtime_class.rst deleted file mode 100644 index 9cbaebe938..0000000000 --- a/doc/source/kubernetes.test.test_v1_runtime_class.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_runtime\_class module -=============================================== - -.. automodule:: kubernetes.test.test_v1_runtime_class - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_runtime_class_list.rst b/doc/source/kubernetes.test.test_v1_runtime_class_list.rst deleted file mode 100644 index e08a7e4314..0000000000 --- a/doc/source/kubernetes.test.test_v1_runtime_class_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_runtime\_class\_list module -===================================================== - -.. automodule:: kubernetes.test.test_v1_runtime_class_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_scale.rst b/doc/source/kubernetes.test.test_v1_scale.rst deleted file mode 100644 index 765d1b4fdf..0000000000 --- a/doc/source/kubernetes.test.test_v1_scale.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_scale module -====================================== - -.. automodule:: kubernetes.test.test_v1_scale - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_scale_io_persistent_volume_source.rst b/doc/source/kubernetes.test.test_v1_scale_io_persistent_volume_source.rst deleted file mode 100644 index e311084137..0000000000 --- a/doc/source/kubernetes.test.test_v1_scale_io_persistent_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_scale\_io\_persistent\_volume\_source module -====================================================================== - -.. automodule:: kubernetes.test.test_v1_scale_io_persistent_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_scale_io_volume_source.rst b/doc/source/kubernetes.test.test_v1_scale_io_volume_source.rst deleted file mode 100644 index 1c98299b09..0000000000 --- a/doc/source/kubernetes.test.test_v1_scale_io_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_scale\_io\_volume\_source module -========================================================== - -.. automodule:: kubernetes.test.test_v1_scale_io_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_scale_spec.rst b/doc/source/kubernetes.test.test_v1_scale_spec.rst deleted file mode 100644 index e239bcd1ec..0000000000 --- a/doc/source/kubernetes.test.test_v1_scale_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_scale\_spec module -============================================ - -.. automodule:: kubernetes.test.test_v1_scale_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_scale_status.rst b/doc/source/kubernetes.test.test_v1_scale_status.rst deleted file mode 100644 index 54b48cf5de..0000000000 --- a/doc/source/kubernetes.test.test_v1_scale_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_scale\_status module -============================================== - -.. automodule:: kubernetes.test.test_v1_scale_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_scheduling.rst b/doc/source/kubernetes.test.test_v1_scheduling.rst deleted file mode 100644 index 02d65fc199..0000000000 --- a/doc/source/kubernetes.test.test_v1_scheduling.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_scheduling module -=========================================== - -.. automodule:: kubernetes.test.test_v1_scheduling - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_scope_selector.rst b/doc/source/kubernetes.test.test_v1_scope_selector.rst deleted file mode 100644 index ebf9d1c614..0000000000 --- a/doc/source/kubernetes.test.test_v1_scope_selector.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_scope\_selector module -================================================ - -.. automodule:: kubernetes.test.test_v1_scope_selector - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_scoped_resource_selector_requirement.rst b/doc/source/kubernetes.test.test_v1_scoped_resource_selector_requirement.rst deleted file mode 100644 index 904c37e385..0000000000 --- a/doc/source/kubernetes.test.test_v1_scoped_resource_selector_requirement.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_scoped\_resource\_selector\_requirement module -======================================================================== - -.. automodule:: kubernetes.test.test_v1_scoped_resource_selector_requirement - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_se_linux_options.rst b/doc/source/kubernetes.test.test_v1_se_linux_options.rst deleted file mode 100644 index 76d48f8e7d..0000000000 --- a/doc/source/kubernetes.test.test_v1_se_linux_options.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_se\_linux\_options module -=================================================== - -.. automodule:: kubernetes.test.test_v1_se_linux_options - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_seccomp_profile.rst b/doc/source/kubernetes.test.test_v1_seccomp_profile.rst deleted file mode 100644 index dd15d1cd2a..0000000000 --- a/doc/source/kubernetes.test.test_v1_seccomp_profile.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_seccomp\_profile module -================================================= - -.. automodule:: kubernetes.test.test_v1_seccomp_profile - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_secret.rst b/doc/source/kubernetes.test.test_v1_secret.rst deleted file mode 100644 index 18db219a10..0000000000 --- a/doc/source/kubernetes.test.test_v1_secret.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_secret module -======================================= - -.. automodule:: kubernetes.test.test_v1_secret - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_secret_env_source.rst b/doc/source/kubernetes.test.test_v1_secret_env_source.rst deleted file mode 100644 index 86d0f9430e..0000000000 --- a/doc/source/kubernetes.test.test_v1_secret_env_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_secret\_env\_source module -==================================================== - -.. automodule:: kubernetes.test.test_v1_secret_env_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_secret_key_selector.rst b/doc/source/kubernetes.test.test_v1_secret_key_selector.rst deleted file mode 100644 index 8da115339a..0000000000 --- a/doc/source/kubernetes.test.test_v1_secret_key_selector.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_secret\_key\_selector module -====================================================== - -.. automodule:: kubernetes.test.test_v1_secret_key_selector - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_secret_list.rst b/doc/source/kubernetes.test.test_v1_secret_list.rst deleted file mode 100644 index 7c84e3da3a..0000000000 --- a/doc/source/kubernetes.test.test_v1_secret_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_secret\_list module -============================================= - -.. automodule:: kubernetes.test.test_v1_secret_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_secret_projection.rst b/doc/source/kubernetes.test.test_v1_secret_projection.rst deleted file mode 100644 index fb94ca2415..0000000000 --- a/doc/source/kubernetes.test.test_v1_secret_projection.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_secret\_projection module -=================================================== - -.. automodule:: kubernetes.test.test_v1_secret_projection - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_secret_reference.rst b/doc/source/kubernetes.test.test_v1_secret_reference.rst deleted file mode 100644 index 73dcd8f857..0000000000 --- a/doc/source/kubernetes.test.test_v1_secret_reference.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_secret\_reference module -================================================== - -.. automodule:: kubernetes.test.test_v1_secret_reference - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_secret_volume_source.rst b/doc/source/kubernetes.test.test_v1_secret_volume_source.rst deleted file mode 100644 index 41c7ea2c4f..0000000000 --- a/doc/source/kubernetes.test.test_v1_secret_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_secret\_volume\_source module -======================================================= - -.. automodule:: kubernetes.test.test_v1_secret_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_security_context.rst b/doc/source/kubernetes.test.test_v1_security_context.rst deleted file mode 100644 index 9882e91e8a..0000000000 --- a/doc/source/kubernetes.test.test_v1_security_context.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_security\_context module -================================================== - -.. automodule:: kubernetes.test.test_v1_security_context - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_selectable_field.rst b/doc/source/kubernetes.test.test_v1_selectable_field.rst deleted file mode 100644 index 309217368e..0000000000 --- a/doc/source/kubernetes.test.test_v1_selectable_field.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_selectable\_field module -================================================== - -.. automodule:: kubernetes.test.test_v1_selectable_field - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_self_subject_access_review.rst b/doc/source/kubernetes.test.test_v1_self_subject_access_review.rst deleted file mode 100644 index ecfcb2fecb..0000000000 --- a/doc/source/kubernetes.test.test_v1_self_subject_access_review.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_self\_subject\_access\_review module -============================================================== - -.. automodule:: kubernetes.test.test_v1_self_subject_access_review - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_self_subject_access_review_spec.rst b/doc/source/kubernetes.test.test_v1_self_subject_access_review_spec.rst deleted file mode 100644 index 7ce8222838..0000000000 --- a/doc/source/kubernetes.test.test_v1_self_subject_access_review_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_self\_subject\_access\_review\_spec module -==================================================================== - -.. automodule:: kubernetes.test.test_v1_self_subject_access_review_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_self_subject_review.rst b/doc/source/kubernetes.test.test_v1_self_subject_review.rst deleted file mode 100644 index 6d00b9d9de..0000000000 --- a/doc/source/kubernetes.test.test_v1_self_subject_review.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_self\_subject\_review module -====================================================== - -.. automodule:: kubernetes.test.test_v1_self_subject_review - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_self_subject_review_status.rst b/doc/source/kubernetes.test.test_v1_self_subject_review_status.rst deleted file mode 100644 index 10a43385c0..0000000000 --- a/doc/source/kubernetes.test.test_v1_self_subject_review_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_self\_subject\_review\_status module -============================================================== - -.. automodule:: kubernetes.test.test_v1_self_subject_review_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_self_subject_rules_review.rst b/doc/source/kubernetes.test.test_v1_self_subject_rules_review.rst deleted file mode 100644 index b88f6237d8..0000000000 --- a/doc/source/kubernetes.test.test_v1_self_subject_rules_review.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_self\_subject\_rules\_review module -============================================================= - -.. automodule:: kubernetes.test.test_v1_self_subject_rules_review - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_self_subject_rules_review_spec.rst b/doc/source/kubernetes.test.test_v1_self_subject_rules_review_spec.rst deleted file mode 100644 index c076f5a591..0000000000 --- a/doc/source/kubernetes.test.test_v1_self_subject_rules_review_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_self\_subject\_rules\_review\_spec module -=================================================================== - -.. automodule:: kubernetes.test.test_v1_self_subject_rules_review_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_server_address_by_client_cidr.rst b/doc/source/kubernetes.test.test_v1_server_address_by_client_cidr.rst deleted file mode 100644 index dd7254350a..0000000000 --- a/doc/source/kubernetes.test.test_v1_server_address_by_client_cidr.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_server\_address\_by\_client\_cidr module -================================================================== - -.. automodule:: kubernetes.test.test_v1_server_address_by_client_cidr - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_service.rst b/doc/source/kubernetes.test.test_v1_service.rst deleted file mode 100644 index a0dbbdbd59..0000000000 --- a/doc/source/kubernetes.test.test_v1_service.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_service module -======================================== - -.. automodule:: kubernetes.test.test_v1_service - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_service_account.rst b/doc/source/kubernetes.test.test_v1_service_account.rst deleted file mode 100644 index 9ac70cc27a..0000000000 --- a/doc/source/kubernetes.test.test_v1_service_account.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_service\_account module -================================================= - -.. automodule:: kubernetes.test.test_v1_service_account - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_service_account_list.rst b/doc/source/kubernetes.test.test_v1_service_account_list.rst deleted file mode 100644 index d22c23df32..0000000000 --- a/doc/source/kubernetes.test.test_v1_service_account_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_service\_account\_list module -======================================================= - -.. automodule:: kubernetes.test.test_v1_service_account_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_service_account_subject.rst b/doc/source/kubernetes.test.test_v1_service_account_subject.rst deleted file mode 100644 index 27ec7a6ddf..0000000000 --- a/doc/source/kubernetes.test.test_v1_service_account_subject.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_service\_account\_subject module -========================================================== - -.. automodule:: kubernetes.test.test_v1_service_account_subject - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_service_account_token_projection.rst b/doc/source/kubernetes.test.test_v1_service_account_token_projection.rst deleted file mode 100644 index 1a8f146a83..0000000000 --- a/doc/source/kubernetes.test.test_v1_service_account_token_projection.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_service\_account\_token\_projection module -==================================================================== - -.. automodule:: kubernetes.test.test_v1_service_account_token_projection - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_service_backend_port.rst b/doc/source/kubernetes.test.test_v1_service_backend_port.rst deleted file mode 100644 index 047b3ea4c5..0000000000 --- a/doc/source/kubernetes.test.test_v1_service_backend_port.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_service\_backend\_port module -======================================================= - -.. automodule:: kubernetes.test.test_v1_service_backend_port - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_service_list.rst b/doc/source/kubernetes.test.test_v1_service_list.rst deleted file mode 100644 index d4d2051426..0000000000 --- a/doc/source/kubernetes.test.test_v1_service_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_service\_list module -============================================== - -.. automodule:: kubernetes.test.test_v1_service_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_service_port.rst b/doc/source/kubernetes.test.test_v1_service_port.rst deleted file mode 100644 index acdd375704..0000000000 --- a/doc/source/kubernetes.test.test_v1_service_port.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_service\_port module -============================================== - -.. automodule:: kubernetes.test.test_v1_service_port - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_service_spec.rst b/doc/source/kubernetes.test.test_v1_service_spec.rst deleted file mode 100644 index b25007af79..0000000000 --- a/doc/source/kubernetes.test.test_v1_service_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_service\_spec module -============================================== - -.. automodule:: kubernetes.test.test_v1_service_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_service_status.rst b/doc/source/kubernetes.test.test_v1_service_status.rst deleted file mode 100644 index 2bc87ce9c3..0000000000 --- a/doc/source/kubernetes.test.test_v1_service_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_service\_status module -================================================ - -.. automodule:: kubernetes.test.test_v1_service_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_session_affinity_config.rst b/doc/source/kubernetes.test.test_v1_session_affinity_config.rst deleted file mode 100644 index 5a1526c2c4..0000000000 --- a/doc/source/kubernetes.test.test_v1_session_affinity_config.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_session\_affinity\_config module -========================================================== - -.. automodule:: kubernetes.test.test_v1_session_affinity_config - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_sleep_action.rst b/doc/source/kubernetes.test.test_v1_sleep_action.rst deleted file mode 100644 index 7215bc3a1f..0000000000 --- a/doc/source/kubernetes.test.test_v1_sleep_action.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_sleep\_action module -============================================== - -.. automodule:: kubernetes.test.test_v1_sleep_action - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_stateful_set.rst b/doc/source/kubernetes.test.test_v1_stateful_set.rst deleted file mode 100644 index 7ac81e68a0..0000000000 --- a/doc/source/kubernetes.test.test_v1_stateful_set.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_stateful\_set module -============================================== - -.. automodule:: kubernetes.test.test_v1_stateful_set - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_stateful_set_condition.rst b/doc/source/kubernetes.test.test_v1_stateful_set_condition.rst deleted file mode 100644 index 3fb443a80f..0000000000 --- a/doc/source/kubernetes.test.test_v1_stateful_set_condition.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_stateful\_set\_condition module -========================================================= - -.. automodule:: kubernetes.test.test_v1_stateful_set_condition - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_stateful_set_list.rst b/doc/source/kubernetes.test.test_v1_stateful_set_list.rst deleted file mode 100644 index 9e3cf5a806..0000000000 --- a/doc/source/kubernetes.test.test_v1_stateful_set_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_stateful\_set\_list module -==================================================== - -.. automodule:: kubernetes.test.test_v1_stateful_set_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_stateful_set_ordinals.rst b/doc/source/kubernetes.test.test_v1_stateful_set_ordinals.rst deleted file mode 100644 index f041081bf7..0000000000 --- a/doc/source/kubernetes.test.test_v1_stateful_set_ordinals.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_stateful\_set\_ordinals module -======================================================== - -.. automodule:: kubernetes.test.test_v1_stateful_set_ordinals - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_stateful_set_persistent_volume_claim_retention_policy.rst b/doc/source/kubernetes.test.test_v1_stateful_set_persistent_volume_claim_retention_policy.rst deleted file mode 100644 index 4ac3b79478..0000000000 --- a/doc/source/kubernetes.test.test_v1_stateful_set_persistent_volume_claim_retention_policy.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_stateful\_set\_persistent\_volume\_claim\_retention\_policy module -============================================================================================ - -.. automodule:: kubernetes.test.test_v1_stateful_set_persistent_volume_claim_retention_policy - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_stateful_set_spec.rst b/doc/source/kubernetes.test.test_v1_stateful_set_spec.rst deleted file mode 100644 index 6a3102f6e2..0000000000 --- a/doc/source/kubernetes.test.test_v1_stateful_set_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_stateful\_set\_spec module -==================================================== - -.. automodule:: kubernetes.test.test_v1_stateful_set_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_stateful_set_status.rst b/doc/source/kubernetes.test.test_v1_stateful_set_status.rst deleted file mode 100644 index c86a7e2137..0000000000 --- a/doc/source/kubernetes.test.test_v1_stateful_set_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_stateful\_set\_status module -====================================================== - -.. automodule:: kubernetes.test.test_v1_stateful_set_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_stateful_set_update_strategy.rst b/doc/source/kubernetes.test.test_v1_stateful_set_update_strategy.rst deleted file mode 100644 index 5398f5f317..0000000000 --- a/doc/source/kubernetes.test.test_v1_stateful_set_update_strategy.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_stateful\_set\_update\_strategy module -================================================================ - -.. automodule:: kubernetes.test.test_v1_stateful_set_update_strategy - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_status.rst b/doc/source/kubernetes.test.test_v1_status.rst deleted file mode 100644 index 6770a8d58a..0000000000 --- a/doc/source/kubernetes.test.test_v1_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_status module -======================================= - -.. automodule:: kubernetes.test.test_v1_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_status_cause.rst b/doc/source/kubernetes.test.test_v1_status_cause.rst deleted file mode 100644 index 8cd09ca3b0..0000000000 --- a/doc/source/kubernetes.test.test_v1_status_cause.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_status\_cause module -============================================== - -.. automodule:: kubernetes.test.test_v1_status_cause - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_status_details.rst b/doc/source/kubernetes.test.test_v1_status_details.rst deleted file mode 100644 index f1a880d82b..0000000000 --- a/doc/source/kubernetes.test.test_v1_status_details.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_status\_details module -================================================ - -.. automodule:: kubernetes.test.test_v1_status_details - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_storage_class.rst b/doc/source/kubernetes.test.test_v1_storage_class.rst deleted file mode 100644 index 3422d66395..0000000000 --- a/doc/source/kubernetes.test.test_v1_storage_class.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_storage\_class module -=============================================== - -.. automodule:: kubernetes.test.test_v1_storage_class - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_storage_class_list.rst b/doc/source/kubernetes.test.test_v1_storage_class_list.rst deleted file mode 100644 index d8e6704aab..0000000000 --- a/doc/source/kubernetes.test.test_v1_storage_class_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_storage\_class\_list module -===================================================== - -.. automodule:: kubernetes.test.test_v1_storage_class_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_storage_os_persistent_volume_source.rst b/doc/source/kubernetes.test.test_v1_storage_os_persistent_volume_source.rst deleted file mode 100644 index 62330ca308..0000000000 --- a/doc/source/kubernetes.test.test_v1_storage_os_persistent_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_storage\_os\_persistent\_volume\_source module -======================================================================== - -.. automodule:: kubernetes.test.test_v1_storage_os_persistent_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_storage_os_volume_source.rst b/doc/source/kubernetes.test.test_v1_storage_os_volume_source.rst deleted file mode 100644 index 3e6585fbd8..0000000000 --- a/doc/source/kubernetes.test.test_v1_storage_os_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_storage\_os\_volume\_source module -============================================================ - -.. automodule:: kubernetes.test.test_v1_storage_os_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_subject_access_review.rst b/doc/source/kubernetes.test.test_v1_subject_access_review.rst deleted file mode 100644 index e351b7bc33..0000000000 --- a/doc/source/kubernetes.test.test_v1_subject_access_review.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_subject\_access\_review module -======================================================== - -.. automodule:: kubernetes.test.test_v1_subject_access_review - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_subject_access_review_spec.rst b/doc/source/kubernetes.test.test_v1_subject_access_review_spec.rst deleted file mode 100644 index 749cdb08c6..0000000000 --- a/doc/source/kubernetes.test.test_v1_subject_access_review_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_subject\_access\_review\_spec module -============================================================== - -.. automodule:: kubernetes.test.test_v1_subject_access_review_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_subject_access_review_status.rst b/doc/source/kubernetes.test.test_v1_subject_access_review_status.rst deleted file mode 100644 index 4f752d1e4c..0000000000 --- a/doc/source/kubernetes.test.test_v1_subject_access_review_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_subject\_access\_review\_status module -================================================================ - -.. automodule:: kubernetes.test.test_v1_subject_access_review_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_subject_rules_review_status.rst b/doc/source/kubernetes.test.test_v1_subject_rules_review_status.rst deleted file mode 100644 index af503fcd30..0000000000 --- a/doc/source/kubernetes.test.test_v1_subject_rules_review_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_subject\_rules\_review\_status module -=============================================================== - -.. automodule:: kubernetes.test.test_v1_subject_rules_review_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_success_policy.rst b/doc/source/kubernetes.test.test_v1_success_policy.rst deleted file mode 100644 index e504240064..0000000000 --- a/doc/source/kubernetes.test.test_v1_success_policy.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_success\_policy module -================================================ - -.. automodule:: kubernetes.test.test_v1_success_policy - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_success_policy_rule.rst b/doc/source/kubernetes.test.test_v1_success_policy_rule.rst deleted file mode 100644 index 15d7eb5f75..0000000000 --- a/doc/source/kubernetes.test.test_v1_success_policy_rule.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_success\_policy\_rule module -====================================================== - -.. automodule:: kubernetes.test.test_v1_success_policy_rule - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_sysctl.rst b/doc/source/kubernetes.test.test_v1_sysctl.rst deleted file mode 100644 index 39b90584da..0000000000 --- a/doc/source/kubernetes.test.test_v1_sysctl.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_sysctl module -======================================= - -.. automodule:: kubernetes.test.test_v1_sysctl - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_taint.rst b/doc/source/kubernetes.test.test_v1_taint.rst deleted file mode 100644 index d2fe2ae34c..0000000000 --- a/doc/source/kubernetes.test.test_v1_taint.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_taint module -====================================== - -.. automodule:: kubernetes.test.test_v1_taint - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_tcp_socket_action.rst b/doc/source/kubernetes.test.test_v1_tcp_socket_action.rst deleted file mode 100644 index cab3421775..0000000000 --- a/doc/source/kubernetes.test.test_v1_tcp_socket_action.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_tcp\_socket\_action module -==================================================== - -.. automodule:: kubernetes.test.test_v1_tcp_socket_action - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_token_request_spec.rst b/doc/source/kubernetes.test.test_v1_token_request_spec.rst deleted file mode 100644 index 398732512c..0000000000 --- a/doc/source/kubernetes.test.test_v1_token_request_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_token\_request\_spec module -===================================================== - -.. automodule:: kubernetes.test.test_v1_token_request_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_token_request_status.rst b/doc/source/kubernetes.test.test_v1_token_request_status.rst deleted file mode 100644 index be19c3ed49..0000000000 --- a/doc/source/kubernetes.test.test_v1_token_request_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_token\_request\_status module -======================================================= - -.. automodule:: kubernetes.test.test_v1_token_request_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_token_review.rst b/doc/source/kubernetes.test.test_v1_token_review.rst deleted file mode 100644 index a9daf34cab..0000000000 --- a/doc/source/kubernetes.test.test_v1_token_review.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_token\_review module -============================================== - -.. automodule:: kubernetes.test.test_v1_token_review - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_token_review_spec.rst b/doc/source/kubernetes.test.test_v1_token_review_spec.rst deleted file mode 100644 index 533d830f9b..0000000000 --- a/doc/source/kubernetes.test.test_v1_token_review_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_token\_review\_spec module -==================================================== - -.. automodule:: kubernetes.test.test_v1_token_review_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_token_review_status.rst b/doc/source/kubernetes.test.test_v1_token_review_status.rst deleted file mode 100644 index f95379dd14..0000000000 --- a/doc/source/kubernetes.test.test_v1_token_review_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_token\_review\_status module -====================================================== - -.. automodule:: kubernetes.test.test_v1_token_review_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_toleration.rst b/doc/source/kubernetes.test.test_v1_toleration.rst deleted file mode 100644 index 3b5cc6dd9d..0000000000 --- a/doc/source/kubernetes.test.test_v1_toleration.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_toleration module -=========================================== - -.. automodule:: kubernetes.test.test_v1_toleration - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_topology_selector_label_requirement.rst b/doc/source/kubernetes.test.test_v1_topology_selector_label_requirement.rst deleted file mode 100644 index 18a513e7fa..0000000000 --- a/doc/source/kubernetes.test.test_v1_topology_selector_label_requirement.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_topology\_selector\_label\_requirement module -======================================================================= - -.. automodule:: kubernetes.test.test_v1_topology_selector_label_requirement - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_topology_selector_term.rst b/doc/source/kubernetes.test.test_v1_topology_selector_term.rst deleted file mode 100644 index 9507d5d24e..0000000000 --- a/doc/source/kubernetes.test.test_v1_topology_selector_term.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_topology\_selector\_term module -========================================================= - -.. automodule:: kubernetes.test.test_v1_topology_selector_term - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_topology_spread_constraint.rst b/doc/source/kubernetes.test.test_v1_topology_spread_constraint.rst deleted file mode 100644 index b1d67edc0e..0000000000 --- a/doc/source/kubernetes.test.test_v1_topology_spread_constraint.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_topology\_spread\_constraint module -============================================================= - -.. automodule:: kubernetes.test.test_v1_topology_spread_constraint - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_type_checking.rst b/doc/source/kubernetes.test.test_v1_type_checking.rst deleted file mode 100644 index 213aec7773..0000000000 --- a/doc/source/kubernetes.test.test_v1_type_checking.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_type\_checking module -=============================================== - -.. automodule:: kubernetes.test.test_v1_type_checking - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_typed_local_object_reference.rst b/doc/source/kubernetes.test.test_v1_typed_local_object_reference.rst deleted file mode 100644 index f6b798ec43..0000000000 --- a/doc/source/kubernetes.test.test_v1_typed_local_object_reference.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_typed\_local\_object\_reference module -================================================================ - -.. automodule:: kubernetes.test.test_v1_typed_local_object_reference - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_typed_object_reference.rst b/doc/source/kubernetes.test.test_v1_typed_object_reference.rst deleted file mode 100644 index 55f3c1a5d8..0000000000 --- a/doc/source/kubernetes.test.test_v1_typed_object_reference.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_typed\_object\_reference module -========================================================= - -.. automodule:: kubernetes.test.test_v1_typed_object_reference - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_uncounted_terminated_pods.rst b/doc/source/kubernetes.test.test_v1_uncounted_terminated_pods.rst deleted file mode 100644 index aff4aba046..0000000000 --- a/doc/source/kubernetes.test.test_v1_uncounted_terminated_pods.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_uncounted\_terminated\_pods module -============================================================ - -.. automodule:: kubernetes.test.test_v1_uncounted_terminated_pods - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_user_info.rst b/doc/source/kubernetes.test.test_v1_user_info.rst deleted file mode 100644 index ac25a6826f..0000000000 --- a/doc/source/kubernetes.test.test_v1_user_info.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_user\_info module -=========================================== - -.. automodule:: kubernetes.test.test_v1_user_info - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_user_subject.rst b/doc/source/kubernetes.test.test_v1_user_subject.rst deleted file mode 100644 index 38c54960d4..0000000000 --- a/doc/source/kubernetes.test.test_v1_user_subject.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_user\_subject module -============================================== - -.. automodule:: kubernetes.test.test_v1_user_subject - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_validating_admission_policy.rst b/doc/source/kubernetes.test.test_v1_validating_admission_policy.rst deleted file mode 100644 index 31d9fde15d..0000000000 --- a/doc/source/kubernetes.test.test_v1_validating_admission_policy.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_validating\_admission\_policy module -============================================================== - -.. automodule:: kubernetes.test.test_v1_validating_admission_policy - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_validating_admission_policy_binding.rst b/doc/source/kubernetes.test.test_v1_validating_admission_policy_binding.rst deleted file mode 100644 index a387633e15..0000000000 --- a/doc/source/kubernetes.test.test_v1_validating_admission_policy_binding.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_validating\_admission\_policy\_binding module -======================================================================= - -.. automodule:: kubernetes.test.test_v1_validating_admission_policy_binding - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_validating_admission_policy_binding_list.rst b/doc/source/kubernetes.test.test_v1_validating_admission_policy_binding_list.rst deleted file mode 100644 index 1bbef3f4f1..0000000000 --- a/doc/source/kubernetes.test.test_v1_validating_admission_policy_binding_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_validating\_admission\_policy\_binding\_list module -============================================================================= - -.. automodule:: kubernetes.test.test_v1_validating_admission_policy_binding_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_validating_admission_policy_binding_spec.rst b/doc/source/kubernetes.test.test_v1_validating_admission_policy_binding_spec.rst deleted file mode 100644 index c951e723ad..0000000000 --- a/doc/source/kubernetes.test.test_v1_validating_admission_policy_binding_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_validating\_admission\_policy\_binding\_spec module -============================================================================= - -.. automodule:: kubernetes.test.test_v1_validating_admission_policy_binding_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_validating_admission_policy_list.rst b/doc/source/kubernetes.test.test_v1_validating_admission_policy_list.rst deleted file mode 100644 index 136ea8eec9..0000000000 --- a/doc/source/kubernetes.test.test_v1_validating_admission_policy_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_validating\_admission\_policy\_list module -==================================================================== - -.. automodule:: kubernetes.test.test_v1_validating_admission_policy_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_validating_admission_policy_spec.rst b/doc/source/kubernetes.test.test_v1_validating_admission_policy_spec.rst deleted file mode 100644 index 3b6e593805..0000000000 --- a/doc/source/kubernetes.test.test_v1_validating_admission_policy_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_validating\_admission\_policy\_spec module -==================================================================== - -.. automodule:: kubernetes.test.test_v1_validating_admission_policy_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_validating_admission_policy_status.rst b/doc/source/kubernetes.test.test_v1_validating_admission_policy_status.rst deleted file mode 100644 index 1b8e0b482d..0000000000 --- a/doc/source/kubernetes.test.test_v1_validating_admission_policy_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_validating\_admission\_policy\_status module -====================================================================== - -.. automodule:: kubernetes.test.test_v1_validating_admission_policy_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_validating_webhook.rst b/doc/source/kubernetes.test.test_v1_validating_webhook.rst deleted file mode 100644 index 8c8a3f49ab..0000000000 --- a/doc/source/kubernetes.test.test_v1_validating_webhook.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_validating\_webhook module -==================================================== - -.. automodule:: kubernetes.test.test_v1_validating_webhook - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_validating_webhook_configuration.rst b/doc/source/kubernetes.test.test_v1_validating_webhook_configuration.rst deleted file mode 100644 index 44b98c9653..0000000000 --- a/doc/source/kubernetes.test.test_v1_validating_webhook_configuration.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_validating\_webhook\_configuration module -=================================================================== - -.. automodule:: kubernetes.test.test_v1_validating_webhook_configuration - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_validating_webhook_configuration_list.rst b/doc/source/kubernetes.test.test_v1_validating_webhook_configuration_list.rst deleted file mode 100644 index e66947904e..0000000000 --- a/doc/source/kubernetes.test.test_v1_validating_webhook_configuration_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_validating\_webhook\_configuration\_list module -========================================================================= - -.. automodule:: kubernetes.test.test_v1_validating_webhook_configuration_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_validation.rst b/doc/source/kubernetes.test.test_v1_validation.rst deleted file mode 100644 index cb78e22ac4..0000000000 --- a/doc/source/kubernetes.test.test_v1_validation.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_validation module -=========================================== - -.. automodule:: kubernetes.test.test_v1_validation - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_validation_rule.rst b/doc/source/kubernetes.test.test_v1_validation_rule.rst deleted file mode 100644 index a57eb2dae5..0000000000 --- a/doc/source/kubernetes.test.test_v1_validation_rule.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_validation\_rule module -================================================= - -.. automodule:: kubernetes.test.test_v1_validation_rule - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_variable.rst b/doc/source/kubernetes.test.test_v1_variable.rst deleted file mode 100644 index 21a6e6c255..0000000000 --- a/doc/source/kubernetes.test.test_v1_variable.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_variable module -========================================= - -.. automodule:: kubernetes.test.test_v1_variable - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_volume.rst b/doc/source/kubernetes.test.test_v1_volume.rst deleted file mode 100644 index 99b0d97e6b..0000000000 --- a/doc/source/kubernetes.test.test_v1_volume.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_volume module -======================================= - -.. automodule:: kubernetes.test.test_v1_volume - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_volume_attachment.rst b/doc/source/kubernetes.test.test_v1_volume_attachment.rst deleted file mode 100644 index 618b14b19a..0000000000 --- a/doc/source/kubernetes.test.test_v1_volume_attachment.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_volume\_attachment module -=================================================== - -.. automodule:: kubernetes.test.test_v1_volume_attachment - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_volume_attachment_list.rst b/doc/source/kubernetes.test.test_v1_volume_attachment_list.rst deleted file mode 100644 index 5f408ba0c0..0000000000 --- a/doc/source/kubernetes.test.test_v1_volume_attachment_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_volume\_attachment\_list module -========================================================= - -.. automodule:: kubernetes.test.test_v1_volume_attachment_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_volume_attachment_source.rst b/doc/source/kubernetes.test.test_v1_volume_attachment_source.rst deleted file mode 100644 index 1758fd7689..0000000000 --- a/doc/source/kubernetes.test.test_v1_volume_attachment_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_volume\_attachment\_source module -=========================================================== - -.. automodule:: kubernetes.test.test_v1_volume_attachment_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_volume_attachment_spec.rst b/doc/source/kubernetes.test.test_v1_volume_attachment_spec.rst deleted file mode 100644 index b1bdf1703c..0000000000 --- a/doc/source/kubernetes.test.test_v1_volume_attachment_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_volume\_attachment\_spec module -========================================================= - -.. automodule:: kubernetes.test.test_v1_volume_attachment_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_volume_attachment_status.rst b/doc/source/kubernetes.test.test_v1_volume_attachment_status.rst deleted file mode 100644 index efb871be77..0000000000 --- a/doc/source/kubernetes.test.test_v1_volume_attachment_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_volume\_attachment\_status module -=========================================================== - -.. automodule:: kubernetes.test.test_v1_volume_attachment_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_volume_device.rst b/doc/source/kubernetes.test.test_v1_volume_device.rst deleted file mode 100644 index ce823ae43f..0000000000 --- a/doc/source/kubernetes.test.test_v1_volume_device.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_volume\_device module -=============================================== - -.. automodule:: kubernetes.test.test_v1_volume_device - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_volume_error.rst b/doc/source/kubernetes.test.test_v1_volume_error.rst deleted file mode 100644 index b59e8fb207..0000000000 --- a/doc/source/kubernetes.test.test_v1_volume_error.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_volume\_error module -============================================== - -.. automodule:: kubernetes.test.test_v1_volume_error - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_volume_mount.rst b/doc/source/kubernetes.test.test_v1_volume_mount.rst deleted file mode 100644 index 14eced531a..0000000000 --- a/doc/source/kubernetes.test.test_v1_volume_mount.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_volume\_mount module -============================================== - -.. automodule:: kubernetes.test.test_v1_volume_mount - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_volume_mount_status.rst b/doc/source/kubernetes.test.test_v1_volume_mount_status.rst deleted file mode 100644 index f970da3eb8..0000000000 --- a/doc/source/kubernetes.test.test_v1_volume_mount_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_volume\_mount\_status module -====================================================== - -.. automodule:: kubernetes.test.test_v1_volume_mount_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_volume_node_affinity.rst b/doc/source/kubernetes.test.test_v1_volume_node_affinity.rst deleted file mode 100644 index 8eceddcdf8..0000000000 --- a/doc/source/kubernetes.test.test_v1_volume_node_affinity.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_volume\_node\_affinity module -======================================================= - -.. automodule:: kubernetes.test.test_v1_volume_node_affinity - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_volume_node_resources.rst b/doc/source/kubernetes.test.test_v1_volume_node_resources.rst deleted file mode 100644 index 5ea7b1c7f3..0000000000 --- a/doc/source/kubernetes.test.test_v1_volume_node_resources.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_volume\_node\_resources module -======================================================== - -.. automodule:: kubernetes.test.test_v1_volume_node_resources - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_volume_projection.rst b/doc/source/kubernetes.test.test_v1_volume_projection.rst deleted file mode 100644 index ee20583e6c..0000000000 --- a/doc/source/kubernetes.test.test_v1_volume_projection.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_volume\_projection module -=================================================== - -.. automodule:: kubernetes.test.test_v1_volume_projection - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_volume_resource_requirements.rst b/doc/source/kubernetes.test.test_v1_volume_resource_requirements.rst deleted file mode 100644 index 64762caa81..0000000000 --- a/doc/source/kubernetes.test.test_v1_volume_resource_requirements.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_volume\_resource\_requirements module -=============================================================== - -.. automodule:: kubernetes.test.test_v1_volume_resource_requirements - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_vsphere_virtual_disk_volume_source.rst b/doc/source/kubernetes.test.test_v1_vsphere_virtual_disk_volume_source.rst deleted file mode 100644 index c113243869..0000000000 --- a/doc/source/kubernetes.test.test_v1_vsphere_virtual_disk_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_vsphere\_virtual\_disk\_volume\_source module -======================================================================= - -.. automodule:: kubernetes.test.test_v1_vsphere_virtual_disk_volume_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_watch_event.rst b/doc/source/kubernetes.test.test_v1_watch_event.rst deleted file mode 100644 index e30e1b9358..0000000000 --- a/doc/source/kubernetes.test.test_v1_watch_event.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_watch\_event module -============================================= - -.. automodule:: kubernetes.test.test_v1_watch_event - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_webhook_conversion.rst b/doc/source/kubernetes.test.test_v1_webhook_conversion.rst deleted file mode 100644 index a7a5d264b5..0000000000 --- a/doc/source/kubernetes.test.test_v1_webhook_conversion.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_webhook\_conversion module -==================================================== - -.. automodule:: kubernetes.test.test_v1_webhook_conversion - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_weighted_pod_affinity_term.rst b/doc/source/kubernetes.test.test_v1_weighted_pod_affinity_term.rst deleted file mode 100644 index b2cd436dad..0000000000 --- a/doc/source/kubernetes.test.test_v1_weighted_pod_affinity_term.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_weighted\_pod\_affinity\_term module -============================================================== - -.. automodule:: kubernetes.test.test_v1_weighted_pod_affinity_term - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_windows_security_context_options.rst b/doc/source/kubernetes.test.test_v1_windows_security_context_options.rst deleted file mode 100644 index fb51113055..0000000000 --- a/doc/source/kubernetes.test.test_v1_windows_security_context_options.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_windows\_security\_context\_options module -==================================================================== - -.. automodule:: kubernetes.test.test_v1_windows_security_context_options - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha1_audit_annotation.rst b/doc/source/kubernetes.test.test_v1alpha1_audit_annotation.rst deleted file mode 100644 index e57919f1b8..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha1_audit_annotation.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha1\_audit\_annotation module -======================================================== - -.. automodule:: kubernetes.test.test_v1alpha1_audit_annotation - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha1_cluster_trust_bundle.rst b/doc/source/kubernetes.test.test_v1alpha1_cluster_trust_bundle.rst deleted file mode 100644 index c86ce44c35..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha1_cluster_trust_bundle.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha1\_cluster\_trust\_bundle module -============================================================= - -.. automodule:: kubernetes.test.test_v1alpha1_cluster_trust_bundle - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha1_cluster_trust_bundle_list.rst b/doc/source/kubernetes.test.test_v1alpha1_cluster_trust_bundle_list.rst deleted file mode 100644 index 8d1bfa3d7c..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha1_cluster_trust_bundle_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha1\_cluster\_trust\_bundle\_list module -=================================================================== - -.. automodule:: kubernetes.test.test_v1alpha1_cluster_trust_bundle_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha1_cluster_trust_bundle_spec.rst b/doc/source/kubernetes.test.test_v1alpha1_cluster_trust_bundle_spec.rst deleted file mode 100644 index 3277aae87b..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha1_cluster_trust_bundle_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha1\_cluster\_trust\_bundle\_spec module -=================================================================== - -.. automodule:: kubernetes.test.test_v1alpha1_cluster_trust_bundle_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha1_expression_warning.rst b/doc/source/kubernetes.test.test_v1alpha1_expression_warning.rst deleted file mode 100644 index d02a99f049..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha1_expression_warning.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha1\_expression\_warning module -========================================================== - -.. automodule:: kubernetes.test.test_v1alpha1_expression_warning - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha1_group_version_resource.rst b/doc/source/kubernetes.test.test_v1alpha1_group_version_resource.rst deleted file mode 100644 index 38ba2adddc..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha1_group_version_resource.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha1\_group\_version\_resource module -=============================================================== - -.. automodule:: kubernetes.test.test_v1alpha1_group_version_resource - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha1_ip_address.rst b/doc/source/kubernetes.test.test_v1alpha1_ip_address.rst deleted file mode 100644 index 3781f6a183..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha1_ip_address.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha1\_ip\_address module -================================================== - -.. automodule:: kubernetes.test.test_v1alpha1_ip_address - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha1_ip_address_list.rst b/doc/source/kubernetes.test.test_v1alpha1_ip_address_list.rst deleted file mode 100644 index 88b31e7fec..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha1_ip_address_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha1\_ip\_address\_list module -======================================================== - -.. automodule:: kubernetes.test.test_v1alpha1_ip_address_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha1_ip_address_spec.rst b/doc/source/kubernetes.test.test_v1alpha1_ip_address_spec.rst deleted file mode 100644 index d3a7c61091..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha1_ip_address_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha1\_ip\_address\_spec module -======================================================== - -.. automodule:: kubernetes.test.test_v1alpha1_ip_address_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha1_match_condition.rst b/doc/source/kubernetes.test.test_v1alpha1_match_condition.rst deleted file mode 100644 index 1949ea024a..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha1_match_condition.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha1\_match\_condition module -======================================================= - -.. automodule:: kubernetes.test.test_v1alpha1_match_condition - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha1_match_resources.rst b/doc/source/kubernetes.test.test_v1alpha1_match_resources.rst deleted file mode 100644 index 40c4f30dc8..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha1_match_resources.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha1\_match\_resources module -======================================================= - -.. automodule:: kubernetes.test.test_v1alpha1_match_resources - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha1_migration_condition.rst b/doc/source/kubernetes.test.test_v1alpha1_migration_condition.rst deleted file mode 100644 index 7430fc5f1d..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha1_migration_condition.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha1\_migration\_condition module -=========================================================== - -.. automodule:: kubernetes.test.test_v1alpha1_migration_condition - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha1_named_rule_with_operations.rst b/doc/source/kubernetes.test.test_v1alpha1_named_rule_with_operations.rst deleted file mode 100644 index fcb4f588e4..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha1_named_rule_with_operations.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha1\_named\_rule\_with\_operations module -==================================================================== - -.. automodule:: kubernetes.test.test_v1alpha1_named_rule_with_operations - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha1_param_kind.rst b/doc/source/kubernetes.test.test_v1alpha1_param_kind.rst deleted file mode 100644 index 3889747d01..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha1_param_kind.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha1\_param\_kind module -================================================== - -.. automodule:: kubernetes.test.test_v1alpha1_param_kind - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha1_param_ref.rst b/doc/source/kubernetes.test.test_v1alpha1_param_ref.rst deleted file mode 100644 index 80920d1698..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha1_param_ref.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha1\_param\_ref module -================================================= - -.. automodule:: kubernetes.test.test_v1alpha1_param_ref - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha1_parent_reference.rst b/doc/source/kubernetes.test.test_v1alpha1_parent_reference.rst deleted file mode 100644 index 5974f8b7a6..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha1_parent_reference.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha1\_parent\_reference module -======================================================== - -.. automodule:: kubernetes.test.test_v1alpha1_parent_reference - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha1_self_subject_review.rst b/doc/source/kubernetes.test.test_v1alpha1_self_subject_review.rst deleted file mode 100644 index 268b070b9f..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha1_self_subject_review.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha1\_self\_subject\_review module -============================================================ - -.. automodule:: kubernetes.test.test_v1alpha1_self_subject_review - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha1_self_subject_review_status.rst b/doc/source/kubernetes.test.test_v1alpha1_self_subject_review_status.rst deleted file mode 100644 index 53157a175e..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha1_self_subject_review_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha1\_self\_subject\_review\_status module -==================================================================== - -.. automodule:: kubernetes.test.test_v1alpha1_self_subject_review_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha1_server_storage_version.rst b/doc/source/kubernetes.test.test_v1alpha1_server_storage_version.rst deleted file mode 100644 index b4cbb415ce..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha1_server_storage_version.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha1\_server\_storage\_version module -=============================================================== - -.. automodule:: kubernetes.test.test_v1alpha1_server_storage_version - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha1_service_cidr.rst b/doc/source/kubernetes.test.test_v1alpha1_service_cidr.rst deleted file mode 100644 index 079d9667d2..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha1_service_cidr.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha1\_service\_cidr module -==================================================== - -.. automodule:: kubernetes.test.test_v1alpha1_service_cidr - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha1_service_cidr_list.rst b/doc/source/kubernetes.test.test_v1alpha1_service_cidr_list.rst deleted file mode 100644 index 36dd11163b..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha1_service_cidr_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha1\_service\_cidr\_list module -========================================================== - -.. automodule:: kubernetes.test.test_v1alpha1_service_cidr_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha1_service_cidr_spec.rst b/doc/source/kubernetes.test.test_v1alpha1_service_cidr_spec.rst deleted file mode 100644 index e79d6e4223..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha1_service_cidr_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha1\_service\_cidr\_spec module -========================================================== - -.. automodule:: kubernetes.test.test_v1alpha1_service_cidr_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha1_service_cidr_status.rst b/doc/source/kubernetes.test.test_v1alpha1_service_cidr_status.rst deleted file mode 100644 index 421bf77dfa..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha1_service_cidr_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha1\_service\_cidr\_status module -============================================================ - -.. automodule:: kubernetes.test.test_v1alpha1_service_cidr_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha1_storage_version.rst b/doc/source/kubernetes.test.test_v1alpha1_storage_version.rst deleted file mode 100644 index 6f27f8a8dd..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha1_storage_version.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha1\_storage\_version module -======================================================= - -.. automodule:: kubernetes.test.test_v1alpha1_storage_version - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha1_storage_version_condition.rst b/doc/source/kubernetes.test.test_v1alpha1_storage_version_condition.rst deleted file mode 100644 index ffe656f270..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha1_storage_version_condition.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha1\_storage\_version\_condition module -================================================================== - -.. automodule:: kubernetes.test.test_v1alpha1_storage_version_condition - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha1_storage_version_list.rst b/doc/source/kubernetes.test.test_v1alpha1_storage_version_list.rst deleted file mode 100644 index aece640bf6..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha1_storage_version_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha1\_storage\_version\_list module -============================================================= - -.. automodule:: kubernetes.test.test_v1alpha1_storage_version_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha1_storage_version_migration.rst b/doc/source/kubernetes.test.test_v1alpha1_storage_version_migration.rst deleted file mode 100644 index f5894417f5..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha1_storage_version_migration.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha1\_storage\_version\_migration module -================================================================== - -.. automodule:: kubernetes.test.test_v1alpha1_storage_version_migration - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha1_storage_version_migration_list.rst b/doc/source/kubernetes.test.test_v1alpha1_storage_version_migration_list.rst deleted file mode 100644 index 6a97141c7f..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha1_storage_version_migration_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha1\_storage\_version\_migration\_list module -======================================================================== - -.. automodule:: kubernetes.test.test_v1alpha1_storage_version_migration_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha1_storage_version_migration_spec.rst b/doc/source/kubernetes.test.test_v1alpha1_storage_version_migration_spec.rst deleted file mode 100644 index c02a96e768..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha1_storage_version_migration_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha1\_storage\_version\_migration\_spec module -======================================================================== - -.. automodule:: kubernetes.test.test_v1alpha1_storage_version_migration_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha1_storage_version_migration_status.rst b/doc/source/kubernetes.test.test_v1alpha1_storage_version_migration_status.rst deleted file mode 100644 index 5607ce3299..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha1_storage_version_migration_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha1\_storage\_version\_migration\_status module -========================================================================== - -.. automodule:: kubernetes.test.test_v1alpha1_storage_version_migration_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha1_storage_version_status.rst b/doc/source/kubernetes.test.test_v1alpha1_storage_version_status.rst deleted file mode 100644 index 186c26935a..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha1_storage_version_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha1\_storage\_version\_status module -=============================================================== - -.. automodule:: kubernetes.test.test_v1alpha1_storage_version_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha1_type_checking.rst b/doc/source/kubernetes.test.test_v1alpha1_type_checking.rst deleted file mode 100644 index 0597ce8de7..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha1_type_checking.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha1\_type\_checking module -===================================================== - -.. automodule:: kubernetes.test.test_v1alpha1_type_checking - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha1_validating_admission_policy.rst b/doc/source/kubernetes.test.test_v1alpha1_validating_admission_policy.rst deleted file mode 100644 index a518a812de..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha1_validating_admission_policy.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha1\_validating\_admission\_policy module -==================================================================== - -.. automodule:: kubernetes.test.test_v1alpha1_validating_admission_policy - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha1_validating_admission_policy_binding.rst b/doc/source/kubernetes.test.test_v1alpha1_validating_admission_policy_binding.rst deleted file mode 100644 index 6acece0703..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha1_validating_admission_policy_binding.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha1\_validating\_admission\_policy\_binding module -============================================================================= - -.. automodule:: kubernetes.test.test_v1alpha1_validating_admission_policy_binding - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha1_validating_admission_policy_binding_list.rst b/doc/source/kubernetes.test.test_v1alpha1_validating_admission_policy_binding_list.rst deleted file mode 100644 index 22fc7b7332..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha1_validating_admission_policy_binding_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha1\_validating\_admission\_policy\_binding\_list module -=================================================================================== - -.. automodule:: kubernetes.test.test_v1alpha1_validating_admission_policy_binding_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha1_validating_admission_policy_binding_spec.rst b/doc/source/kubernetes.test.test_v1alpha1_validating_admission_policy_binding_spec.rst deleted file mode 100644 index 5cfcaf0ebc..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha1_validating_admission_policy_binding_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha1\_validating\_admission\_policy\_binding\_spec module -=================================================================================== - -.. automodule:: kubernetes.test.test_v1alpha1_validating_admission_policy_binding_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha1_validating_admission_policy_list.rst b/doc/source/kubernetes.test.test_v1alpha1_validating_admission_policy_list.rst deleted file mode 100644 index ecf409e339..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha1_validating_admission_policy_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha1\_validating\_admission\_policy\_list module -========================================================================== - -.. automodule:: kubernetes.test.test_v1alpha1_validating_admission_policy_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha1_validating_admission_policy_spec.rst b/doc/source/kubernetes.test.test_v1alpha1_validating_admission_policy_spec.rst deleted file mode 100644 index 51e15869ef..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha1_validating_admission_policy_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha1\_validating\_admission\_policy\_spec module -========================================================================== - -.. automodule:: kubernetes.test.test_v1alpha1_validating_admission_policy_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha1_validating_admission_policy_status.rst b/doc/source/kubernetes.test.test_v1alpha1_validating_admission_policy_status.rst deleted file mode 100644 index affa88f13c..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha1_validating_admission_policy_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha1\_validating\_admission\_policy\_status module -============================================================================ - -.. automodule:: kubernetes.test.test_v1alpha1_validating_admission_policy_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha1_validation.rst b/doc/source/kubernetes.test.test_v1alpha1_validation.rst deleted file mode 100644 index 17af7eba75..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha1_validation.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha1\_validation module -================================================= - -.. automodule:: kubernetes.test.test_v1alpha1_validation - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha1_variable.rst b/doc/source/kubernetes.test.test_v1alpha1_variable.rst deleted file mode 100644 index a9d056c3b7..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha1_variable.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha1\_variable module -=============================================== - -.. automodule:: kubernetes.test.test_v1alpha1_variable - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha1_volume_attributes_class.rst b/doc/source/kubernetes.test.test_v1alpha1_volume_attributes_class.rst deleted file mode 100644 index dce282290d..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha1_volume_attributes_class.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha1\_volume\_attributes\_class module -================================================================ - -.. automodule:: kubernetes.test.test_v1alpha1_volume_attributes_class - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha1_volume_attributes_class_list.rst b/doc/source/kubernetes.test.test_v1alpha1_volume_attributes_class_list.rst deleted file mode 100644 index 76e6c74dab..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha1_volume_attributes_class_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha1\_volume\_attributes\_class\_list module -====================================================================== - -.. automodule:: kubernetes.test.test_v1alpha1_volume_attributes_class_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha2_allocation_result.rst b/doc/source/kubernetes.test.test_v1alpha2_allocation_result.rst deleted file mode 100644 index b999c795c1..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha2_allocation_result.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha2\_allocation\_result module -========================================================= - -.. automodule:: kubernetes.test.test_v1alpha2_allocation_result - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha2_driver_allocation_result.rst b/doc/source/kubernetes.test.test_v1alpha2_driver_allocation_result.rst deleted file mode 100644 index de7bd984c5..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha2_driver_allocation_result.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha2\_driver\_allocation\_result module -================================================================= - -.. automodule:: kubernetes.test.test_v1alpha2_driver_allocation_result - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha2_driver_requests.rst b/doc/source/kubernetes.test.test_v1alpha2_driver_requests.rst deleted file mode 100644 index e10e922a96..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha2_driver_requests.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha2\_driver\_requests module -======================================================= - -.. automodule:: kubernetes.test.test_v1alpha2_driver_requests - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha2_named_resources_allocation_result.rst b/doc/source/kubernetes.test.test_v1alpha2_named_resources_allocation_result.rst deleted file mode 100644 index 2d830a01fe..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha2_named_resources_allocation_result.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha2\_named\_resources\_allocation\_result module -=========================================================================== - -.. automodule:: kubernetes.test.test_v1alpha2_named_resources_allocation_result - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha2_named_resources_attribute.rst b/doc/source/kubernetes.test.test_v1alpha2_named_resources_attribute.rst deleted file mode 100644 index 3d9d691850..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha2_named_resources_attribute.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha2\_named\_resources\_attribute module -================================================================== - -.. automodule:: kubernetes.test.test_v1alpha2_named_resources_attribute - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha2_named_resources_filter.rst b/doc/source/kubernetes.test.test_v1alpha2_named_resources_filter.rst deleted file mode 100644 index d0cc945bf8..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha2_named_resources_filter.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha2\_named\_resources\_filter module -=============================================================== - -.. automodule:: kubernetes.test.test_v1alpha2_named_resources_filter - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha2_named_resources_instance.rst b/doc/source/kubernetes.test.test_v1alpha2_named_resources_instance.rst deleted file mode 100644 index c8089b1076..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha2_named_resources_instance.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha2\_named\_resources\_instance module -================================================================= - -.. automodule:: kubernetes.test.test_v1alpha2_named_resources_instance - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha2_named_resources_int_slice.rst b/doc/source/kubernetes.test.test_v1alpha2_named_resources_int_slice.rst deleted file mode 100644 index c993f386a0..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha2_named_resources_int_slice.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha2\_named\_resources\_int\_slice module -=================================================================== - -.. automodule:: kubernetes.test.test_v1alpha2_named_resources_int_slice - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha2_named_resources_request.rst b/doc/source/kubernetes.test.test_v1alpha2_named_resources_request.rst deleted file mode 100644 index e37fdc875b..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha2_named_resources_request.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha2\_named\_resources\_request module -================================================================ - -.. automodule:: kubernetes.test.test_v1alpha2_named_resources_request - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha2_named_resources_resources.rst b/doc/source/kubernetes.test.test_v1alpha2_named_resources_resources.rst deleted file mode 100644 index 8ffea2bb9f..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha2_named_resources_resources.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha2\_named\_resources\_resources module -================================================================== - -.. automodule:: kubernetes.test.test_v1alpha2_named_resources_resources - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha2_named_resources_string_slice.rst b/doc/source/kubernetes.test.test_v1alpha2_named_resources_string_slice.rst deleted file mode 100644 index c25dba4f1d..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha2_named_resources_string_slice.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha2\_named\_resources\_string\_slice module -====================================================================== - -.. automodule:: kubernetes.test.test_v1alpha2_named_resources_string_slice - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha2_pod_scheduling_context.rst b/doc/source/kubernetes.test.test_v1alpha2_pod_scheduling_context.rst deleted file mode 100644 index 1e83bd710e..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha2_pod_scheduling_context.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha2\_pod\_scheduling\_context module -=============================================================== - -.. automodule:: kubernetes.test.test_v1alpha2_pod_scheduling_context - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha2_pod_scheduling_context_list.rst b/doc/source/kubernetes.test.test_v1alpha2_pod_scheduling_context_list.rst deleted file mode 100644 index df87f9d5c9..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha2_pod_scheduling_context_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha2\_pod\_scheduling\_context\_list module -===================================================================== - -.. automodule:: kubernetes.test.test_v1alpha2_pod_scheduling_context_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha2_pod_scheduling_context_spec.rst b/doc/source/kubernetes.test.test_v1alpha2_pod_scheduling_context_spec.rst deleted file mode 100644 index af5846ca46..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha2_pod_scheduling_context_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha2\_pod\_scheduling\_context\_spec module -===================================================================== - -.. automodule:: kubernetes.test.test_v1alpha2_pod_scheduling_context_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha2_pod_scheduling_context_status.rst b/doc/source/kubernetes.test.test_v1alpha2_pod_scheduling_context_status.rst deleted file mode 100644 index f3f146bed4..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha2_pod_scheduling_context_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha2\_pod\_scheduling\_context\_status module -======================================================================= - -.. automodule:: kubernetes.test.test_v1alpha2_pod_scheduling_context_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha2_resource_claim.rst b/doc/source/kubernetes.test.test_v1alpha2_resource_claim.rst deleted file mode 100644 index 9d3cc7d869..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha2_resource_claim.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha2\_resource\_claim module -====================================================== - -.. automodule:: kubernetes.test.test_v1alpha2_resource_claim - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha2_resource_claim_consumer_reference.rst b/doc/source/kubernetes.test.test_v1alpha2_resource_claim_consumer_reference.rst deleted file mode 100644 index 3d810a406a..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha2_resource_claim_consumer_reference.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha2\_resource\_claim\_consumer\_reference module -=========================================================================== - -.. automodule:: kubernetes.test.test_v1alpha2_resource_claim_consumer_reference - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha2_resource_claim_list.rst b/doc/source/kubernetes.test.test_v1alpha2_resource_claim_list.rst deleted file mode 100644 index 0b9b35948e..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha2_resource_claim_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha2\_resource\_claim\_list module -============================================================ - -.. automodule:: kubernetes.test.test_v1alpha2_resource_claim_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha2_resource_claim_parameters.rst b/doc/source/kubernetes.test.test_v1alpha2_resource_claim_parameters.rst deleted file mode 100644 index fbdaa0b3d0..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha2_resource_claim_parameters.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha2\_resource\_claim\_parameters module -================================================================== - -.. automodule:: kubernetes.test.test_v1alpha2_resource_claim_parameters - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha2_resource_claim_parameters_list.rst b/doc/source/kubernetes.test.test_v1alpha2_resource_claim_parameters_list.rst deleted file mode 100644 index f83eebbe22..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha2_resource_claim_parameters_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha2\_resource\_claim\_parameters\_list module -======================================================================== - -.. automodule:: kubernetes.test.test_v1alpha2_resource_claim_parameters_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha2_resource_claim_parameters_reference.rst b/doc/source/kubernetes.test.test_v1alpha2_resource_claim_parameters_reference.rst deleted file mode 100644 index 7d80b8fca2..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha2_resource_claim_parameters_reference.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha2\_resource\_claim\_parameters\_reference module -============================================================================= - -.. automodule:: kubernetes.test.test_v1alpha2_resource_claim_parameters_reference - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha2_resource_claim_scheduling_status.rst b/doc/source/kubernetes.test.test_v1alpha2_resource_claim_scheduling_status.rst deleted file mode 100644 index 3edbe55054..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha2_resource_claim_scheduling_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha2\_resource\_claim\_scheduling\_status module -========================================================================== - -.. automodule:: kubernetes.test.test_v1alpha2_resource_claim_scheduling_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha2_resource_claim_spec.rst b/doc/source/kubernetes.test.test_v1alpha2_resource_claim_spec.rst deleted file mode 100644 index 2f664fcedb..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha2_resource_claim_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha2\_resource\_claim\_spec module -============================================================ - -.. automodule:: kubernetes.test.test_v1alpha2_resource_claim_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha2_resource_claim_status.rst b/doc/source/kubernetes.test.test_v1alpha2_resource_claim_status.rst deleted file mode 100644 index 5f522858ed..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha2_resource_claim_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha2\_resource\_claim\_status module -============================================================== - -.. automodule:: kubernetes.test.test_v1alpha2_resource_claim_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha2_resource_claim_template.rst b/doc/source/kubernetes.test.test_v1alpha2_resource_claim_template.rst deleted file mode 100644 index a4b11be41b..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha2_resource_claim_template.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha2\_resource\_claim\_template module -================================================================ - -.. automodule:: kubernetes.test.test_v1alpha2_resource_claim_template - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha2_resource_claim_template_list.rst b/doc/source/kubernetes.test.test_v1alpha2_resource_claim_template_list.rst deleted file mode 100644 index 34cb65a5eb..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha2_resource_claim_template_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha2\_resource\_claim\_template\_list module -====================================================================== - -.. automodule:: kubernetes.test.test_v1alpha2_resource_claim_template_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha2_resource_claim_template_spec.rst b/doc/source/kubernetes.test.test_v1alpha2_resource_claim_template_spec.rst deleted file mode 100644 index 8c750a126b..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha2_resource_claim_template_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha2\_resource\_claim\_template\_spec module -====================================================================== - -.. automodule:: kubernetes.test.test_v1alpha2_resource_claim_template_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha2_resource_class.rst b/doc/source/kubernetes.test.test_v1alpha2_resource_class.rst deleted file mode 100644 index 22957518a7..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha2_resource_class.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha2\_resource\_class module -====================================================== - -.. automodule:: kubernetes.test.test_v1alpha2_resource_class - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha2_resource_class_list.rst b/doc/source/kubernetes.test.test_v1alpha2_resource_class_list.rst deleted file mode 100644 index 4ee5c85d9e..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha2_resource_class_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha2\_resource\_class\_list module -============================================================ - -.. automodule:: kubernetes.test.test_v1alpha2_resource_class_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha2_resource_class_parameters.rst b/doc/source/kubernetes.test.test_v1alpha2_resource_class_parameters.rst deleted file mode 100644 index cc01c16e56..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha2_resource_class_parameters.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha2\_resource\_class\_parameters module -================================================================== - -.. automodule:: kubernetes.test.test_v1alpha2_resource_class_parameters - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha2_resource_class_parameters_list.rst b/doc/source/kubernetes.test.test_v1alpha2_resource_class_parameters_list.rst deleted file mode 100644 index 7515705180..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha2_resource_class_parameters_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha2\_resource\_class\_parameters\_list module -======================================================================== - -.. automodule:: kubernetes.test.test_v1alpha2_resource_class_parameters_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha2_resource_class_parameters_reference.rst b/doc/source/kubernetes.test.test_v1alpha2_resource_class_parameters_reference.rst deleted file mode 100644 index 694372797c..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha2_resource_class_parameters_reference.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha2\_resource\_class\_parameters\_reference module -============================================================================= - -.. automodule:: kubernetes.test.test_v1alpha2_resource_class_parameters_reference - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha2_resource_filter.rst b/doc/source/kubernetes.test.test_v1alpha2_resource_filter.rst deleted file mode 100644 index 1428841ca7..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha2_resource_filter.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha2\_resource\_filter module -======================================================= - -.. automodule:: kubernetes.test.test_v1alpha2_resource_filter - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha2_resource_handle.rst b/doc/source/kubernetes.test.test_v1alpha2_resource_handle.rst deleted file mode 100644 index aa8c0bc087..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha2_resource_handle.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha2\_resource\_handle module -======================================================= - -.. automodule:: kubernetes.test.test_v1alpha2_resource_handle - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha2_resource_request.rst b/doc/source/kubernetes.test.test_v1alpha2_resource_request.rst deleted file mode 100644 index 5ffa1d4eee..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha2_resource_request.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha2\_resource\_request module -======================================================== - -.. automodule:: kubernetes.test.test_v1alpha2_resource_request - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha2_resource_slice.rst b/doc/source/kubernetes.test.test_v1alpha2_resource_slice.rst deleted file mode 100644 index ad7e695944..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha2_resource_slice.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha2\_resource\_slice module -====================================================== - -.. automodule:: kubernetes.test.test_v1alpha2_resource_slice - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha2_resource_slice_list.rst b/doc/source/kubernetes.test.test_v1alpha2_resource_slice_list.rst deleted file mode 100644 index e5c1b8feb5..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha2_resource_slice_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha2\_resource\_slice\_list module -============================================================ - -.. automodule:: kubernetes.test.test_v1alpha2_resource_slice_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha2_structured_resource_handle.rst b/doc/source/kubernetes.test.test_v1alpha2_structured_resource_handle.rst deleted file mode 100644 index c7e321128b..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha2_structured_resource_handle.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha2\_structured\_resource\_handle module -=================================================================== - -.. automodule:: kubernetes.test.test_v1alpha2_structured_resource_handle - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha2_vendor_parameters.rst b/doc/source/kubernetes.test.test_v1alpha2_vendor_parameters.rst deleted file mode 100644 index c686255c9c..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha2_vendor_parameters.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha2\_vendor\_parameters module -========================================================= - -.. automodule:: kubernetes.test.test_v1alpha2_vendor_parameters - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_audit_annotation.rst b/doc/source/kubernetes.test.test_v1beta1_audit_annotation.rst deleted file mode 100644 index 88839bebff..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_audit_annotation.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_audit\_annotation module -======================================================= - -.. automodule:: kubernetes.test.test_v1beta1_audit_annotation - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_expression_warning.rst b/doc/source/kubernetes.test.test_v1beta1_expression_warning.rst deleted file mode 100644 index d156ab9106..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_expression_warning.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_expression\_warning module -========================================================= - -.. automodule:: kubernetes.test.test_v1beta1_expression_warning - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_match_condition.rst b/doc/source/kubernetes.test.test_v1beta1_match_condition.rst deleted file mode 100644 index a66593e8f0..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_match_condition.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_match\_condition module -====================================================== - -.. automodule:: kubernetes.test.test_v1beta1_match_condition - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_match_resources.rst b/doc/source/kubernetes.test.test_v1beta1_match_resources.rst deleted file mode 100644 index c2e1b24252..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_match_resources.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_match\_resources module -====================================================== - -.. automodule:: kubernetes.test.test_v1beta1_match_resources - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_named_rule_with_operations.rst b/doc/source/kubernetes.test.test_v1beta1_named_rule_with_operations.rst deleted file mode 100644 index 4545c5ced4..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_named_rule_with_operations.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_named\_rule\_with\_operations module -=================================================================== - -.. automodule:: kubernetes.test.test_v1beta1_named_rule_with_operations - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_param_kind.rst b/doc/source/kubernetes.test.test_v1beta1_param_kind.rst deleted file mode 100644 index 8a03bfac7e..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_param_kind.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_param\_kind module -================================================= - -.. automodule:: kubernetes.test.test_v1beta1_param_kind - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_param_ref.rst b/doc/source/kubernetes.test.test_v1beta1_param_ref.rst deleted file mode 100644 index c00c3c6b99..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_param_ref.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_param\_ref module -================================================ - -.. automodule:: kubernetes.test.test_v1beta1_param_ref - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_self_subject_review.rst b/doc/source/kubernetes.test.test_v1beta1_self_subject_review.rst deleted file mode 100644 index 6b682efec9..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_self_subject_review.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_self\_subject\_review module -=========================================================== - -.. automodule:: kubernetes.test.test_v1beta1_self_subject_review - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_self_subject_review_status.rst b/doc/source/kubernetes.test.test_v1beta1_self_subject_review_status.rst deleted file mode 100644 index 4db39f7bdc..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_self_subject_review_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_self\_subject\_review\_status module -=================================================================== - -.. automodule:: kubernetes.test.test_v1beta1_self_subject_review_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_type_checking.rst b/doc/source/kubernetes.test.test_v1beta1_type_checking.rst deleted file mode 100644 index 1000fbd9a2..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_type_checking.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_type\_checking module -==================================================== - -.. automodule:: kubernetes.test.test_v1beta1_type_checking - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_validating_admission_policy.rst b/doc/source/kubernetes.test.test_v1beta1_validating_admission_policy.rst deleted file mode 100644 index 39e217f8b1..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_validating_admission_policy.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_validating\_admission\_policy module -=================================================================== - -.. automodule:: kubernetes.test.test_v1beta1_validating_admission_policy - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_validating_admission_policy_binding.rst b/doc/source/kubernetes.test.test_v1beta1_validating_admission_policy_binding.rst deleted file mode 100644 index 5385e59e57..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_validating_admission_policy_binding.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_validating\_admission\_policy\_binding module -============================================================================ - -.. automodule:: kubernetes.test.test_v1beta1_validating_admission_policy_binding - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_validating_admission_policy_binding_list.rst b/doc/source/kubernetes.test.test_v1beta1_validating_admission_policy_binding_list.rst deleted file mode 100644 index 6895d7e554..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_validating_admission_policy_binding_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_validating\_admission\_policy\_binding\_list module -================================================================================== - -.. automodule:: kubernetes.test.test_v1beta1_validating_admission_policy_binding_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_validating_admission_policy_binding_spec.rst b/doc/source/kubernetes.test.test_v1beta1_validating_admission_policy_binding_spec.rst deleted file mode 100644 index b34ff834e0..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_validating_admission_policy_binding_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_validating\_admission\_policy\_binding\_spec module -================================================================================== - -.. automodule:: kubernetes.test.test_v1beta1_validating_admission_policy_binding_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_validating_admission_policy_list.rst b/doc/source/kubernetes.test.test_v1beta1_validating_admission_policy_list.rst deleted file mode 100644 index 88d75f6f3b..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_validating_admission_policy_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_validating\_admission\_policy\_list module -========================================================================= - -.. automodule:: kubernetes.test.test_v1beta1_validating_admission_policy_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_validating_admission_policy_spec.rst b/doc/source/kubernetes.test.test_v1beta1_validating_admission_policy_spec.rst deleted file mode 100644 index 00b1967d89..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_validating_admission_policy_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_validating\_admission\_policy\_spec module -========================================================================= - -.. automodule:: kubernetes.test.test_v1beta1_validating_admission_policy_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_validating_admission_policy_status.rst b/doc/source/kubernetes.test.test_v1beta1_validating_admission_policy_status.rst deleted file mode 100644 index 2e03af410b..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_validating_admission_policy_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_validating\_admission\_policy\_status module -=========================================================================== - -.. automodule:: kubernetes.test.test_v1beta1_validating_admission_policy_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_validation.rst b/doc/source/kubernetes.test.test_v1beta1_validation.rst deleted file mode 100644 index e7dc351b57..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_validation.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_validation module -================================================ - -.. automodule:: kubernetes.test.test_v1beta1_validation - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_variable.rst b/doc/source/kubernetes.test.test_v1beta1_variable.rst deleted file mode 100644 index 8f3088bda5..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_variable.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_variable module -============================================== - -.. automodule:: kubernetes.test.test_v1beta1_variable - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta3_exempt_priority_level_configuration.rst b/doc/source/kubernetes.test.test_v1beta3_exempt_priority_level_configuration.rst deleted file mode 100644 index e31175efef..0000000000 --- a/doc/source/kubernetes.test.test_v1beta3_exempt_priority_level_configuration.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta3\_exempt\_priority\_level\_configuration module -============================================================================ - -.. automodule:: kubernetes.test.test_v1beta3_exempt_priority_level_configuration - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta3_flow_distinguisher_method.rst b/doc/source/kubernetes.test.test_v1beta3_flow_distinguisher_method.rst deleted file mode 100644 index 2ad83ef2cc..0000000000 --- a/doc/source/kubernetes.test.test_v1beta3_flow_distinguisher_method.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta3\_flow\_distinguisher\_method module -================================================================= - -.. automodule:: kubernetes.test.test_v1beta3_flow_distinguisher_method - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta3_flow_schema.rst b/doc/source/kubernetes.test.test_v1beta3_flow_schema.rst deleted file mode 100644 index 0ecb77c976..0000000000 --- a/doc/source/kubernetes.test.test_v1beta3_flow_schema.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta3\_flow\_schema module -================================================== - -.. automodule:: kubernetes.test.test_v1beta3_flow_schema - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta3_flow_schema_condition.rst b/doc/source/kubernetes.test.test_v1beta3_flow_schema_condition.rst deleted file mode 100644 index 974563f950..0000000000 --- a/doc/source/kubernetes.test.test_v1beta3_flow_schema_condition.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta3\_flow\_schema\_condition module -============================================================= - -.. automodule:: kubernetes.test.test_v1beta3_flow_schema_condition - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta3_flow_schema_list.rst b/doc/source/kubernetes.test.test_v1beta3_flow_schema_list.rst deleted file mode 100644 index 1eb5762f06..0000000000 --- a/doc/source/kubernetes.test.test_v1beta3_flow_schema_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta3\_flow\_schema\_list module -======================================================== - -.. automodule:: kubernetes.test.test_v1beta3_flow_schema_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta3_flow_schema_spec.rst b/doc/source/kubernetes.test.test_v1beta3_flow_schema_spec.rst deleted file mode 100644 index 9a4794895e..0000000000 --- a/doc/source/kubernetes.test.test_v1beta3_flow_schema_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta3\_flow\_schema\_spec module -======================================================== - -.. automodule:: kubernetes.test.test_v1beta3_flow_schema_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta3_flow_schema_status.rst b/doc/source/kubernetes.test.test_v1beta3_flow_schema_status.rst deleted file mode 100644 index 6abb32d236..0000000000 --- a/doc/source/kubernetes.test.test_v1beta3_flow_schema_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta3\_flow\_schema\_status module -========================================================== - -.. automodule:: kubernetes.test.test_v1beta3_flow_schema_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta3_group_subject.rst b/doc/source/kubernetes.test.test_v1beta3_group_subject.rst deleted file mode 100644 index 1b5e9a27eb..0000000000 --- a/doc/source/kubernetes.test.test_v1beta3_group_subject.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta3\_group\_subject module -==================================================== - -.. automodule:: kubernetes.test.test_v1beta3_group_subject - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta3_limit_response.rst b/doc/source/kubernetes.test.test_v1beta3_limit_response.rst deleted file mode 100644 index 1076e3f048..0000000000 --- a/doc/source/kubernetes.test.test_v1beta3_limit_response.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta3\_limit\_response module -===================================================== - -.. automodule:: kubernetes.test.test_v1beta3_limit_response - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta3_limited_priority_level_configuration.rst b/doc/source/kubernetes.test.test_v1beta3_limited_priority_level_configuration.rst deleted file mode 100644 index 43ba426db2..0000000000 --- a/doc/source/kubernetes.test.test_v1beta3_limited_priority_level_configuration.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta3\_limited\_priority\_level\_configuration module -============================================================================= - -.. automodule:: kubernetes.test.test_v1beta3_limited_priority_level_configuration - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta3_non_resource_policy_rule.rst b/doc/source/kubernetes.test.test_v1beta3_non_resource_policy_rule.rst deleted file mode 100644 index 0c893f4577..0000000000 --- a/doc/source/kubernetes.test.test_v1beta3_non_resource_policy_rule.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta3\_non\_resource\_policy\_rule module -================================================================= - -.. automodule:: kubernetes.test.test_v1beta3_non_resource_policy_rule - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta3_policy_rules_with_subjects.rst b/doc/source/kubernetes.test.test_v1beta3_policy_rules_with_subjects.rst deleted file mode 100644 index fdefeb88bd..0000000000 --- a/doc/source/kubernetes.test.test_v1beta3_policy_rules_with_subjects.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta3\_policy\_rules\_with\_subjects module -=================================================================== - -.. automodule:: kubernetes.test.test_v1beta3_policy_rules_with_subjects - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta3_priority_level_configuration.rst b/doc/source/kubernetes.test.test_v1beta3_priority_level_configuration.rst deleted file mode 100644 index 51fb640fd6..0000000000 --- a/doc/source/kubernetes.test.test_v1beta3_priority_level_configuration.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta3\_priority\_level\_configuration module -==================================================================== - -.. automodule:: kubernetes.test.test_v1beta3_priority_level_configuration - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta3_priority_level_configuration_condition.rst b/doc/source/kubernetes.test.test_v1beta3_priority_level_configuration_condition.rst deleted file mode 100644 index 529362bc01..0000000000 --- a/doc/source/kubernetes.test.test_v1beta3_priority_level_configuration_condition.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta3\_priority\_level\_configuration\_condition module -=============================================================================== - -.. automodule:: kubernetes.test.test_v1beta3_priority_level_configuration_condition - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta3_priority_level_configuration_list.rst b/doc/source/kubernetes.test.test_v1beta3_priority_level_configuration_list.rst deleted file mode 100644 index 244189606a..0000000000 --- a/doc/source/kubernetes.test.test_v1beta3_priority_level_configuration_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta3\_priority\_level\_configuration\_list module -========================================================================== - -.. automodule:: kubernetes.test.test_v1beta3_priority_level_configuration_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta3_priority_level_configuration_reference.rst b/doc/source/kubernetes.test.test_v1beta3_priority_level_configuration_reference.rst deleted file mode 100644 index 2f0a9685fe..0000000000 --- a/doc/source/kubernetes.test.test_v1beta3_priority_level_configuration_reference.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta3\_priority\_level\_configuration\_reference module -=============================================================================== - -.. automodule:: kubernetes.test.test_v1beta3_priority_level_configuration_reference - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta3_priority_level_configuration_spec.rst b/doc/source/kubernetes.test.test_v1beta3_priority_level_configuration_spec.rst deleted file mode 100644 index 8ec3bcdb5f..0000000000 --- a/doc/source/kubernetes.test.test_v1beta3_priority_level_configuration_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta3\_priority\_level\_configuration\_spec module -========================================================================== - -.. automodule:: kubernetes.test.test_v1beta3_priority_level_configuration_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta3_priority_level_configuration_status.rst b/doc/source/kubernetes.test.test_v1beta3_priority_level_configuration_status.rst deleted file mode 100644 index 3d32132ef5..0000000000 --- a/doc/source/kubernetes.test.test_v1beta3_priority_level_configuration_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta3\_priority\_level\_configuration\_status module -============================================================================ - -.. automodule:: kubernetes.test.test_v1beta3_priority_level_configuration_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta3_queuing_configuration.rst b/doc/source/kubernetes.test.test_v1beta3_queuing_configuration.rst deleted file mode 100644 index 012c01d914..0000000000 --- a/doc/source/kubernetes.test.test_v1beta3_queuing_configuration.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta3\_queuing\_configuration module -============================================================ - -.. automodule:: kubernetes.test.test_v1beta3_queuing_configuration - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta3_resource_policy_rule.rst b/doc/source/kubernetes.test.test_v1beta3_resource_policy_rule.rst deleted file mode 100644 index 89cec32c93..0000000000 --- a/doc/source/kubernetes.test.test_v1beta3_resource_policy_rule.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta3\_resource\_policy\_rule module -============================================================ - -.. automodule:: kubernetes.test.test_v1beta3_resource_policy_rule - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta3_service_account_subject.rst b/doc/source/kubernetes.test.test_v1beta3_service_account_subject.rst deleted file mode 100644 index 8e252b9823..0000000000 --- a/doc/source/kubernetes.test.test_v1beta3_service_account_subject.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta3\_service\_account\_subject module -=============================================================== - -.. automodule:: kubernetes.test.test_v1beta3_service_account_subject - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta3_subject.rst b/doc/source/kubernetes.test.test_v1beta3_subject.rst deleted file mode 100644 index 60ab412756..0000000000 --- a/doc/source/kubernetes.test.test_v1beta3_subject.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta3\_subject module -============================================= - -.. automodule:: kubernetes.test.test_v1beta3_subject - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta3_user_subject.rst b/doc/source/kubernetes.test.test_v1beta3_user_subject.rst deleted file mode 100644 index f2be85555f..0000000000 --- a/doc/source/kubernetes.test.test_v1beta3_user_subject.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta3\_user\_subject module -=================================================== - -.. automodule:: kubernetes.test.test_v1beta3_user_subject - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v2_container_resource_metric_source.rst b/doc/source/kubernetes.test.test_v2_container_resource_metric_source.rst deleted file mode 100644 index a9974a2cf1..0000000000 --- a/doc/source/kubernetes.test.test_v2_container_resource_metric_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v2\_container\_resource\_metric\_source module -==================================================================== - -.. automodule:: kubernetes.test.test_v2_container_resource_metric_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v2_container_resource_metric_status.rst b/doc/source/kubernetes.test.test_v2_container_resource_metric_status.rst deleted file mode 100644 index fb6892317d..0000000000 --- a/doc/source/kubernetes.test.test_v2_container_resource_metric_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v2\_container\_resource\_metric\_status module -==================================================================== - -.. automodule:: kubernetes.test.test_v2_container_resource_metric_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v2_cross_version_object_reference.rst b/doc/source/kubernetes.test.test_v2_cross_version_object_reference.rst deleted file mode 100644 index 6a953c7668..0000000000 --- a/doc/source/kubernetes.test.test_v2_cross_version_object_reference.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v2\_cross\_version\_object\_reference module -================================================================== - -.. automodule:: kubernetes.test.test_v2_cross_version_object_reference - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v2_external_metric_source.rst b/doc/source/kubernetes.test.test_v2_external_metric_source.rst deleted file mode 100644 index 9850739a8c..0000000000 --- a/doc/source/kubernetes.test.test_v2_external_metric_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v2\_external\_metric\_source module -========================================================= - -.. automodule:: kubernetes.test.test_v2_external_metric_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v2_external_metric_status.rst b/doc/source/kubernetes.test.test_v2_external_metric_status.rst deleted file mode 100644 index 5f1ec50376..0000000000 --- a/doc/source/kubernetes.test.test_v2_external_metric_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v2\_external\_metric\_status module -========================================================= - -.. automodule:: kubernetes.test.test_v2_external_metric_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v2_horizontal_pod_autoscaler.rst b/doc/source/kubernetes.test.test_v2_horizontal_pod_autoscaler.rst deleted file mode 100644 index 0af19525c0..0000000000 --- a/doc/source/kubernetes.test.test_v2_horizontal_pod_autoscaler.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v2\_horizontal\_pod\_autoscaler module -============================================================ - -.. automodule:: kubernetes.test.test_v2_horizontal_pod_autoscaler - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v2_horizontal_pod_autoscaler_behavior.rst b/doc/source/kubernetes.test.test_v2_horizontal_pod_autoscaler_behavior.rst deleted file mode 100644 index 69a9ee0eaa..0000000000 --- a/doc/source/kubernetes.test.test_v2_horizontal_pod_autoscaler_behavior.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v2\_horizontal\_pod\_autoscaler\_behavior module -====================================================================== - -.. automodule:: kubernetes.test.test_v2_horizontal_pod_autoscaler_behavior - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v2_horizontal_pod_autoscaler_condition.rst b/doc/source/kubernetes.test.test_v2_horizontal_pod_autoscaler_condition.rst deleted file mode 100644 index 0cf05f394e..0000000000 --- a/doc/source/kubernetes.test.test_v2_horizontal_pod_autoscaler_condition.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v2\_horizontal\_pod\_autoscaler\_condition module -======================================================================= - -.. automodule:: kubernetes.test.test_v2_horizontal_pod_autoscaler_condition - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v2_horizontal_pod_autoscaler_list.rst b/doc/source/kubernetes.test.test_v2_horizontal_pod_autoscaler_list.rst deleted file mode 100644 index 7f62c9ee18..0000000000 --- a/doc/source/kubernetes.test.test_v2_horizontal_pod_autoscaler_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v2\_horizontal\_pod\_autoscaler\_list module -================================================================== - -.. automodule:: kubernetes.test.test_v2_horizontal_pod_autoscaler_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v2_horizontal_pod_autoscaler_spec.rst b/doc/source/kubernetes.test.test_v2_horizontal_pod_autoscaler_spec.rst deleted file mode 100644 index 263b1a4930..0000000000 --- a/doc/source/kubernetes.test.test_v2_horizontal_pod_autoscaler_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v2\_horizontal\_pod\_autoscaler\_spec module -================================================================== - -.. automodule:: kubernetes.test.test_v2_horizontal_pod_autoscaler_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v2_horizontal_pod_autoscaler_status.rst b/doc/source/kubernetes.test.test_v2_horizontal_pod_autoscaler_status.rst deleted file mode 100644 index 912b065c2b..0000000000 --- a/doc/source/kubernetes.test.test_v2_horizontal_pod_autoscaler_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v2\_horizontal\_pod\_autoscaler\_status module -==================================================================== - -.. automodule:: kubernetes.test.test_v2_horizontal_pod_autoscaler_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v2_hpa_scaling_policy.rst b/doc/source/kubernetes.test.test_v2_hpa_scaling_policy.rst deleted file mode 100644 index f8a5fa1c70..0000000000 --- a/doc/source/kubernetes.test.test_v2_hpa_scaling_policy.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v2\_hpa\_scaling\_policy module -===================================================== - -.. automodule:: kubernetes.test.test_v2_hpa_scaling_policy - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v2_hpa_scaling_rules.rst b/doc/source/kubernetes.test.test_v2_hpa_scaling_rules.rst deleted file mode 100644 index 3e6c7c3c1e..0000000000 --- a/doc/source/kubernetes.test.test_v2_hpa_scaling_rules.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v2\_hpa\_scaling\_rules module -==================================================== - -.. automodule:: kubernetes.test.test_v2_hpa_scaling_rules - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v2_metric_identifier.rst b/doc/source/kubernetes.test.test_v2_metric_identifier.rst deleted file mode 100644 index c56974f321..0000000000 --- a/doc/source/kubernetes.test.test_v2_metric_identifier.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v2\_metric\_identifier module -=================================================== - -.. automodule:: kubernetes.test.test_v2_metric_identifier - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v2_metric_spec.rst b/doc/source/kubernetes.test.test_v2_metric_spec.rst deleted file mode 100644 index 4621aa93f7..0000000000 --- a/doc/source/kubernetes.test.test_v2_metric_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v2\_metric\_spec module -============================================= - -.. automodule:: kubernetes.test.test_v2_metric_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v2_metric_status.rst b/doc/source/kubernetes.test.test_v2_metric_status.rst deleted file mode 100644 index 35433acdef..0000000000 --- a/doc/source/kubernetes.test.test_v2_metric_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v2\_metric\_status module -=============================================== - -.. automodule:: kubernetes.test.test_v2_metric_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v2_metric_target.rst b/doc/source/kubernetes.test.test_v2_metric_target.rst deleted file mode 100644 index d7c7ce4673..0000000000 --- a/doc/source/kubernetes.test.test_v2_metric_target.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v2\_metric\_target module -=============================================== - -.. automodule:: kubernetes.test.test_v2_metric_target - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v2_metric_value_status.rst b/doc/source/kubernetes.test.test_v2_metric_value_status.rst deleted file mode 100644 index d49b8176fd..0000000000 --- a/doc/source/kubernetes.test.test_v2_metric_value_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v2\_metric\_value\_status module -====================================================== - -.. automodule:: kubernetes.test.test_v2_metric_value_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v2_object_metric_source.rst b/doc/source/kubernetes.test.test_v2_object_metric_source.rst deleted file mode 100644 index d9761e3e1b..0000000000 --- a/doc/source/kubernetes.test.test_v2_object_metric_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v2\_object\_metric\_source module -======================================================= - -.. automodule:: kubernetes.test.test_v2_object_metric_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v2_object_metric_status.rst b/doc/source/kubernetes.test.test_v2_object_metric_status.rst deleted file mode 100644 index c87542e1eb..0000000000 --- a/doc/source/kubernetes.test.test_v2_object_metric_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v2\_object\_metric\_status module -======================================================= - -.. automodule:: kubernetes.test.test_v2_object_metric_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v2_pods_metric_source.rst b/doc/source/kubernetes.test.test_v2_pods_metric_source.rst deleted file mode 100644 index a5c2c965ee..0000000000 --- a/doc/source/kubernetes.test.test_v2_pods_metric_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v2\_pods\_metric\_source module -===================================================== - -.. automodule:: kubernetes.test.test_v2_pods_metric_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v2_pods_metric_status.rst b/doc/source/kubernetes.test.test_v2_pods_metric_status.rst deleted file mode 100644 index 291bd9b5a5..0000000000 --- a/doc/source/kubernetes.test.test_v2_pods_metric_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v2\_pods\_metric\_status module -===================================================== - -.. automodule:: kubernetes.test.test_v2_pods_metric_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v2_resource_metric_source.rst b/doc/source/kubernetes.test.test_v2_resource_metric_source.rst deleted file mode 100644 index 8eaf291d7b..0000000000 --- a/doc/source/kubernetes.test.test_v2_resource_metric_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v2\_resource\_metric\_source module -========================================================= - -.. automodule:: kubernetes.test.test_v2_resource_metric_source - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v2_resource_metric_status.rst b/doc/source/kubernetes.test.test_v2_resource_metric_status.rst deleted file mode 100644 index a9774f72a5..0000000000 --- a/doc/source/kubernetes.test.test_v2_resource_metric_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v2\_resource\_metric\_status module -========================================================= - -.. automodule:: kubernetes.test.test_v2_resource_metric_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_version_api.rst b/doc/source/kubernetes.test.test_version_api.rst deleted file mode 100644 index 5953069363..0000000000 --- a/doc/source/kubernetes.test.test_version_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_version\_api module -========================================= - -.. automodule:: kubernetes.test.test_version_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_version_info.rst b/doc/source/kubernetes.test.test_version_info.rst deleted file mode 100644 index 83116e191d..0000000000 --- a/doc/source/kubernetes.test.test_version_info.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_version\_info module -========================================== - -.. automodule:: kubernetes.test.test_version_info - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_well_known_api.rst b/doc/source/kubernetes.test.test_well_known_api.rst deleted file mode 100644 index 7a2dfcecf1..0000000000 --- a/doc/source/kubernetes.test.test_well_known_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_well\_known\_api module -============================================= - -.. automodule:: kubernetes.test.test_well_known_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.utils.create_from_yaml.rst b/doc/source/kubernetes.utils.create_from_yaml.rst deleted file mode 100644 index 9814e2224b..0000000000 --- a/doc/source/kubernetes.utils.create_from_yaml.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.utils.create\_from\_yaml module -========================================== - -.. automodule:: kubernetes.utils.create_from_yaml - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.utils.quantity.rst b/doc/source/kubernetes.utils.quantity.rst deleted file mode 100644 index 5c1d06ea0b..0000000000 --- a/doc/source/kubernetes.utils.quantity.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.utils.quantity module -================================ - -.. automodule:: kubernetes.utils.quantity - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.utils.rst b/doc/source/kubernetes.utils.rst deleted file mode 100644 index 52275ccd8b..0000000000 --- a/doc/source/kubernetes.utils.rst +++ /dev/null @@ -1,19 +0,0 @@ -kubernetes.utils package -======================== - -Submodules ----------- - -.. toctree:: - :maxdepth: 4 - - kubernetes.utils.create_from_yaml - kubernetes.utils.quantity - -Module contents ---------------- - -.. automodule:: kubernetes.utils - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/modules.rst b/doc/source/modules.rst deleted file mode 100644 index b55adaf9a6..0000000000 --- a/doc/source/modules.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes -========== - -.. toctree:: - :maxdepth: 4 - - kubernetes diff --git a/examples/README.md b/examples/README.md index 618e840ea3..43a11fba4e 100644 --- a/examples/README.md +++ b/examples/README.md @@ -5,6 +5,11 @@ Please read the description at the top of each example for more information about what the script does and any prerequisites. Most scripts also include comments throughout the code. +## Available Examples + +- pod_logs.py — basic (blocking) pod log streaming example +- pod_logs_non_blocking.py — non-blocking streaming of pod logs with graceful shutdown + ## Setup These scripts require Python 2.7 or 3.5+ and the Kubernetes client which can be @@ -15,3 +20,15 @@ installed following the directions If you find a problem please file an [issue](https://github.com/kubernetes-client/python/issues). + + +--- + +## Running Examples Locally + +### Prerequisites + +- Python 3.8 or newer +- Kubernetes Python client installed: + ```bash + pip install kubernetes diff --git a/examples/apply_from_dict.py b/examples/apply_from_dict.py index 9c0ac81242..972d42529d 100644 --- a/examples/apply_from_dict.py +++ b/examples/apply_from_dict.py @@ -1,3 +1,7 @@ +import sys +from kubernetes.client.rest import ApiException + + from kubernetes import client, config, utils def main(): config.load_kube_config() @@ -6,5 +10,12 @@ def main(): example_dict = {'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'k8s-py-client-nginx'}, 'spec': {'selector': {'matchLabels': {'app': 'nginx'}}, 'replicas': 1, 'template': {'metadata': {'labels': {'app': 'nginx'}}, 'spec': {'containers': [{'name': 'nginx', 'image': 'nginx:1.14.2', 'ports': [{'containerPort': 80}]}]}}}} utils.create_from_dict(k8s_client, example_dict) -if __name__ == '__main__': - main() \ No newline at end of file +if __name__ == "__main__": + try: + main() + except ApiException as e: + print(f"Kubernetes API error: {e}", file=sys.stderr) + sys.exit(1) + except Exception as e: + print(f"Unexpected error: {e}", file=sys.stderr) + sys.exit(2) diff --git a/examples/duration-gep2257.py b/examples/duration-gep2257.py new file mode 100644 index 0000000000..a7bda1bdb2 --- /dev/null +++ b/examples/duration-gep2257.py @@ -0,0 +1,39 @@ +#!/usr/bin/python3 +# -*- coding:utf-8 -*- + +""" +This example uses kubernetes.utils.duration to parse and display +a GEP-2257 duration string (you can find the full specification at +https://gateway-api.sigs.k8s.io/geps/gep-2257/). + +Good things to try: +>>> python examples/duration-gep2257.py 1h +Duration: 1h +>>> python examples/duration-gep2257.py 3600s +Duration: 1h +>>> python examples/duration-gep2257.py 90m +Duration: 1h30m +>>> python examples/duration-gep2257.py 30m1h10s5s +Duration: 1h30m15s +>>> python examples/duration-gep2257.py 0h0m0s0ms +Duration: 0s +>>> python examples/duration-gep2257.py -5m +ValueError: Invalid duration format: -5m +>>> python examples/duration-gep2257.py 1.5h +ValueError: Invalid duration format: 1.5h +""" + +import sys + +from kubernetes.utils import duration + +def main(): + if len(sys.argv) != 2: + print("Usage: {} ".format(sys.argv[0])) + sys.exit(1) + + dur = duration.parse_duration(sys.argv[1]) + print("Duration: %s" % duration.format_duration(dur)) + +if __name__ == "__main__": + main() diff --git a/examples/enable_debug_logging.py b/examples/enable_debug_logging.py new file mode 100644 index 0000000000..573948f3c1 --- /dev/null +++ b/examples/enable_debug_logging.py @@ -0,0 +1,61 @@ +# Copyright 2025 The Kubernetes Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# You may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# This example demonstrates how to enable debug logging in the Kubernetes +# Python client and how it can be used for troubleshooting requests/responses. + +from kubernetes import client, config + + +def main(): + # Load kubeconfig from default location + config.load_kube_config() + + # Enable debug logging + configuration = client.Configuration() + configuration.debug = True + api_client = client.ApiClient(configuration=configuration) + + # Use AppsV1Api with debug logging enabled + apps_v1 = client.AppsV1Api(api_client=api_client) + + # Example: Create a dummy deployment (adjust namespace as needed) + deployment = client.V1Deployment( + api_version="apps/v1", + kind="Deployment", + metadata=client.V1ObjectMeta(name="debug-example"), + spec=client.V1DeploymentSpec( + replicas=1, + selector={"matchLabels": {"app": "debug"}}, + template=client.V1PodTemplateSpec( + metadata=client.V1ObjectMeta(labels={"app": "debug"}), + spec=client.V1PodSpec( + containers=[ + client.V1Container( + name="busybox", + image="busybox", + command=["sh", "-c", "echo Hello, Kubernetes! && sleep 3600"] + ) + ] + ), + ), + ), + ) + + # Create the deployment + try: + print("[INFO] Creating deployment...") + apps_v1.create_namespaced_deployment( + namespace="default", body=deployment + ) + except client.exceptions.ApiException as e: + print("[ERROR] Exception occurred:", e) + + +if __name__ == "__main__": + main() diff --git a/examples/informer_example.py b/examples/informer_example.py new file mode 100644 index 0000000000..86902d47d2 --- /dev/null +++ b/examples/informer_example.py @@ -0,0 +1,75 @@ +# Copyright 2026 The Kubernetes Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the 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. + +"""Example: use SharedInformer to watch pods in the default namespace. + +The informer runs a background daemon thread that keeps a local cache +synchronised with the Kubernetes API server. The main thread is free to +query the cache at any time without worrying about connectivity or retries. +""" + +import time + +import kubernetes +from kubernetes import config +from kubernetes.client import CoreV1Api +from kubernetes.informer import ADDED, DELETED, MODIFIED, SharedInformer + + +def on_pod_added(pod): + name = pod.metadata.name if hasattr(pod, "metadata") else pod["metadata"]["name"] + print("[ADDED] ", name) + + +def on_pod_modified(pod): + name = pod.metadata.name if hasattr(pod, "metadata") else pod["metadata"]["name"] + print("[MODIFIED]", name) + + +def on_pod_deleted(pod): + name = pod.metadata.name if hasattr(pod, "metadata") else pod["metadata"]["name"] + print("[DELETED] ", name) + + +def main(): + config.load_kube_config() + + v1 = CoreV1Api() + informer = SharedInformer( + list_func=v1.list_namespaced_pod, + namespace="default", + resync_period=60, + ) + + informer.add_event_handler(ADDED, on_pod_added) + informer.add_event_handler(MODIFIED, on_pod_modified) + informer.add_event_handler(DELETED, on_pod_deleted) + + informer.start() + print('Informer started. Watching pods in "default" namespace ...') + + try: + while True: + cached = informer.cache.list() + print("Cached pods: {}".format(len(cached))) + time.sleep(10) + except KeyboardInterrupt: + pass + finally: + informer.stop() + print("Informer stopped.") + + +if __name__ == "__main__": + main() diff --git a/examples/metrics_example.py b/examples/metrics_example.py new file mode 100644 index 0000000000..0b085a7551 --- /dev/null +++ b/examples/metrics_example.py @@ -0,0 +1,190 @@ +#!/usr/bin/env python +# Copyright 2024 The Kubernetes Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the 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. + +""" +Example demonstrating how to fetch and display metrics from the Kubernetes +metrics-server using the Python client. + +This example shows: +1. Fetching node metrics +2. Fetching pod metrics in a namespace +3. Fetching pod metrics across multiple namespaces +4. Filtering pod metrics by labels + +Prerequisites: +- A running Kubernetes cluster with metrics-server installed +- kubectl configured to access the cluster +- The kubernetes Python client library installed +""" + +from kubernetes import client, config, utils + + +def print_node_metrics(api_client): + """Fetch and display node metrics.""" + print("\n" + "="*60) + print("NODE METRICS") + print("="*60) + + try: + metrics = utils.get_nodes_metrics(api_client) + + print(f"Found {len(metrics.get('items', []))} nodes\n") + + for node in metrics.get('items', []): + node_name = node['metadata']['name'] + timestamp = node.get('timestamp', 'N/A') + window = node.get('window', 'N/A') + usage = node.get('usage', {}) + + print(f"Node: {node_name}") + print(f" Timestamp: {timestamp}") + print(f" Window: {window}") + print(f" CPU Usage: {usage.get('cpu', 'N/A')}") + print(f" Memory Usage: {usage.get('memory', 'N/A')}") + print() + + except Exception as e: + print(f"Error fetching node metrics: {e}") + + +def print_pod_metrics(api_client, namespace): + """Fetch and display pod metrics for a namespace.""" + print("\n" + "="*60) + print(f"POD METRICS IN NAMESPACE: {namespace}") + print("="*60) + + try: + metrics = utils.get_pods_metrics(api_client, namespace) + + print(f"Found {len(metrics.get('items', []))} pods\n") + + for pod in metrics.get('items', []): + pod_name = pod['metadata']['name'] + timestamp = pod.get('timestamp', 'N/A') + window = pod.get('window', 'N/A') + + print(f"Pod: {pod_name}") + print(f" Timestamp: {timestamp}") + print(f" Window: {window}") + print(f" Containers:") + + for container in pod.get('containers', []): + container_name = container['name'] + usage = container.get('usage', {}) + print(f" - {container_name}:") + print(f" CPU: {usage.get('cpu', 'N/A')}") + print(f" Memory: {usage.get('memory', 'N/A')}") + print() + + except Exception as e: + print(f"Error fetching pod metrics: {e}") + + +def print_filtered_pod_metrics(api_client, namespace, labels): + """Fetch and display pod metrics filtered by labels.""" + print("\n" + "="*60) + print(f"POD METRICS IN NAMESPACE: {namespace}") + print(f"FILTERED BY LABELS: {labels}") + print("="*60) + + try: + metrics = utils.get_pods_metrics(api_client, namespace, labels) + + pods = metrics.get('items', []) + print(f"Found {len(pods)} pods matching labels\n") + + for pod in pods: + pod_name = pod['metadata']['name'] + print(f"Pod: {pod_name}") + + for container in pod.get('containers', []): + container_name = container['name'] + usage = container.get('usage', {}) + print(f" {container_name}: CPU={usage.get('cpu')}, Memory={usage.get('memory')}") + print() + + except Exception as e: + print(f"Error fetching filtered pod metrics: {e}") + + +def print_multi_namespace_metrics(api_client, namespaces): + """Fetch and display pod metrics across multiple namespaces.""" + print("\n" + "="*60) + print(f"POD METRICS ACROSS MULTIPLE NAMESPACES") + print("="*60) + + try: + all_metrics = utils.get_pods_metrics_in_all_namespaces(api_client, namespaces) + + for ns, result in all_metrics.items(): + print(f"\nNamespace: {ns}") + + if 'error' in result: + print(f" Error: {result['error']}") + else: + pod_count = len(result.get('items', [])) + print(f" Pods: {pod_count}") + + # Calculate total resource usage for namespace + total_containers = 0 + for pod in result.get('items', []): + total_containers += len(pod.get('containers', [])) + + print(f" Total containers: {total_containers}") + + except Exception as e: + print(f"Error fetching multi-namespace metrics: {e}") + + +def main(): + """Main function to demonstrate metrics API usage.""" + # Load kubernetes configuration + # This will use your current kubectl context + config.load_kube_config() + + # Create API client + api_client = client.ApiClient() + + print("\nKubernetes Metrics API Example") + print("================================") + print("\nThis example demonstrates fetching resource usage metrics") + print("from the Kubernetes metrics-server.") + print("\nNote: metrics-server must be installed in your cluster for this to work.") + + # Example 1: Fetch node metrics + print_node_metrics(api_client) + + # Example 2: Fetch pod metrics in default namespace + print_pod_metrics(api_client, 'default') + + # Example 3: Fetch pod metrics in kube-system namespace + print_pod_metrics(api_client, 'kube-system') + + # Example 4: Fetch pod metrics with label filter + # Uncomment and modify the label selector to match your pods + # print_filtered_pod_metrics(api_client, 'default', 'app=nginx') + + # Example 5: Fetch metrics across multiple namespaces + namespaces_to_query = ['default', 'kube-system'] + print_multi_namespace_metrics(api_client, namespaces_to_query) + + print("\n" + "="*60) + print("Example completed successfully!") + print("="*60 + "\n") + + +if __name__ == '__main__': + main() diff --git a/examples/patch_namespaced_config_map.py b/examples/patch_namespaced_config_map.py new file mode 100644 index 0000000000..9ee03aa445 --- /dev/null +++ b/examples/patch_namespaced_config_map.py @@ -0,0 +1,24 @@ +""" +This example demonstrates how to update config map by +patch_namespaced_config_map api. +""" + +from kubernetes import client, config + +def main(): + config.load_kube_config() + v1 = client.CoreV1Api() + + namespace = "your-namespace" + config_map_data = {"test_key": "test_value"} + config_map_name = "your-config-map-name" + + # Use client.V1ConfigMap instead of the python dict + object_meta = client.V1ObjectMeta(name=config_map_name, namespace=namespace) + body = client.V1ConfigMap( + api_version="v1", kind="ConfigMap", metadata=object_meta, data=config_map_data) + + v1.patch_namespaced_config_map(name=config_map_name, namespace=namespace, body=body) + +if __name__ == "__main__": + main() diff --git a/examples/pod_logs.py b/examples/pod_logs.py new file mode 100644 index 0000000000..e4eaa24baf --- /dev/null +++ b/examples/pod_logs.py @@ -0,0 +1,66 @@ +# Copyright 2025 The Kubernetes Authors. + +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the 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. + +""" +List all pod with logs. + +""" + +from kubernetes import client, config + +def list_pods_with_logs(): + try: + #Load Minikube configuration + config.load_kube_config() + + #Create Kubernetes API client + v1 = client.CoreV1Api() + + # List pods in all namespaces + pods = v1.list_pod_for_all_namespaces(watch=False) + + # Print details of each pod and retrieve logs + for pod in pods.items: + pod_name = pod.metadata.name + namespace = pod.metadata.namespace + pod_ip = pod.status.pod_ip + node_name = pod.spec.node_name + + print(f"Name: {pod_name}, Namespace: {namespace}, IP: {pod_ip}, Node: {node_name}") + + #Retrieve and print logs for each container in the pod + for container in pod.spec.containers: + container_name = container.name + print(f"Logs for container {container_name}:") + try: + logs = v1.read_namespaced_pod_log(name=pod_name, namespace=namespace, container=container_name, tail_lines=5) + print(logs) + except Exception as e: + print(f"Error getting logs for pod {pod_name}, container {container_name}: {e}") + + except Exception as e: + print(f"Error: {e}") + + +def main(): + list_pods_with_logs() + + +if __name__ == "__main__": + main() + + + + + diff --git a/examples/pod_logs_non_blocking.py b/examples/pod_logs_non_blocking.py new file mode 100644 index 0000000000..01673790e5 --- /dev/null +++ b/examples/pod_logs_non_blocking.py @@ -0,0 +1,51 @@ +""" +Non-blocking pod log streaming example. + +Demonstrates how to stream Kubernetes pod logs without blocking indefinitely +by using socket timeouts and graceful shutdown. +""" + +import threading +import time +import socket +from kubernetes import client, config +from urllib3.exceptions import ReadTimeoutError + +stop_event = threading.Event() + + +def stream_logs(): + config.load_kube_config() + v1 = client.CoreV1Api() + + resp = v1.read_namespaced_pod_log( + name="log-demo", + namespace="default", + follow=True, + _preload_content=False + ) + + # 👇 make socket non-blocking with timeout + resp._fp.fp.raw._sock.settimeout(1) + + try: + while not stop_event.is_set(): + try: + data = resp.read(1024) + if data: + print(data.decode(), end="") + except (socket.timeout, ReadTimeoutError): + continue + finally: + resp.close() + print("\nLog streaming stopped cleanly.") + + +t = threading.Thread(target=stream_logs) +t.start() + +try: + time.sleep(15) +finally: + stop_event.set() + t.join() diff --git a/examples/watch/watch_recovery.py b/examples/watch/watch_recovery.py new file mode 100644 index 0000000000..f07caf5096 --- /dev/null +++ b/examples/watch/watch_recovery.py @@ -0,0 +1,78 @@ +# Copyright 2025 The Kubernetes Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the 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. + +""" +Uses watch to print a stream of Pod events from the default namespace. +The allow_watch_bookmarks flag is set to True, so the API server can send +BOOKMARK events. + +If the connection to the API server is lost, the script will reconnect and +resume watching from the most recently received resource version. + +For more information, see: +- https://kubernetes.io/docs/reference/using-api/api-concepts/#efficient-detection-of-changes +- https://kubernetes.io/docs/reference/using-api/api-concepts/#semantics-for-watch +""" + +import urllib3 + +from kubernetes import config +from kubernetes.client import api_client +from kubernetes.client.exceptions import ApiException +from kubernetes.dynamic.client import DynamicClient + +NAMESPACE = "default" + + +def main(): + # Configs can be set in Configuration class directly or using helper + # utility. If no argument provided, the config will be loaded from + # default location. + config.load_kube_config() + client = DynamicClient(api_client.ApiClient()) + api = client.resources.get(api_version="v1", kind="Pod") + + # Setting resource_version=None means the server will send synthetic + # ADDED events for all resources that exist when the watch starts. + resource_version = None + while True: + try: + for event in api.watch( + namespace=NAMESPACE, + resource_version=resource_version, + allow_watch_bookmarks=True, + ): + # Remember the last resourceVersion we saw, so we can resume + # watching from there if the connection is lost. + resource_version = event['object'].metadata.resourceVersion + + print("Event: %s %s %s" % ( + resource_version, + event['type'], + event['object'].metadata.name, + )) + + except ApiException as err: + if err.status == 410: + print("ERROR: The requested resource version is no longer available.") + resource_version = None + else: + raise + + except urllib3.exceptions.ProtocolError: + print("Lost connection to the k8s API server. Reconnecting...") + + +if __name__ == "__main__": + main() diff --git a/kubernetes/.openapi-generator/COMMIT b/kubernetes/.openapi-generator/COMMIT index 9bb39c57de..e55d78f521 100644 --- a/kubernetes/.openapi-generator/COMMIT +++ b/kubernetes/.openapi-generator/COMMIT @@ -1,2 +1,2 @@ -Requested Commit/Tag : v4.3.0 -Actual Commit : c224cf484b020a7f5997d883cf331715df3fb52a +Requested Commit/Tag : v6.6.0 +Actual Commit : 7f8b853f502d9039c9a0aac2614ce92871e895ed diff --git a/kubernetes/.openapi-generator/FILES b/kubernetes/.openapi-generator/FILES new file mode 100644 index 0000000000..2abf9f2f58 --- /dev/null +++ b/kubernetes/.openapi-generator/FILES @@ -0,0 +1,2399 @@ +.gitlab-ci.yml +README.md +client/__init__.py +client/api/__init__.py +client/api/admissionregistration_api.py +client/api/admissionregistration_v1_api.py +client/api/admissionregistration_v1alpha1_api.py +client/api/admissionregistration_v1beta1_api.py +client/api/apiextensions_api.py +client/api/apiextensions_v1_api.py +client/api/apiregistration_api.py +client/api/apiregistration_v1_api.py +client/api/apis_api.py +client/api/apps_api.py +client/api/apps_v1_api.py +client/api/authentication_api.py +client/api/authentication_v1_api.py +client/api/authorization_api.py +client/api/authorization_v1_api.py +client/api/autoscaling_api.py +client/api/autoscaling_v1_api.py +client/api/autoscaling_v2_api.py +client/api/batch_api.py +client/api/batch_v1_api.py +client/api/certificates_api.py +client/api/certificates_v1_api.py +client/api/certificates_v1alpha1_api.py +client/api/certificates_v1beta1_api.py +client/api/coordination_api.py +client/api/coordination_v1_api.py +client/api/coordination_v1alpha2_api.py +client/api/coordination_v1beta1_api.py +client/api/core_api.py +client/api/core_v1_api.py +client/api/custom_objects_api.py +client/api/discovery_api.py +client/api/discovery_v1_api.py +client/api/events_api.py +client/api/events_v1_api.py +client/api/flowcontrol_apiserver_api.py +client/api/flowcontrol_apiserver_v1_api.py +client/api/internal_apiserver_api.py +client/api/internal_apiserver_v1alpha1_api.py +client/api/logs_api.py +client/api/networking_api.py +client/api/networking_v1_api.py +client/api/networking_v1beta1_api.py +client/api/node_api.py +client/api/node_v1_api.py +client/api/openid_api.py +client/api/policy_api.py +client/api/policy_v1_api.py +client/api/rbac_authorization_api.py +client/api/rbac_authorization_v1_api.py +client/api/resource_api.py +client/api/resource_v1_api.py +client/api/resource_v1alpha3_api.py +client/api/resource_v1beta1_api.py +client/api/resource_v1beta2_api.py +client/api/scheduling_api.py +client/api/scheduling_v1_api.py +client/api/scheduling_v1alpha1_api.py +client/api/storage_api.py +client/api/storage_v1_api.py +client/api/storage_v1beta1_api.py +client/api/storagemigration_api.py +client/api/storagemigration_v1beta1_api.py +client/api/version_api.py +client/api/well_known_api.py +client/api_client.py +client/configuration.py +client/exceptions.py +client/models/__init__.py +client/models/admissionregistration_v1_service_reference.py +client/models/admissionregistration_v1_webhook_client_config.py +client/models/apiextensions_v1_service_reference.py +client/models/apiextensions_v1_webhook_client_config.py +client/models/apiregistration_v1_service_reference.py +client/models/authentication_v1_token_request.py +client/models/core_v1_endpoint_port.py +client/models/core_v1_event.py +client/models/core_v1_event_list.py +client/models/core_v1_event_series.py +client/models/core_v1_resource_claim.py +client/models/discovery_v1_endpoint_port.py +client/models/events_v1_event.py +client/models/events_v1_event_list.py +client/models/events_v1_event_series.py +client/models/flowcontrol_v1_subject.py +client/models/rbac_v1_subject.py +client/models/resource_v1_resource_claim.py +client/models/storage_v1_token_request.py +client/models/v1_affinity.py +client/models/v1_aggregation_rule.py +client/models/v1_allocated_device_status.py +client/models/v1_allocation_result.py +client/models/v1_api_group.py +client/models/v1_api_group_list.py +client/models/v1_api_resource.py +client/models/v1_api_resource_list.py +client/models/v1_api_service.py +client/models/v1_api_service_condition.py +client/models/v1_api_service_list.py +client/models/v1_api_service_spec.py +client/models/v1_api_service_status.py +client/models/v1_api_versions.py +client/models/v1_app_armor_profile.py +client/models/v1_attached_volume.py +client/models/v1_audit_annotation.py +client/models/v1_aws_elastic_block_store_volume_source.py +client/models/v1_azure_disk_volume_source.py +client/models/v1_azure_file_persistent_volume_source.py +client/models/v1_azure_file_volume_source.py +client/models/v1_binding.py +client/models/v1_bound_object_reference.py +client/models/v1_capabilities.py +client/models/v1_capacity_request_policy.py +client/models/v1_capacity_request_policy_range.py +client/models/v1_capacity_requirements.py +client/models/v1_cel_device_selector.py +client/models/v1_ceph_fs_persistent_volume_source.py +client/models/v1_ceph_fs_volume_source.py +client/models/v1_certificate_signing_request.py +client/models/v1_certificate_signing_request_condition.py +client/models/v1_certificate_signing_request_list.py +client/models/v1_certificate_signing_request_spec.py +client/models/v1_certificate_signing_request_status.py +client/models/v1_cinder_persistent_volume_source.py +client/models/v1_cinder_volume_source.py +client/models/v1_client_ip_config.py +client/models/v1_cluster_role.py +client/models/v1_cluster_role_binding.py +client/models/v1_cluster_role_binding_list.py +client/models/v1_cluster_role_list.py +client/models/v1_cluster_trust_bundle_projection.py +client/models/v1_component_condition.py +client/models/v1_component_status.py +client/models/v1_component_status_list.py +client/models/v1_condition.py +client/models/v1_config_map.py +client/models/v1_config_map_env_source.py +client/models/v1_config_map_key_selector.py +client/models/v1_config_map_list.py +client/models/v1_config_map_node_config_source.py +client/models/v1_config_map_projection.py +client/models/v1_config_map_volume_source.py +client/models/v1_container.py +client/models/v1_container_extended_resource_request.py +client/models/v1_container_image.py +client/models/v1_container_port.py +client/models/v1_container_resize_policy.py +client/models/v1_container_restart_rule.py +client/models/v1_container_restart_rule_on_exit_codes.py +client/models/v1_container_state.py +client/models/v1_container_state_running.py +client/models/v1_container_state_terminated.py +client/models/v1_container_state_waiting.py +client/models/v1_container_status.py +client/models/v1_container_user.py +client/models/v1_controller_revision.py +client/models/v1_controller_revision_list.py +client/models/v1_counter.py +client/models/v1_counter_set.py +client/models/v1_cron_job.py +client/models/v1_cron_job_list.py +client/models/v1_cron_job_spec.py +client/models/v1_cron_job_status.py +client/models/v1_cross_version_object_reference.py +client/models/v1_csi_driver.py +client/models/v1_csi_driver_list.py +client/models/v1_csi_driver_spec.py +client/models/v1_csi_node.py +client/models/v1_csi_node_driver.py +client/models/v1_csi_node_list.py +client/models/v1_csi_node_spec.py +client/models/v1_csi_persistent_volume_source.py +client/models/v1_csi_storage_capacity.py +client/models/v1_csi_storage_capacity_list.py +client/models/v1_csi_volume_source.py +client/models/v1_custom_resource_column_definition.py +client/models/v1_custom_resource_conversion.py +client/models/v1_custom_resource_definition.py +client/models/v1_custom_resource_definition_condition.py +client/models/v1_custom_resource_definition_list.py +client/models/v1_custom_resource_definition_names.py +client/models/v1_custom_resource_definition_spec.py +client/models/v1_custom_resource_definition_status.py +client/models/v1_custom_resource_definition_version.py +client/models/v1_custom_resource_subresource_scale.py +client/models/v1_custom_resource_subresources.py +client/models/v1_custom_resource_validation.py +client/models/v1_daemon_endpoint.py +client/models/v1_daemon_set.py +client/models/v1_daemon_set_condition.py +client/models/v1_daemon_set_list.py +client/models/v1_daemon_set_spec.py +client/models/v1_daemon_set_status.py +client/models/v1_daemon_set_update_strategy.py +client/models/v1_delete_options.py +client/models/v1_deployment.py +client/models/v1_deployment_condition.py +client/models/v1_deployment_list.py +client/models/v1_deployment_spec.py +client/models/v1_deployment_status.py +client/models/v1_deployment_strategy.py +client/models/v1_device.py +client/models/v1_device_allocation_configuration.py +client/models/v1_device_allocation_result.py +client/models/v1_device_attribute.py +client/models/v1_device_capacity.py +client/models/v1_device_claim.py +client/models/v1_device_claim_configuration.py +client/models/v1_device_class.py +client/models/v1_device_class_configuration.py +client/models/v1_device_class_list.py +client/models/v1_device_class_spec.py +client/models/v1_device_constraint.py +client/models/v1_device_counter_consumption.py +client/models/v1_device_request.py +client/models/v1_device_request_allocation_result.py +client/models/v1_device_selector.py +client/models/v1_device_sub_request.py +client/models/v1_device_taint.py +client/models/v1_device_toleration.py +client/models/v1_downward_api_projection.py +client/models/v1_downward_api_volume_file.py +client/models/v1_downward_api_volume_source.py +client/models/v1_empty_dir_volume_source.py +client/models/v1_endpoint.py +client/models/v1_endpoint_address.py +client/models/v1_endpoint_conditions.py +client/models/v1_endpoint_hints.py +client/models/v1_endpoint_slice.py +client/models/v1_endpoint_slice_list.py +client/models/v1_endpoint_subset.py +client/models/v1_endpoints.py +client/models/v1_endpoints_list.py +client/models/v1_env_from_source.py +client/models/v1_env_var.py +client/models/v1_env_var_source.py +client/models/v1_ephemeral_container.py +client/models/v1_ephemeral_volume_source.py +client/models/v1_event_source.py +client/models/v1_eviction.py +client/models/v1_exact_device_request.py +client/models/v1_exec_action.py +client/models/v1_exempt_priority_level_configuration.py +client/models/v1_expression_warning.py +client/models/v1_external_documentation.py +client/models/v1_fc_volume_source.py +client/models/v1_field_selector_attributes.py +client/models/v1_field_selector_requirement.py +client/models/v1_file_key_selector.py +client/models/v1_flex_persistent_volume_source.py +client/models/v1_flex_volume_source.py +client/models/v1_flocker_volume_source.py +client/models/v1_flow_distinguisher_method.py +client/models/v1_flow_schema.py +client/models/v1_flow_schema_condition.py +client/models/v1_flow_schema_list.py +client/models/v1_flow_schema_spec.py +client/models/v1_flow_schema_status.py +client/models/v1_for_node.py +client/models/v1_for_zone.py +client/models/v1_gce_persistent_disk_volume_source.py +client/models/v1_git_repo_volume_source.py +client/models/v1_glusterfs_persistent_volume_source.py +client/models/v1_glusterfs_volume_source.py +client/models/v1_group_resource.py +client/models/v1_group_subject.py +client/models/v1_group_version_for_discovery.py +client/models/v1_grpc_action.py +client/models/v1_horizontal_pod_autoscaler.py +client/models/v1_horizontal_pod_autoscaler_list.py +client/models/v1_horizontal_pod_autoscaler_spec.py +client/models/v1_horizontal_pod_autoscaler_status.py +client/models/v1_host_alias.py +client/models/v1_host_ip.py +client/models/v1_host_path_volume_source.py +client/models/v1_http_get_action.py +client/models/v1_http_header.py +client/models/v1_http_ingress_path.py +client/models/v1_http_ingress_rule_value.py +client/models/v1_image_volume_source.py +client/models/v1_ingress.py +client/models/v1_ingress_backend.py +client/models/v1_ingress_class.py +client/models/v1_ingress_class_list.py +client/models/v1_ingress_class_parameters_reference.py +client/models/v1_ingress_class_spec.py +client/models/v1_ingress_list.py +client/models/v1_ingress_load_balancer_ingress.py +client/models/v1_ingress_load_balancer_status.py +client/models/v1_ingress_port_status.py +client/models/v1_ingress_rule.py +client/models/v1_ingress_service_backend.py +client/models/v1_ingress_spec.py +client/models/v1_ingress_status.py +client/models/v1_ingress_tls.py +client/models/v1_ip_address.py +client/models/v1_ip_address_list.py +client/models/v1_ip_address_spec.py +client/models/v1_ip_block.py +client/models/v1_iscsi_persistent_volume_source.py +client/models/v1_iscsi_volume_source.py +client/models/v1_job.py +client/models/v1_job_condition.py +client/models/v1_job_list.py +client/models/v1_job_spec.py +client/models/v1_job_status.py +client/models/v1_job_template_spec.py +client/models/v1_json_schema_props.py +client/models/v1_key_to_path.py +client/models/v1_label_selector.py +client/models/v1_label_selector_attributes.py +client/models/v1_label_selector_requirement.py +client/models/v1_lease.py +client/models/v1_lease_list.py +client/models/v1_lease_spec.py +client/models/v1_lifecycle.py +client/models/v1_lifecycle_handler.py +client/models/v1_limit_range.py +client/models/v1_limit_range_item.py +client/models/v1_limit_range_list.py +client/models/v1_limit_range_spec.py +client/models/v1_limit_response.py +client/models/v1_limited_priority_level_configuration.py +client/models/v1_linux_container_user.py +client/models/v1_list_meta.py +client/models/v1_load_balancer_ingress.py +client/models/v1_load_balancer_status.py +client/models/v1_local_object_reference.py +client/models/v1_local_subject_access_review.py +client/models/v1_local_volume_source.py +client/models/v1_managed_fields_entry.py +client/models/v1_match_condition.py +client/models/v1_match_resources.py +client/models/v1_modify_volume_status.py +client/models/v1_mutating_webhook.py +client/models/v1_mutating_webhook_configuration.py +client/models/v1_mutating_webhook_configuration_list.py +client/models/v1_named_rule_with_operations.py +client/models/v1_namespace.py +client/models/v1_namespace_condition.py +client/models/v1_namespace_list.py +client/models/v1_namespace_spec.py +client/models/v1_namespace_status.py +client/models/v1_network_device_data.py +client/models/v1_network_policy.py +client/models/v1_network_policy_egress_rule.py +client/models/v1_network_policy_ingress_rule.py +client/models/v1_network_policy_list.py +client/models/v1_network_policy_peer.py +client/models/v1_network_policy_port.py +client/models/v1_network_policy_spec.py +client/models/v1_nfs_volume_source.py +client/models/v1_node.py +client/models/v1_node_address.py +client/models/v1_node_affinity.py +client/models/v1_node_condition.py +client/models/v1_node_config_source.py +client/models/v1_node_config_status.py +client/models/v1_node_daemon_endpoints.py +client/models/v1_node_features.py +client/models/v1_node_list.py +client/models/v1_node_runtime_handler.py +client/models/v1_node_runtime_handler_features.py +client/models/v1_node_selector.py +client/models/v1_node_selector_requirement.py +client/models/v1_node_selector_term.py +client/models/v1_node_spec.py +client/models/v1_node_status.py +client/models/v1_node_swap_status.py +client/models/v1_node_system_info.py +client/models/v1_non_resource_attributes.py +client/models/v1_non_resource_policy_rule.py +client/models/v1_non_resource_rule.py +client/models/v1_object_field_selector.py +client/models/v1_object_meta.py +client/models/v1_object_reference.py +client/models/v1_opaque_device_configuration.py +client/models/v1_overhead.py +client/models/v1_owner_reference.py +client/models/v1_param_kind.py +client/models/v1_param_ref.py +client/models/v1_parent_reference.py +client/models/v1_persistent_volume.py +client/models/v1_persistent_volume_claim.py +client/models/v1_persistent_volume_claim_condition.py +client/models/v1_persistent_volume_claim_list.py +client/models/v1_persistent_volume_claim_spec.py +client/models/v1_persistent_volume_claim_status.py +client/models/v1_persistent_volume_claim_template.py +client/models/v1_persistent_volume_claim_volume_source.py +client/models/v1_persistent_volume_list.py +client/models/v1_persistent_volume_spec.py +client/models/v1_persistent_volume_status.py +client/models/v1_photon_persistent_disk_volume_source.py +client/models/v1_pod.py +client/models/v1_pod_affinity.py +client/models/v1_pod_affinity_term.py +client/models/v1_pod_anti_affinity.py +client/models/v1_pod_certificate_projection.py +client/models/v1_pod_condition.py +client/models/v1_pod_disruption_budget.py +client/models/v1_pod_disruption_budget_list.py +client/models/v1_pod_disruption_budget_spec.py +client/models/v1_pod_disruption_budget_status.py +client/models/v1_pod_dns_config.py +client/models/v1_pod_dns_config_option.py +client/models/v1_pod_extended_resource_claim_status.py +client/models/v1_pod_failure_policy.py +client/models/v1_pod_failure_policy_on_exit_codes_requirement.py +client/models/v1_pod_failure_policy_on_pod_conditions_pattern.py +client/models/v1_pod_failure_policy_rule.py +client/models/v1_pod_ip.py +client/models/v1_pod_list.py +client/models/v1_pod_os.py +client/models/v1_pod_readiness_gate.py +client/models/v1_pod_resource_claim.py +client/models/v1_pod_resource_claim_status.py +client/models/v1_pod_scheduling_gate.py +client/models/v1_pod_security_context.py +client/models/v1_pod_spec.py +client/models/v1_pod_status.py +client/models/v1_pod_template.py +client/models/v1_pod_template_list.py +client/models/v1_pod_template_spec.py +client/models/v1_policy_rule.py +client/models/v1_policy_rules_with_subjects.py +client/models/v1_port_status.py +client/models/v1_portworx_volume_source.py +client/models/v1_preconditions.py +client/models/v1_preferred_scheduling_term.py +client/models/v1_priority_class.py +client/models/v1_priority_class_list.py +client/models/v1_priority_level_configuration.py +client/models/v1_priority_level_configuration_condition.py +client/models/v1_priority_level_configuration_list.py +client/models/v1_priority_level_configuration_reference.py +client/models/v1_priority_level_configuration_spec.py +client/models/v1_priority_level_configuration_status.py +client/models/v1_probe.py +client/models/v1_projected_volume_source.py +client/models/v1_queuing_configuration.py +client/models/v1_quobyte_volume_source.py +client/models/v1_rbd_persistent_volume_source.py +client/models/v1_rbd_volume_source.py +client/models/v1_replica_set.py +client/models/v1_replica_set_condition.py +client/models/v1_replica_set_list.py +client/models/v1_replica_set_spec.py +client/models/v1_replica_set_status.py +client/models/v1_replication_controller.py +client/models/v1_replication_controller_condition.py +client/models/v1_replication_controller_list.py +client/models/v1_replication_controller_spec.py +client/models/v1_replication_controller_status.py +client/models/v1_resource_attributes.py +client/models/v1_resource_claim_consumer_reference.py +client/models/v1_resource_claim_list.py +client/models/v1_resource_claim_spec.py +client/models/v1_resource_claim_status.py +client/models/v1_resource_claim_template.py +client/models/v1_resource_claim_template_list.py +client/models/v1_resource_claim_template_spec.py +client/models/v1_resource_field_selector.py +client/models/v1_resource_health.py +client/models/v1_resource_policy_rule.py +client/models/v1_resource_pool.py +client/models/v1_resource_quota.py +client/models/v1_resource_quota_list.py +client/models/v1_resource_quota_spec.py +client/models/v1_resource_quota_status.py +client/models/v1_resource_requirements.py +client/models/v1_resource_rule.py +client/models/v1_resource_slice.py +client/models/v1_resource_slice_list.py +client/models/v1_resource_slice_spec.py +client/models/v1_resource_status.py +client/models/v1_role.py +client/models/v1_role_binding.py +client/models/v1_role_binding_list.py +client/models/v1_role_list.py +client/models/v1_role_ref.py +client/models/v1_rolling_update_daemon_set.py +client/models/v1_rolling_update_deployment.py +client/models/v1_rolling_update_stateful_set_strategy.py +client/models/v1_rule_with_operations.py +client/models/v1_runtime_class.py +client/models/v1_runtime_class_list.py +client/models/v1_scale.py +client/models/v1_scale_io_persistent_volume_source.py +client/models/v1_scale_io_volume_source.py +client/models/v1_scale_spec.py +client/models/v1_scale_status.py +client/models/v1_scheduling.py +client/models/v1_scope_selector.py +client/models/v1_scoped_resource_selector_requirement.py +client/models/v1_se_linux_options.py +client/models/v1_seccomp_profile.py +client/models/v1_secret.py +client/models/v1_secret_env_source.py +client/models/v1_secret_key_selector.py +client/models/v1_secret_list.py +client/models/v1_secret_projection.py +client/models/v1_secret_reference.py +client/models/v1_secret_volume_source.py +client/models/v1_security_context.py +client/models/v1_selectable_field.py +client/models/v1_self_subject_access_review.py +client/models/v1_self_subject_access_review_spec.py +client/models/v1_self_subject_review.py +client/models/v1_self_subject_review_status.py +client/models/v1_self_subject_rules_review.py +client/models/v1_self_subject_rules_review_spec.py +client/models/v1_server_address_by_client_cidr.py +client/models/v1_service.py +client/models/v1_service_account.py +client/models/v1_service_account_list.py +client/models/v1_service_account_subject.py +client/models/v1_service_account_token_projection.py +client/models/v1_service_backend_port.py +client/models/v1_service_cidr.py +client/models/v1_service_cidr_list.py +client/models/v1_service_cidr_spec.py +client/models/v1_service_cidr_status.py +client/models/v1_service_list.py +client/models/v1_service_port.py +client/models/v1_service_spec.py +client/models/v1_service_status.py +client/models/v1_session_affinity_config.py +client/models/v1_sleep_action.py +client/models/v1_stateful_set.py +client/models/v1_stateful_set_condition.py +client/models/v1_stateful_set_list.py +client/models/v1_stateful_set_ordinals.py +client/models/v1_stateful_set_persistent_volume_claim_retention_policy.py +client/models/v1_stateful_set_spec.py +client/models/v1_stateful_set_status.py +client/models/v1_stateful_set_update_strategy.py +client/models/v1_status.py +client/models/v1_status_cause.py +client/models/v1_status_details.py +client/models/v1_storage_class.py +client/models/v1_storage_class_list.py +client/models/v1_storage_os_persistent_volume_source.py +client/models/v1_storage_os_volume_source.py +client/models/v1_subject_access_review.py +client/models/v1_subject_access_review_spec.py +client/models/v1_subject_access_review_status.py +client/models/v1_subject_rules_review_status.py +client/models/v1_success_policy.py +client/models/v1_success_policy_rule.py +client/models/v1_sysctl.py +client/models/v1_taint.py +client/models/v1_tcp_socket_action.py +client/models/v1_token_request_spec.py +client/models/v1_token_request_status.py +client/models/v1_token_review.py +client/models/v1_token_review_spec.py +client/models/v1_token_review_status.py +client/models/v1_toleration.py +client/models/v1_topology_selector_label_requirement.py +client/models/v1_topology_selector_term.py +client/models/v1_topology_spread_constraint.py +client/models/v1_type_checking.py +client/models/v1_typed_local_object_reference.py +client/models/v1_typed_object_reference.py +client/models/v1_uncounted_terminated_pods.py +client/models/v1_user_info.py +client/models/v1_user_subject.py +client/models/v1_validating_admission_policy.py +client/models/v1_validating_admission_policy_binding.py +client/models/v1_validating_admission_policy_binding_list.py +client/models/v1_validating_admission_policy_binding_spec.py +client/models/v1_validating_admission_policy_list.py +client/models/v1_validating_admission_policy_spec.py +client/models/v1_validating_admission_policy_status.py +client/models/v1_validating_webhook.py +client/models/v1_validating_webhook_configuration.py +client/models/v1_validating_webhook_configuration_list.py +client/models/v1_validation.py +client/models/v1_validation_rule.py +client/models/v1_variable.py +client/models/v1_volume.py +client/models/v1_volume_attachment.py +client/models/v1_volume_attachment_list.py +client/models/v1_volume_attachment_source.py +client/models/v1_volume_attachment_spec.py +client/models/v1_volume_attachment_status.py +client/models/v1_volume_attributes_class.py +client/models/v1_volume_attributes_class_list.py +client/models/v1_volume_device.py +client/models/v1_volume_error.py +client/models/v1_volume_mount.py +client/models/v1_volume_mount_status.py +client/models/v1_volume_node_affinity.py +client/models/v1_volume_node_resources.py +client/models/v1_volume_projection.py +client/models/v1_volume_resource_requirements.py +client/models/v1_vsphere_virtual_disk_volume_source.py +client/models/v1_watch_event.py +client/models/v1_webhook_conversion.py +client/models/v1_weighted_pod_affinity_term.py +client/models/v1_windows_security_context_options.py +client/models/v1_workload_reference.py +client/models/v1alpha1_apply_configuration.py +client/models/v1alpha1_cluster_trust_bundle.py +client/models/v1alpha1_cluster_trust_bundle_list.py +client/models/v1alpha1_cluster_trust_bundle_spec.py +client/models/v1alpha1_gang_scheduling_policy.py +client/models/v1alpha1_json_patch.py +client/models/v1alpha1_match_condition.py +client/models/v1alpha1_match_resources.py +client/models/v1alpha1_mutating_admission_policy.py +client/models/v1alpha1_mutating_admission_policy_binding.py +client/models/v1alpha1_mutating_admission_policy_binding_list.py +client/models/v1alpha1_mutating_admission_policy_binding_spec.py +client/models/v1alpha1_mutating_admission_policy_list.py +client/models/v1alpha1_mutating_admission_policy_spec.py +client/models/v1alpha1_mutation.py +client/models/v1alpha1_named_rule_with_operations.py +client/models/v1alpha1_param_kind.py +client/models/v1alpha1_param_ref.py +client/models/v1alpha1_pod_group.py +client/models/v1alpha1_pod_group_policy.py +client/models/v1alpha1_server_storage_version.py +client/models/v1alpha1_storage_version.py +client/models/v1alpha1_storage_version_condition.py +client/models/v1alpha1_storage_version_list.py +client/models/v1alpha1_storage_version_status.py +client/models/v1alpha1_typed_local_object_reference.py +client/models/v1alpha1_variable.py +client/models/v1alpha1_workload.py +client/models/v1alpha1_workload_list.py +client/models/v1alpha1_workload_spec.py +client/models/v1alpha2_lease_candidate.py +client/models/v1alpha2_lease_candidate_list.py +client/models/v1alpha2_lease_candidate_spec.py +client/models/v1alpha3_device_taint.py +client/models/v1alpha3_device_taint_rule.py +client/models/v1alpha3_device_taint_rule_list.py +client/models/v1alpha3_device_taint_rule_spec.py +client/models/v1alpha3_device_taint_rule_status.py +client/models/v1alpha3_device_taint_selector.py +client/models/v1beta1_allocated_device_status.py +client/models/v1beta1_allocation_result.py +client/models/v1beta1_apply_configuration.py +client/models/v1beta1_basic_device.py +client/models/v1beta1_capacity_request_policy.py +client/models/v1beta1_capacity_request_policy_range.py +client/models/v1beta1_capacity_requirements.py +client/models/v1beta1_cel_device_selector.py +client/models/v1beta1_cluster_trust_bundle.py +client/models/v1beta1_cluster_trust_bundle_list.py +client/models/v1beta1_cluster_trust_bundle_spec.py +client/models/v1beta1_counter.py +client/models/v1beta1_counter_set.py +client/models/v1beta1_device.py +client/models/v1beta1_device_allocation_configuration.py +client/models/v1beta1_device_allocation_result.py +client/models/v1beta1_device_attribute.py +client/models/v1beta1_device_capacity.py +client/models/v1beta1_device_claim.py +client/models/v1beta1_device_claim_configuration.py +client/models/v1beta1_device_class.py +client/models/v1beta1_device_class_configuration.py +client/models/v1beta1_device_class_list.py +client/models/v1beta1_device_class_spec.py +client/models/v1beta1_device_constraint.py +client/models/v1beta1_device_counter_consumption.py +client/models/v1beta1_device_request.py +client/models/v1beta1_device_request_allocation_result.py +client/models/v1beta1_device_selector.py +client/models/v1beta1_device_sub_request.py +client/models/v1beta1_device_taint.py +client/models/v1beta1_device_toleration.py +client/models/v1beta1_ip_address.py +client/models/v1beta1_ip_address_list.py +client/models/v1beta1_ip_address_spec.py +client/models/v1beta1_json_patch.py +client/models/v1beta1_lease_candidate.py +client/models/v1beta1_lease_candidate_list.py +client/models/v1beta1_lease_candidate_spec.py +client/models/v1beta1_match_condition.py +client/models/v1beta1_match_resources.py +client/models/v1beta1_mutating_admission_policy.py +client/models/v1beta1_mutating_admission_policy_binding.py +client/models/v1beta1_mutating_admission_policy_binding_list.py +client/models/v1beta1_mutating_admission_policy_binding_spec.py +client/models/v1beta1_mutating_admission_policy_list.py +client/models/v1beta1_mutating_admission_policy_spec.py +client/models/v1beta1_mutation.py +client/models/v1beta1_named_rule_with_operations.py +client/models/v1beta1_network_device_data.py +client/models/v1beta1_opaque_device_configuration.py +client/models/v1beta1_param_kind.py +client/models/v1beta1_param_ref.py +client/models/v1beta1_parent_reference.py +client/models/v1beta1_pod_certificate_request.py +client/models/v1beta1_pod_certificate_request_list.py +client/models/v1beta1_pod_certificate_request_spec.py +client/models/v1beta1_pod_certificate_request_status.py +client/models/v1beta1_resource_claim.py +client/models/v1beta1_resource_claim_consumer_reference.py +client/models/v1beta1_resource_claim_list.py +client/models/v1beta1_resource_claim_spec.py +client/models/v1beta1_resource_claim_status.py +client/models/v1beta1_resource_claim_template.py +client/models/v1beta1_resource_claim_template_list.py +client/models/v1beta1_resource_claim_template_spec.py +client/models/v1beta1_resource_pool.py +client/models/v1beta1_resource_slice.py +client/models/v1beta1_resource_slice_list.py +client/models/v1beta1_resource_slice_spec.py +client/models/v1beta1_service_cidr.py +client/models/v1beta1_service_cidr_list.py +client/models/v1beta1_service_cidr_spec.py +client/models/v1beta1_service_cidr_status.py +client/models/v1beta1_storage_version_migration.py +client/models/v1beta1_storage_version_migration_list.py +client/models/v1beta1_storage_version_migration_spec.py +client/models/v1beta1_storage_version_migration_status.py +client/models/v1beta1_variable.py +client/models/v1beta1_volume_attributes_class.py +client/models/v1beta1_volume_attributes_class_list.py +client/models/v1beta2_allocated_device_status.py +client/models/v1beta2_allocation_result.py +client/models/v1beta2_capacity_request_policy.py +client/models/v1beta2_capacity_request_policy_range.py +client/models/v1beta2_capacity_requirements.py +client/models/v1beta2_cel_device_selector.py +client/models/v1beta2_counter.py +client/models/v1beta2_counter_set.py +client/models/v1beta2_device.py +client/models/v1beta2_device_allocation_configuration.py +client/models/v1beta2_device_allocation_result.py +client/models/v1beta2_device_attribute.py +client/models/v1beta2_device_capacity.py +client/models/v1beta2_device_claim.py +client/models/v1beta2_device_claim_configuration.py +client/models/v1beta2_device_class.py +client/models/v1beta2_device_class_configuration.py +client/models/v1beta2_device_class_list.py +client/models/v1beta2_device_class_spec.py +client/models/v1beta2_device_constraint.py +client/models/v1beta2_device_counter_consumption.py +client/models/v1beta2_device_request.py +client/models/v1beta2_device_request_allocation_result.py +client/models/v1beta2_device_selector.py +client/models/v1beta2_device_sub_request.py +client/models/v1beta2_device_taint.py +client/models/v1beta2_device_toleration.py +client/models/v1beta2_exact_device_request.py +client/models/v1beta2_network_device_data.py +client/models/v1beta2_opaque_device_configuration.py +client/models/v1beta2_resource_claim.py +client/models/v1beta2_resource_claim_consumer_reference.py +client/models/v1beta2_resource_claim_list.py +client/models/v1beta2_resource_claim_spec.py +client/models/v1beta2_resource_claim_status.py +client/models/v1beta2_resource_claim_template.py +client/models/v1beta2_resource_claim_template_list.py +client/models/v1beta2_resource_claim_template_spec.py +client/models/v1beta2_resource_pool.py +client/models/v1beta2_resource_slice.py +client/models/v1beta2_resource_slice_list.py +client/models/v1beta2_resource_slice_spec.py +client/models/v2_api_group_discovery.py +client/models/v2_api_group_discovery_list.py +client/models/v2_api_resource_discovery.py +client/models/v2_api_subresource_discovery.py +client/models/v2_api_version_discovery.py +client/models/v2_container_resource_metric_source.py +client/models/v2_container_resource_metric_status.py +client/models/v2_cross_version_object_reference.py +client/models/v2_external_metric_source.py +client/models/v2_external_metric_status.py +client/models/v2_horizontal_pod_autoscaler.py +client/models/v2_horizontal_pod_autoscaler_behavior.py +client/models/v2_horizontal_pod_autoscaler_condition.py +client/models/v2_horizontal_pod_autoscaler_list.py +client/models/v2_horizontal_pod_autoscaler_spec.py +client/models/v2_horizontal_pod_autoscaler_status.py +client/models/v2_hpa_scaling_policy.py +client/models/v2_hpa_scaling_rules.py +client/models/v2_metric_identifier.py +client/models/v2_metric_spec.py +client/models/v2_metric_status.py +client/models/v2_metric_target.py +client/models/v2_metric_value_status.py +client/models/v2_object_metric_source.py +client/models/v2_object_metric_status.py +client/models/v2_pods_metric_source.py +client/models/v2_pods_metric_status.py +client/models/v2_resource_metric_source.py +client/models/v2_resource_metric_status.py +client/models/v2beta1_api_group_discovery.py +client/models/v2beta1_api_group_discovery_list.py +client/models/v2beta1_api_resource_discovery.py +client/models/v2beta1_api_subresource_discovery.py +client/models/v2beta1_api_version_discovery.py +client/models/version_info.py +client/rest.py +docs/AdmissionregistrationApi.md +docs/AdmissionregistrationV1Api.md +docs/AdmissionregistrationV1ServiceReference.md +docs/AdmissionregistrationV1WebhookClientConfig.md +docs/AdmissionregistrationV1alpha1Api.md +docs/AdmissionregistrationV1beta1Api.md +docs/ApiextensionsApi.md +docs/ApiextensionsV1Api.md +docs/ApiextensionsV1ServiceReference.md +docs/ApiextensionsV1WebhookClientConfig.md +docs/ApiregistrationApi.md +docs/ApiregistrationV1Api.md +docs/ApiregistrationV1ServiceReference.md +docs/ApisApi.md +docs/AppsApi.md +docs/AppsV1Api.md +docs/AuthenticationApi.md +docs/AuthenticationV1Api.md +docs/AuthenticationV1TokenRequest.md +docs/AuthorizationApi.md +docs/AuthorizationV1Api.md +docs/AutoscalingApi.md +docs/AutoscalingV1Api.md +docs/AutoscalingV2Api.md +docs/BatchApi.md +docs/BatchV1Api.md +docs/CertificatesApi.md +docs/CertificatesV1Api.md +docs/CertificatesV1alpha1Api.md +docs/CertificatesV1beta1Api.md +docs/CoordinationApi.md +docs/CoordinationV1Api.md +docs/CoordinationV1alpha2Api.md +docs/CoordinationV1beta1Api.md +docs/CoreApi.md +docs/CoreV1Api.md +docs/CoreV1EndpointPort.md +docs/CoreV1Event.md +docs/CoreV1EventList.md +docs/CoreV1EventSeries.md +docs/CoreV1ResourceClaim.md +docs/CustomObjectsApi.md +docs/DiscoveryApi.md +docs/DiscoveryV1Api.md +docs/DiscoveryV1EndpointPort.md +docs/EventsApi.md +docs/EventsV1Api.md +docs/EventsV1Event.md +docs/EventsV1EventList.md +docs/EventsV1EventSeries.md +docs/FlowcontrolApiserverApi.md +docs/FlowcontrolApiserverV1Api.md +docs/FlowcontrolV1Subject.md +docs/InternalApiserverApi.md +docs/InternalApiserverV1alpha1Api.md +docs/LogsApi.md +docs/NetworkingApi.md +docs/NetworkingV1Api.md +docs/NetworkingV1beta1Api.md +docs/NodeApi.md +docs/NodeV1Api.md +docs/OpenidApi.md +docs/PolicyApi.md +docs/PolicyV1Api.md +docs/RbacAuthorizationApi.md +docs/RbacAuthorizationV1Api.md +docs/RbacV1Subject.md +docs/ResourceApi.md +docs/ResourceV1Api.md +docs/ResourceV1ResourceClaim.md +docs/ResourceV1alpha3Api.md +docs/ResourceV1beta1Api.md +docs/ResourceV1beta2Api.md +docs/SchedulingApi.md +docs/SchedulingV1Api.md +docs/SchedulingV1alpha1Api.md +docs/StorageApi.md +docs/StorageV1Api.md +docs/StorageV1TokenRequest.md +docs/StorageV1beta1Api.md +docs/StoragemigrationApi.md +docs/StoragemigrationV1beta1Api.md +docs/V1APIGroup.md +docs/V1APIGroupList.md +docs/V1APIResource.md +docs/V1APIResourceList.md +docs/V1APIService.md +docs/V1APIServiceCondition.md +docs/V1APIServiceList.md +docs/V1APIServiceSpec.md +docs/V1APIServiceStatus.md +docs/V1APIVersions.md +docs/V1AWSElasticBlockStoreVolumeSource.md +docs/V1Affinity.md +docs/V1AggregationRule.md +docs/V1AllocatedDeviceStatus.md +docs/V1AllocationResult.md +docs/V1AppArmorProfile.md +docs/V1AttachedVolume.md +docs/V1AuditAnnotation.md +docs/V1AzureDiskVolumeSource.md +docs/V1AzureFilePersistentVolumeSource.md +docs/V1AzureFileVolumeSource.md +docs/V1Binding.md +docs/V1BoundObjectReference.md +docs/V1CELDeviceSelector.md +docs/V1CSIDriver.md +docs/V1CSIDriverList.md +docs/V1CSIDriverSpec.md +docs/V1CSINode.md +docs/V1CSINodeDriver.md +docs/V1CSINodeList.md +docs/V1CSINodeSpec.md +docs/V1CSIPersistentVolumeSource.md +docs/V1CSIStorageCapacity.md +docs/V1CSIStorageCapacityList.md +docs/V1CSIVolumeSource.md +docs/V1Capabilities.md +docs/V1CapacityRequestPolicy.md +docs/V1CapacityRequestPolicyRange.md +docs/V1CapacityRequirements.md +docs/V1CephFSPersistentVolumeSource.md +docs/V1CephFSVolumeSource.md +docs/V1CertificateSigningRequest.md +docs/V1CertificateSigningRequestCondition.md +docs/V1CertificateSigningRequestList.md +docs/V1CertificateSigningRequestSpec.md +docs/V1CertificateSigningRequestStatus.md +docs/V1CinderPersistentVolumeSource.md +docs/V1CinderVolumeSource.md +docs/V1ClientIPConfig.md +docs/V1ClusterRole.md +docs/V1ClusterRoleBinding.md +docs/V1ClusterRoleBindingList.md +docs/V1ClusterRoleList.md +docs/V1ClusterTrustBundleProjection.md +docs/V1ComponentCondition.md +docs/V1ComponentStatus.md +docs/V1ComponentStatusList.md +docs/V1Condition.md +docs/V1ConfigMap.md +docs/V1ConfigMapEnvSource.md +docs/V1ConfigMapKeySelector.md +docs/V1ConfigMapList.md +docs/V1ConfigMapNodeConfigSource.md +docs/V1ConfigMapProjection.md +docs/V1ConfigMapVolumeSource.md +docs/V1Container.md +docs/V1ContainerExtendedResourceRequest.md +docs/V1ContainerImage.md +docs/V1ContainerPort.md +docs/V1ContainerResizePolicy.md +docs/V1ContainerRestartRule.md +docs/V1ContainerRestartRuleOnExitCodes.md +docs/V1ContainerState.md +docs/V1ContainerStateRunning.md +docs/V1ContainerStateTerminated.md +docs/V1ContainerStateWaiting.md +docs/V1ContainerStatus.md +docs/V1ContainerUser.md +docs/V1ControllerRevision.md +docs/V1ControllerRevisionList.md +docs/V1Counter.md +docs/V1CounterSet.md +docs/V1CronJob.md +docs/V1CronJobList.md +docs/V1CronJobSpec.md +docs/V1CronJobStatus.md +docs/V1CrossVersionObjectReference.md +docs/V1CustomResourceColumnDefinition.md +docs/V1CustomResourceConversion.md +docs/V1CustomResourceDefinition.md +docs/V1CustomResourceDefinitionCondition.md +docs/V1CustomResourceDefinitionList.md +docs/V1CustomResourceDefinitionNames.md +docs/V1CustomResourceDefinitionSpec.md +docs/V1CustomResourceDefinitionStatus.md +docs/V1CustomResourceDefinitionVersion.md +docs/V1CustomResourceSubresourceScale.md +docs/V1CustomResourceSubresources.md +docs/V1CustomResourceValidation.md +docs/V1DaemonEndpoint.md +docs/V1DaemonSet.md +docs/V1DaemonSetCondition.md +docs/V1DaemonSetList.md +docs/V1DaemonSetSpec.md +docs/V1DaemonSetStatus.md +docs/V1DaemonSetUpdateStrategy.md +docs/V1DeleteOptions.md +docs/V1Deployment.md +docs/V1DeploymentCondition.md +docs/V1DeploymentList.md +docs/V1DeploymentSpec.md +docs/V1DeploymentStatus.md +docs/V1DeploymentStrategy.md +docs/V1Device.md +docs/V1DeviceAllocationConfiguration.md +docs/V1DeviceAllocationResult.md +docs/V1DeviceAttribute.md +docs/V1DeviceCapacity.md +docs/V1DeviceClaim.md +docs/V1DeviceClaimConfiguration.md +docs/V1DeviceClass.md +docs/V1DeviceClassConfiguration.md +docs/V1DeviceClassList.md +docs/V1DeviceClassSpec.md +docs/V1DeviceConstraint.md +docs/V1DeviceCounterConsumption.md +docs/V1DeviceRequest.md +docs/V1DeviceRequestAllocationResult.md +docs/V1DeviceSelector.md +docs/V1DeviceSubRequest.md +docs/V1DeviceTaint.md +docs/V1DeviceToleration.md +docs/V1DownwardAPIProjection.md +docs/V1DownwardAPIVolumeFile.md +docs/V1DownwardAPIVolumeSource.md +docs/V1EmptyDirVolumeSource.md +docs/V1Endpoint.md +docs/V1EndpointAddress.md +docs/V1EndpointConditions.md +docs/V1EndpointHints.md +docs/V1EndpointSlice.md +docs/V1EndpointSliceList.md +docs/V1EndpointSubset.md +docs/V1Endpoints.md +docs/V1EndpointsList.md +docs/V1EnvFromSource.md +docs/V1EnvVar.md +docs/V1EnvVarSource.md +docs/V1EphemeralContainer.md +docs/V1EphemeralVolumeSource.md +docs/V1EventSource.md +docs/V1Eviction.md +docs/V1ExactDeviceRequest.md +docs/V1ExecAction.md +docs/V1ExemptPriorityLevelConfiguration.md +docs/V1ExpressionWarning.md +docs/V1ExternalDocumentation.md +docs/V1FCVolumeSource.md +docs/V1FieldSelectorAttributes.md +docs/V1FieldSelectorRequirement.md +docs/V1FileKeySelector.md +docs/V1FlexPersistentVolumeSource.md +docs/V1FlexVolumeSource.md +docs/V1FlockerVolumeSource.md +docs/V1FlowDistinguisherMethod.md +docs/V1FlowSchema.md +docs/V1FlowSchemaCondition.md +docs/V1FlowSchemaList.md +docs/V1FlowSchemaSpec.md +docs/V1FlowSchemaStatus.md +docs/V1ForNode.md +docs/V1ForZone.md +docs/V1GCEPersistentDiskVolumeSource.md +docs/V1GRPCAction.md +docs/V1GitRepoVolumeSource.md +docs/V1GlusterfsPersistentVolumeSource.md +docs/V1GlusterfsVolumeSource.md +docs/V1GroupResource.md +docs/V1GroupSubject.md +docs/V1GroupVersionForDiscovery.md +docs/V1HTTPGetAction.md +docs/V1HTTPHeader.md +docs/V1HTTPIngressPath.md +docs/V1HTTPIngressRuleValue.md +docs/V1HorizontalPodAutoscaler.md +docs/V1HorizontalPodAutoscalerList.md +docs/V1HorizontalPodAutoscalerSpec.md +docs/V1HorizontalPodAutoscalerStatus.md +docs/V1HostAlias.md +docs/V1HostIP.md +docs/V1HostPathVolumeSource.md +docs/V1IPAddress.md +docs/V1IPAddressList.md +docs/V1IPAddressSpec.md +docs/V1IPBlock.md +docs/V1ISCSIPersistentVolumeSource.md +docs/V1ISCSIVolumeSource.md +docs/V1ImageVolumeSource.md +docs/V1Ingress.md +docs/V1IngressBackend.md +docs/V1IngressClass.md +docs/V1IngressClassList.md +docs/V1IngressClassParametersReference.md +docs/V1IngressClassSpec.md +docs/V1IngressList.md +docs/V1IngressLoadBalancerIngress.md +docs/V1IngressLoadBalancerStatus.md +docs/V1IngressPortStatus.md +docs/V1IngressRule.md +docs/V1IngressServiceBackend.md +docs/V1IngressSpec.md +docs/V1IngressStatus.md +docs/V1IngressTLS.md +docs/V1JSONSchemaProps.md +docs/V1Job.md +docs/V1JobCondition.md +docs/V1JobList.md +docs/V1JobSpec.md +docs/V1JobStatus.md +docs/V1JobTemplateSpec.md +docs/V1KeyToPath.md +docs/V1LabelSelector.md +docs/V1LabelSelectorAttributes.md +docs/V1LabelSelectorRequirement.md +docs/V1Lease.md +docs/V1LeaseList.md +docs/V1LeaseSpec.md +docs/V1Lifecycle.md +docs/V1LifecycleHandler.md +docs/V1LimitRange.md +docs/V1LimitRangeItem.md +docs/V1LimitRangeList.md +docs/V1LimitRangeSpec.md +docs/V1LimitResponse.md +docs/V1LimitedPriorityLevelConfiguration.md +docs/V1LinuxContainerUser.md +docs/V1ListMeta.md +docs/V1LoadBalancerIngress.md +docs/V1LoadBalancerStatus.md +docs/V1LocalObjectReference.md +docs/V1LocalSubjectAccessReview.md +docs/V1LocalVolumeSource.md +docs/V1ManagedFieldsEntry.md +docs/V1MatchCondition.md +docs/V1MatchResources.md +docs/V1ModifyVolumeStatus.md +docs/V1MutatingWebhook.md +docs/V1MutatingWebhookConfiguration.md +docs/V1MutatingWebhookConfigurationList.md +docs/V1NFSVolumeSource.md +docs/V1NamedRuleWithOperations.md +docs/V1Namespace.md +docs/V1NamespaceCondition.md +docs/V1NamespaceList.md +docs/V1NamespaceSpec.md +docs/V1NamespaceStatus.md +docs/V1NetworkDeviceData.md +docs/V1NetworkPolicy.md +docs/V1NetworkPolicyEgressRule.md +docs/V1NetworkPolicyIngressRule.md +docs/V1NetworkPolicyList.md +docs/V1NetworkPolicyPeer.md +docs/V1NetworkPolicyPort.md +docs/V1NetworkPolicySpec.md +docs/V1Node.md +docs/V1NodeAddress.md +docs/V1NodeAffinity.md +docs/V1NodeCondition.md +docs/V1NodeConfigSource.md +docs/V1NodeConfigStatus.md +docs/V1NodeDaemonEndpoints.md +docs/V1NodeFeatures.md +docs/V1NodeList.md +docs/V1NodeRuntimeHandler.md +docs/V1NodeRuntimeHandlerFeatures.md +docs/V1NodeSelector.md +docs/V1NodeSelectorRequirement.md +docs/V1NodeSelectorTerm.md +docs/V1NodeSpec.md +docs/V1NodeStatus.md +docs/V1NodeSwapStatus.md +docs/V1NodeSystemInfo.md +docs/V1NonResourceAttributes.md +docs/V1NonResourcePolicyRule.md +docs/V1NonResourceRule.md +docs/V1ObjectFieldSelector.md +docs/V1ObjectMeta.md +docs/V1ObjectReference.md +docs/V1OpaqueDeviceConfiguration.md +docs/V1Overhead.md +docs/V1OwnerReference.md +docs/V1ParamKind.md +docs/V1ParamRef.md +docs/V1ParentReference.md +docs/V1PersistentVolume.md +docs/V1PersistentVolumeClaim.md +docs/V1PersistentVolumeClaimCondition.md +docs/V1PersistentVolumeClaimList.md +docs/V1PersistentVolumeClaimSpec.md +docs/V1PersistentVolumeClaimStatus.md +docs/V1PersistentVolumeClaimTemplate.md +docs/V1PersistentVolumeClaimVolumeSource.md +docs/V1PersistentVolumeList.md +docs/V1PersistentVolumeSpec.md +docs/V1PersistentVolumeStatus.md +docs/V1PhotonPersistentDiskVolumeSource.md +docs/V1Pod.md +docs/V1PodAffinity.md +docs/V1PodAffinityTerm.md +docs/V1PodAntiAffinity.md +docs/V1PodCertificateProjection.md +docs/V1PodCondition.md +docs/V1PodDNSConfig.md +docs/V1PodDNSConfigOption.md +docs/V1PodDisruptionBudget.md +docs/V1PodDisruptionBudgetList.md +docs/V1PodDisruptionBudgetSpec.md +docs/V1PodDisruptionBudgetStatus.md +docs/V1PodExtendedResourceClaimStatus.md +docs/V1PodFailurePolicy.md +docs/V1PodFailurePolicyOnExitCodesRequirement.md +docs/V1PodFailurePolicyOnPodConditionsPattern.md +docs/V1PodFailurePolicyRule.md +docs/V1PodIP.md +docs/V1PodList.md +docs/V1PodOS.md +docs/V1PodReadinessGate.md +docs/V1PodResourceClaim.md +docs/V1PodResourceClaimStatus.md +docs/V1PodSchedulingGate.md +docs/V1PodSecurityContext.md +docs/V1PodSpec.md +docs/V1PodStatus.md +docs/V1PodTemplate.md +docs/V1PodTemplateList.md +docs/V1PodTemplateSpec.md +docs/V1PolicyRule.md +docs/V1PolicyRulesWithSubjects.md +docs/V1PortStatus.md +docs/V1PortworxVolumeSource.md +docs/V1Preconditions.md +docs/V1PreferredSchedulingTerm.md +docs/V1PriorityClass.md +docs/V1PriorityClassList.md +docs/V1PriorityLevelConfiguration.md +docs/V1PriorityLevelConfigurationCondition.md +docs/V1PriorityLevelConfigurationList.md +docs/V1PriorityLevelConfigurationReference.md +docs/V1PriorityLevelConfigurationSpec.md +docs/V1PriorityLevelConfigurationStatus.md +docs/V1Probe.md +docs/V1ProjectedVolumeSource.md +docs/V1QueuingConfiguration.md +docs/V1QuobyteVolumeSource.md +docs/V1RBDPersistentVolumeSource.md +docs/V1RBDVolumeSource.md +docs/V1ReplicaSet.md +docs/V1ReplicaSetCondition.md +docs/V1ReplicaSetList.md +docs/V1ReplicaSetSpec.md +docs/V1ReplicaSetStatus.md +docs/V1ReplicationController.md +docs/V1ReplicationControllerCondition.md +docs/V1ReplicationControllerList.md +docs/V1ReplicationControllerSpec.md +docs/V1ReplicationControllerStatus.md +docs/V1ResourceAttributes.md +docs/V1ResourceClaimConsumerReference.md +docs/V1ResourceClaimList.md +docs/V1ResourceClaimSpec.md +docs/V1ResourceClaimStatus.md +docs/V1ResourceClaimTemplate.md +docs/V1ResourceClaimTemplateList.md +docs/V1ResourceClaimTemplateSpec.md +docs/V1ResourceFieldSelector.md +docs/V1ResourceHealth.md +docs/V1ResourcePolicyRule.md +docs/V1ResourcePool.md +docs/V1ResourceQuota.md +docs/V1ResourceQuotaList.md +docs/V1ResourceQuotaSpec.md +docs/V1ResourceQuotaStatus.md +docs/V1ResourceRequirements.md +docs/V1ResourceRule.md +docs/V1ResourceSlice.md +docs/V1ResourceSliceList.md +docs/V1ResourceSliceSpec.md +docs/V1ResourceStatus.md +docs/V1Role.md +docs/V1RoleBinding.md +docs/V1RoleBindingList.md +docs/V1RoleList.md +docs/V1RoleRef.md +docs/V1RollingUpdateDaemonSet.md +docs/V1RollingUpdateDeployment.md +docs/V1RollingUpdateStatefulSetStrategy.md +docs/V1RuleWithOperations.md +docs/V1RuntimeClass.md +docs/V1RuntimeClassList.md +docs/V1SELinuxOptions.md +docs/V1Scale.md +docs/V1ScaleIOPersistentVolumeSource.md +docs/V1ScaleIOVolumeSource.md +docs/V1ScaleSpec.md +docs/V1ScaleStatus.md +docs/V1Scheduling.md +docs/V1ScopeSelector.md +docs/V1ScopedResourceSelectorRequirement.md +docs/V1SeccompProfile.md +docs/V1Secret.md +docs/V1SecretEnvSource.md +docs/V1SecretKeySelector.md +docs/V1SecretList.md +docs/V1SecretProjection.md +docs/V1SecretReference.md +docs/V1SecretVolumeSource.md +docs/V1SecurityContext.md +docs/V1SelectableField.md +docs/V1SelfSubjectAccessReview.md +docs/V1SelfSubjectAccessReviewSpec.md +docs/V1SelfSubjectReview.md +docs/V1SelfSubjectReviewStatus.md +docs/V1SelfSubjectRulesReview.md +docs/V1SelfSubjectRulesReviewSpec.md +docs/V1ServerAddressByClientCIDR.md +docs/V1Service.md +docs/V1ServiceAccount.md +docs/V1ServiceAccountList.md +docs/V1ServiceAccountSubject.md +docs/V1ServiceAccountTokenProjection.md +docs/V1ServiceBackendPort.md +docs/V1ServiceCIDR.md +docs/V1ServiceCIDRList.md +docs/V1ServiceCIDRSpec.md +docs/V1ServiceCIDRStatus.md +docs/V1ServiceList.md +docs/V1ServicePort.md +docs/V1ServiceSpec.md +docs/V1ServiceStatus.md +docs/V1SessionAffinityConfig.md +docs/V1SleepAction.md +docs/V1StatefulSet.md +docs/V1StatefulSetCondition.md +docs/V1StatefulSetList.md +docs/V1StatefulSetOrdinals.md +docs/V1StatefulSetPersistentVolumeClaimRetentionPolicy.md +docs/V1StatefulSetSpec.md +docs/V1StatefulSetStatus.md +docs/V1StatefulSetUpdateStrategy.md +docs/V1Status.md +docs/V1StatusCause.md +docs/V1StatusDetails.md +docs/V1StorageClass.md +docs/V1StorageClassList.md +docs/V1StorageOSPersistentVolumeSource.md +docs/V1StorageOSVolumeSource.md +docs/V1SubjectAccessReview.md +docs/V1SubjectAccessReviewSpec.md +docs/V1SubjectAccessReviewStatus.md +docs/V1SubjectRulesReviewStatus.md +docs/V1SuccessPolicy.md +docs/V1SuccessPolicyRule.md +docs/V1Sysctl.md +docs/V1TCPSocketAction.md +docs/V1Taint.md +docs/V1TokenRequestSpec.md +docs/V1TokenRequestStatus.md +docs/V1TokenReview.md +docs/V1TokenReviewSpec.md +docs/V1TokenReviewStatus.md +docs/V1Toleration.md +docs/V1TopologySelectorLabelRequirement.md +docs/V1TopologySelectorTerm.md +docs/V1TopologySpreadConstraint.md +docs/V1TypeChecking.md +docs/V1TypedLocalObjectReference.md +docs/V1TypedObjectReference.md +docs/V1UncountedTerminatedPods.md +docs/V1UserInfo.md +docs/V1UserSubject.md +docs/V1ValidatingAdmissionPolicy.md +docs/V1ValidatingAdmissionPolicyBinding.md +docs/V1ValidatingAdmissionPolicyBindingList.md +docs/V1ValidatingAdmissionPolicyBindingSpec.md +docs/V1ValidatingAdmissionPolicyList.md +docs/V1ValidatingAdmissionPolicySpec.md +docs/V1ValidatingAdmissionPolicyStatus.md +docs/V1ValidatingWebhook.md +docs/V1ValidatingWebhookConfiguration.md +docs/V1ValidatingWebhookConfigurationList.md +docs/V1Validation.md +docs/V1ValidationRule.md +docs/V1Variable.md +docs/V1Volume.md +docs/V1VolumeAttachment.md +docs/V1VolumeAttachmentList.md +docs/V1VolumeAttachmentSource.md +docs/V1VolumeAttachmentSpec.md +docs/V1VolumeAttachmentStatus.md +docs/V1VolumeAttributesClass.md +docs/V1VolumeAttributesClassList.md +docs/V1VolumeDevice.md +docs/V1VolumeError.md +docs/V1VolumeMount.md +docs/V1VolumeMountStatus.md +docs/V1VolumeNodeAffinity.md +docs/V1VolumeNodeResources.md +docs/V1VolumeProjection.md +docs/V1VolumeResourceRequirements.md +docs/V1VsphereVirtualDiskVolumeSource.md +docs/V1WatchEvent.md +docs/V1WebhookConversion.md +docs/V1WeightedPodAffinityTerm.md +docs/V1WindowsSecurityContextOptions.md +docs/V1WorkloadReference.md +docs/V1alpha1ApplyConfiguration.md +docs/V1alpha1ClusterTrustBundle.md +docs/V1alpha1ClusterTrustBundleList.md +docs/V1alpha1ClusterTrustBundleSpec.md +docs/V1alpha1GangSchedulingPolicy.md +docs/V1alpha1JSONPatch.md +docs/V1alpha1MatchCondition.md +docs/V1alpha1MatchResources.md +docs/V1alpha1MutatingAdmissionPolicy.md +docs/V1alpha1MutatingAdmissionPolicyBinding.md +docs/V1alpha1MutatingAdmissionPolicyBindingList.md +docs/V1alpha1MutatingAdmissionPolicyBindingSpec.md +docs/V1alpha1MutatingAdmissionPolicyList.md +docs/V1alpha1MutatingAdmissionPolicySpec.md +docs/V1alpha1Mutation.md +docs/V1alpha1NamedRuleWithOperations.md +docs/V1alpha1ParamKind.md +docs/V1alpha1ParamRef.md +docs/V1alpha1PodGroup.md +docs/V1alpha1PodGroupPolicy.md +docs/V1alpha1ServerStorageVersion.md +docs/V1alpha1StorageVersion.md +docs/V1alpha1StorageVersionCondition.md +docs/V1alpha1StorageVersionList.md +docs/V1alpha1StorageVersionStatus.md +docs/V1alpha1TypedLocalObjectReference.md +docs/V1alpha1Variable.md +docs/V1alpha1Workload.md +docs/V1alpha1WorkloadList.md +docs/V1alpha1WorkloadSpec.md +docs/V1alpha2LeaseCandidate.md +docs/V1alpha2LeaseCandidateList.md +docs/V1alpha2LeaseCandidateSpec.md +docs/V1alpha3DeviceTaint.md +docs/V1alpha3DeviceTaintRule.md +docs/V1alpha3DeviceTaintRuleList.md +docs/V1alpha3DeviceTaintRuleSpec.md +docs/V1alpha3DeviceTaintRuleStatus.md +docs/V1alpha3DeviceTaintSelector.md +docs/V1beta1AllocatedDeviceStatus.md +docs/V1beta1AllocationResult.md +docs/V1beta1ApplyConfiguration.md +docs/V1beta1BasicDevice.md +docs/V1beta1CELDeviceSelector.md +docs/V1beta1CapacityRequestPolicy.md +docs/V1beta1CapacityRequestPolicyRange.md +docs/V1beta1CapacityRequirements.md +docs/V1beta1ClusterTrustBundle.md +docs/V1beta1ClusterTrustBundleList.md +docs/V1beta1ClusterTrustBundleSpec.md +docs/V1beta1Counter.md +docs/V1beta1CounterSet.md +docs/V1beta1Device.md +docs/V1beta1DeviceAllocationConfiguration.md +docs/V1beta1DeviceAllocationResult.md +docs/V1beta1DeviceAttribute.md +docs/V1beta1DeviceCapacity.md +docs/V1beta1DeviceClaim.md +docs/V1beta1DeviceClaimConfiguration.md +docs/V1beta1DeviceClass.md +docs/V1beta1DeviceClassConfiguration.md +docs/V1beta1DeviceClassList.md +docs/V1beta1DeviceClassSpec.md +docs/V1beta1DeviceConstraint.md +docs/V1beta1DeviceCounterConsumption.md +docs/V1beta1DeviceRequest.md +docs/V1beta1DeviceRequestAllocationResult.md +docs/V1beta1DeviceSelector.md +docs/V1beta1DeviceSubRequest.md +docs/V1beta1DeviceTaint.md +docs/V1beta1DeviceToleration.md +docs/V1beta1IPAddress.md +docs/V1beta1IPAddressList.md +docs/V1beta1IPAddressSpec.md +docs/V1beta1JSONPatch.md +docs/V1beta1LeaseCandidate.md +docs/V1beta1LeaseCandidateList.md +docs/V1beta1LeaseCandidateSpec.md +docs/V1beta1MatchCondition.md +docs/V1beta1MatchResources.md +docs/V1beta1MutatingAdmissionPolicy.md +docs/V1beta1MutatingAdmissionPolicyBinding.md +docs/V1beta1MutatingAdmissionPolicyBindingList.md +docs/V1beta1MutatingAdmissionPolicyBindingSpec.md +docs/V1beta1MutatingAdmissionPolicyList.md +docs/V1beta1MutatingAdmissionPolicySpec.md +docs/V1beta1Mutation.md +docs/V1beta1NamedRuleWithOperations.md +docs/V1beta1NetworkDeviceData.md +docs/V1beta1OpaqueDeviceConfiguration.md +docs/V1beta1ParamKind.md +docs/V1beta1ParamRef.md +docs/V1beta1ParentReference.md +docs/V1beta1PodCertificateRequest.md +docs/V1beta1PodCertificateRequestList.md +docs/V1beta1PodCertificateRequestSpec.md +docs/V1beta1PodCertificateRequestStatus.md +docs/V1beta1ResourceClaim.md +docs/V1beta1ResourceClaimConsumerReference.md +docs/V1beta1ResourceClaimList.md +docs/V1beta1ResourceClaimSpec.md +docs/V1beta1ResourceClaimStatus.md +docs/V1beta1ResourceClaimTemplate.md +docs/V1beta1ResourceClaimTemplateList.md +docs/V1beta1ResourceClaimTemplateSpec.md +docs/V1beta1ResourcePool.md +docs/V1beta1ResourceSlice.md +docs/V1beta1ResourceSliceList.md +docs/V1beta1ResourceSliceSpec.md +docs/V1beta1ServiceCIDR.md +docs/V1beta1ServiceCIDRList.md +docs/V1beta1ServiceCIDRSpec.md +docs/V1beta1ServiceCIDRStatus.md +docs/V1beta1StorageVersionMigration.md +docs/V1beta1StorageVersionMigrationList.md +docs/V1beta1StorageVersionMigrationSpec.md +docs/V1beta1StorageVersionMigrationStatus.md +docs/V1beta1Variable.md +docs/V1beta1VolumeAttributesClass.md +docs/V1beta1VolumeAttributesClassList.md +docs/V1beta2AllocatedDeviceStatus.md +docs/V1beta2AllocationResult.md +docs/V1beta2CELDeviceSelector.md +docs/V1beta2CapacityRequestPolicy.md +docs/V1beta2CapacityRequestPolicyRange.md +docs/V1beta2CapacityRequirements.md +docs/V1beta2Counter.md +docs/V1beta2CounterSet.md +docs/V1beta2Device.md +docs/V1beta2DeviceAllocationConfiguration.md +docs/V1beta2DeviceAllocationResult.md +docs/V1beta2DeviceAttribute.md +docs/V1beta2DeviceCapacity.md +docs/V1beta2DeviceClaim.md +docs/V1beta2DeviceClaimConfiguration.md +docs/V1beta2DeviceClass.md +docs/V1beta2DeviceClassConfiguration.md +docs/V1beta2DeviceClassList.md +docs/V1beta2DeviceClassSpec.md +docs/V1beta2DeviceConstraint.md +docs/V1beta2DeviceCounterConsumption.md +docs/V1beta2DeviceRequest.md +docs/V1beta2DeviceRequestAllocationResult.md +docs/V1beta2DeviceSelector.md +docs/V1beta2DeviceSubRequest.md +docs/V1beta2DeviceTaint.md +docs/V1beta2DeviceToleration.md +docs/V1beta2ExactDeviceRequest.md +docs/V1beta2NetworkDeviceData.md +docs/V1beta2OpaqueDeviceConfiguration.md +docs/V1beta2ResourceClaim.md +docs/V1beta2ResourceClaimConsumerReference.md +docs/V1beta2ResourceClaimList.md +docs/V1beta2ResourceClaimSpec.md +docs/V1beta2ResourceClaimStatus.md +docs/V1beta2ResourceClaimTemplate.md +docs/V1beta2ResourceClaimTemplateList.md +docs/V1beta2ResourceClaimTemplateSpec.md +docs/V1beta2ResourcePool.md +docs/V1beta2ResourceSlice.md +docs/V1beta2ResourceSliceList.md +docs/V1beta2ResourceSliceSpec.md +docs/V2APIGroupDiscovery.md +docs/V2APIGroupDiscoveryList.md +docs/V2APIResourceDiscovery.md +docs/V2APISubresourceDiscovery.md +docs/V2APIVersionDiscovery.md +docs/V2ContainerResourceMetricSource.md +docs/V2ContainerResourceMetricStatus.md +docs/V2CrossVersionObjectReference.md +docs/V2ExternalMetricSource.md +docs/V2ExternalMetricStatus.md +docs/V2HPAScalingPolicy.md +docs/V2HPAScalingRules.md +docs/V2HorizontalPodAutoscaler.md +docs/V2HorizontalPodAutoscalerBehavior.md +docs/V2HorizontalPodAutoscalerCondition.md +docs/V2HorizontalPodAutoscalerList.md +docs/V2HorizontalPodAutoscalerSpec.md +docs/V2HorizontalPodAutoscalerStatus.md +docs/V2MetricIdentifier.md +docs/V2MetricSpec.md +docs/V2MetricStatus.md +docs/V2MetricTarget.md +docs/V2MetricValueStatus.md +docs/V2ObjectMetricSource.md +docs/V2ObjectMetricStatus.md +docs/V2PodsMetricSource.md +docs/V2PodsMetricStatus.md +docs/V2ResourceMetricSource.md +docs/V2ResourceMetricStatus.md +docs/V2beta1APIGroupDiscovery.md +docs/V2beta1APIGroupDiscoveryList.md +docs/V2beta1APIResourceDiscovery.md +docs/V2beta1APISubresourceDiscovery.md +docs/V2beta1APIVersionDiscovery.md +docs/VersionApi.md +docs/VersionInfo.md +docs/WellKnownApi.md +setup.cfg +test/__init__.py +test/test_admissionregistration_api.py +test/test_admissionregistration_v1_api.py +test/test_admissionregistration_v1_service_reference.py +test/test_admissionregistration_v1_webhook_client_config.py +test/test_admissionregistration_v1alpha1_api.py +test/test_admissionregistration_v1beta1_api.py +test/test_apiextensions_api.py +test/test_apiextensions_v1_api.py +test/test_apiextensions_v1_service_reference.py +test/test_apiextensions_v1_webhook_client_config.py +test/test_apiregistration_api.py +test/test_apiregistration_v1_api.py +test/test_apiregistration_v1_service_reference.py +test/test_apis_api.py +test/test_apps_api.py +test/test_apps_v1_api.py +test/test_authentication_api.py +test/test_authentication_v1_api.py +test/test_authentication_v1_token_request.py +test/test_authorization_api.py +test/test_authorization_v1_api.py +test/test_autoscaling_api.py +test/test_autoscaling_v1_api.py +test/test_autoscaling_v2_api.py +test/test_batch_api.py +test/test_batch_v1_api.py +test/test_certificates_api.py +test/test_certificates_v1_api.py +test/test_certificates_v1alpha1_api.py +test/test_certificates_v1beta1_api.py +test/test_coordination_api.py +test/test_coordination_v1_api.py +test/test_coordination_v1alpha2_api.py +test/test_coordination_v1beta1_api.py +test/test_core_api.py +test/test_core_v1_api.py +test/test_core_v1_endpoint_port.py +test/test_core_v1_event.py +test/test_core_v1_event_list.py +test/test_core_v1_event_series.py +test/test_core_v1_resource_claim.py +test/test_custom_objects_api.py +test/test_discovery_api.py +test/test_discovery_v1_api.py +test/test_discovery_v1_endpoint_port.py +test/test_events_api.py +test/test_events_v1_api.py +test/test_events_v1_event.py +test/test_events_v1_event_list.py +test/test_events_v1_event_series.py +test/test_flowcontrol_apiserver_api.py +test/test_flowcontrol_apiserver_v1_api.py +test/test_flowcontrol_v1_subject.py +test/test_internal_apiserver_api.py +test/test_internal_apiserver_v1alpha1_api.py +test/test_logs_api.py +test/test_networking_api.py +test/test_networking_v1_api.py +test/test_networking_v1beta1_api.py +test/test_node_api.py +test/test_node_v1_api.py +test/test_openid_api.py +test/test_policy_api.py +test/test_policy_v1_api.py +test/test_rbac_authorization_api.py +test/test_rbac_authorization_v1_api.py +test/test_rbac_v1_subject.py +test/test_resource_api.py +test/test_resource_v1_api.py +test/test_resource_v1_resource_claim.py +test/test_resource_v1alpha3_api.py +test/test_resource_v1beta1_api.py +test/test_resource_v1beta2_api.py +test/test_scheduling_api.py +test/test_scheduling_v1_api.py +test/test_scheduling_v1alpha1_api.py +test/test_storage_api.py +test/test_storage_v1_api.py +test/test_storage_v1_token_request.py +test/test_storage_v1beta1_api.py +test/test_storagemigration_api.py +test/test_storagemigration_v1beta1_api.py +test/test_v1_affinity.py +test/test_v1_aggregation_rule.py +test/test_v1_allocated_device_status.py +test/test_v1_allocation_result.py +test/test_v1_api_group.py +test/test_v1_api_group_list.py +test/test_v1_api_resource.py +test/test_v1_api_resource_list.py +test/test_v1_api_service.py +test/test_v1_api_service_condition.py +test/test_v1_api_service_list.py +test/test_v1_api_service_spec.py +test/test_v1_api_service_status.py +test/test_v1_api_versions.py +test/test_v1_app_armor_profile.py +test/test_v1_attached_volume.py +test/test_v1_audit_annotation.py +test/test_v1_aws_elastic_block_store_volume_source.py +test/test_v1_azure_disk_volume_source.py +test/test_v1_azure_file_persistent_volume_source.py +test/test_v1_azure_file_volume_source.py +test/test_v1_binding.py +test/test_v1_bound_object_reference.py +test/test_v1_capabilities.py +test/test_v1_capacity_request_policy.py +test/test_v1_capacity_request_policy_range.py +test/test_v1_capacity_requirements.py +test/test_v1_cel_device_selector.py +test/test_v1_ceph_fs_persistent_volume_source.py +test/test_v1_ceph_fs_volume_source.py +test/test_v1_certificate_signing_request.py +test/test_v1_certificate_signing_request_condition.py +test/test_v1_certificate_signing_request_list.py +test/test_v1_certificate_signing_request_spec.py +test/test_v1_certificate_signing_request_status.py +test/test_v1_cinder_persistent_volume_source.py +test/test_v1_cinder_volume_source.py +test/test_v1_client_ip_config.py +test/test_v1_cluster_role.py +test/test_v1_cluster_role_binding.py +test/test_v1_cluster_role_binding_list.py +test/test_v1_cluster_role_list.py +test/test_v1_cluster_trust_bundle_projection.py +test/test_v1_component_condition.py +test/test_v1_component_status.py +test/test_v1_component_status_list.py +test/test_v1_condition.py +test/test_v1_config_map.py +test/test_v1_config_map_env_source.py +test/test_v1_config_map_key_selector.py +test/test_v1_config_map_list.py +test/test_v1_config_map_node_config_source.py +test/test_v1_config_map_projection.py +test/test_v1_config_map_volume_source.py +test/test_v1_container.py +test/test_v1_container_extended_resource_request.py +test/test_v1_container_image.py +test/test_v1_container_port.py +test/test_v1_container_resize_policy.py +test/test_v1_container_restart_rule.py +test/test_v1_container_restart_rule_on_exit_codes.py +test/test_v1_container_state.py +test/test_v1_container_state_running.py +test/test_v1_container_state_terminated.py +test/test_v1_container_state_waiting.py +test/test_v1_container_status.py +test/test_v1_container_user.py +test/test_v1_controller_revision.py +test/test_v1_controller_revision_list.py +test/test_v1_counter.py +test/test_v1_counter_set.py +test/test_v1_cron_job.py +test/test_v1_cron_job_list.py +test/test_v1_cron_job_spec.py +test/test_v1_cron_job_status.py +test/test_v1_cross_version_object_reference.py +test/test_v1_csi_driver.py +test/test_v1_csi_driver_list.py +test/test_v1_csi_driver_spec.py +test/test_v1_csi_node.py +test/test_v1_csi_node_driver.py +test/test_v1_csi_node_list.py +test/test_v1_csi_node_spec.py +test/test_v1_csi_persistent_volume_source.py +test/test_v1_csi_storage_capacity.py +test/test_v1_csi_storage_capacity_list.py +test/test_v1_csi_volume_source.py +test/test_v1_custom_resource_column_definition.py +test/test_v1_custom_resource_conversion.py +test/test_v1_custom_resource_definition.py +test/test_v1_custom_resource_definition_condition.py +test/test_v1_custom_resource_definition_list.py +test/test_v1_custom_resource_definition_names.py +test/test_v1_custom_resource_definition_spec.py +test/test_v1_custom_resource_definition_status.py +test/test_v1_custom_resource_definition_version.py +test/test_v1_custom_resource_subresource_scale.py +test/test_v1_custom_resource_subresources.py +test/test_v1_custom_resource_validation.py +test/test_v1_daemon_endpoint.py +test/test_v1_daemon_set.py +test/test_v1_daemon_set_condition.py +test/test_v1_daemon_set_list.py +test/test_v1_daemon_set_spec.py +test/test_v1_daemon_set_status.py +test/test_v1_daemon_set_update_strategy.py +test/test_v1_delete_options.py +test/test_v1_deployment.py +test/test_v1_deployment_condition.py +test/test_v1_deployment_list.py +test/test_v1_deployment_spec.py +test/test_v1_deployment_status.py +test/test_v1_deployment_strategy.py +test/test_v1_device.py +test/test_v1_device_allocation_configuration.py +test/test_v1_device_allocation_result.py +test/test_v1_device_attribute.py +test/test_v1_device_capacity.py +test/test_v1_device_claim.py +test/test_v1_device_claim_configuration.py +test/test_v1_device_class.py +test/test_v1_device_class_configuration.py +test/test_v1_device_class_list.py +test/test_v1_device_class_spec.py +test/test_v1_device_constraint.py +test/test_v1_device_counter_consumption.py +test/test_v1_device_request.py +test/test_v1_device_request_allocation_result.py +test/test_v1_device_selector.py +test/test_v1_device_sub_request.py +test/test_v1_device_taint.py +test/test_v1_device_toleration.py +test/test_v1_downward_api_projection.py +test/test_v1_downward_api_volume_file.py +test/test_v1_downward_api_volume_source.py +test/test_v1_empty_dir_volume_source.py +test/test_v1_endpoint.py +test/test_v1_endpoint_address.py +test/test_v1_endpoint_conditions.py +test/test_v1_endpoint_hints.py +test/test_v1_endpoint_slice.py +test/test_v1_endpoint_slice_list.py +test/test_v1_endpoint_subset.py +test/test_v1_endpoints.py +test/test_v1_endpoints_list.py +test/test_v1_env_from_source.py +test/test_v1_env_var.py +test/test_v1_env_var_source.py +test/test_v1_ephemeral_container.py +test/test_v1_ephemeral_volume_source.py +test/test_v1_event_source.py +test/test_v1_eviction.py +test/test_v1_exact_device_request.py +test/test_v1_exec_action.py +test/test_v1_exempt_priority_level_configuration.py +test/test_v1_expression_warning.py +test/test_v1_external_documentation.py +test/test_v1_fc_volume_source.py +test/test_v1_field_selector_attributes.py +test/test_v1_field_selector_requirement.py +test/test_v1_file_key_selector.py +test/test_v1_flex_persistent_volume_source.py +test/test_v1_flex_volume_source.py +test/test_v1_flocker_volume_source.py +test/test_v1_flow_distinguisher_method.py +test/test_v1_flow_schema.py +test/test_v1_flow_schema_condition.py +test/test_v1_flow_schema_list.py +test/test_v1_flow_schema_spec.py +test/test_v1_flow_schema_status.py +test/test_v1_for_node.py +test/test_v1_for_zone.py +test/test_v1_gce_persistent_disk_volume_source.py +test/test_v1_git_repo_volume_source.py +test/test_v1_glusterfs_persistent_volume_source.py +test/test_v1_glusterfs_volume_source.py +test/test_v1_group_resource.py +test/test_v1_group_subject.py +test/test_v1_group_version_for_discovery.py +test/test_v1_grpc_action.py +test/test_v1_horizontal_pod_autoscaler.py +test/test_v1_horizontal_pod_autoscaler_list.py +test/test_v1_horizontal_pod_autoscaler_spec.py +test/test_v1_horizontal_pod_autoscaler_status.py +test/test_v1_host_alias.py +test/test_v1_host_ip.py +test/test_v1_host_path_volume_source.py +test/test_v1_http_get_action.py +test/test_v1_http_header.py +test/test_v1_http_ingress_path.py +test/test_v1_http_ingress_rule_value.py +test/test_v1_image_volume_source.py +test/test_v1_ingress.py +test/test_v1_ingress_backend.py +test/test_v1_ingress_class.py +test/test_v1_ingress_class_list.py +test/test_v1_ingress_class_parameters_reference.py +test/test_v1_ingress_class_spec.py +test/test_v1_ingress_list.py +test/test_v1_ingress_load_balancer_ingress.py +test/test_v1_ingress_load_balancer_status.py +test/test_v1_ingress_port_status.py +test/test_v1_ingress_rule.py +test/test_v1_ingress_service_backend.py +test/test_v1_ingress_spec.py +test/test_v1_ingress_status.py +test/test_v1_ingress_tls.py +test/test_v1_ip_address.py +test/test_v1_ip_address_list.py +test/test_v1_ip_address_spec.py +test/test_v1_ip_block.py +test/test_v1_iscsi_persistent_volume_source.py +test/test_v1_iscsi_volume_source.py +test/test_v1_job.py +test/test_v1_job_condition.py +test/test_v1_job_list.py +test/test_v1_job_spec.py +test/test_v1_job_status.py +test/test_v1_job_template_spec.py +test/test_v1_json_schema_props.py +test/test_v1_key_to_path.py +test/test_v1_label_selector.py +test/test_v1_label_selector_attributes.py +test/test_v1_label_selector_requirement.py +test/test_v1_lease.py +test/test_v1_lease_list.py +test/test_v1_lease_spec.py +test/test_v1_lifecycle.py +test/test_v1_lifecycle_handler.py +test/test_v1_limit_range.py +test/test_v1_limit_range_item.py +test/test_v1_limit_range_list.py +test/test_v1_limit_range_spec.py +test/test_v1_limit_response.py +test/test_v1_limited_priority_level_configuration.py +test/test_v1_linux_container_user.py +test/test_v1_list_meta.py +test/test_v1_load_balancer_ingress.py +test/test_v1_load_balancer_status.py +test/test_v1_local_object_reference.py +test/test_v1_local_subject_access_review.py +test/test_v1_local_volume_source.py +test/test_v1_managed_fields_entry.py +test/test_v1_match_condition.py +test/test_v1_match_resources.py +test/test_v1_modify_volume_status.py +test/test_v1_mutating_webhook.py +test/test_v1_mutating_webhook_configuration.py +test/test_v1_mutating_webhook_configuration_list.py +test/test_v1_named_rule_with_operations.py +test/test_v1_namespace.py +test/test_v1_namespace_condition.py +test/test_v1_namespace_list.py +test/test_v1_namespace_spec.py +test/test_v1_namespace_status.py +test/test_v1_network_device_data.py +test/test_v1_network_policy.py +test/test_v1_network_policy_egress_rule.py +test/test_v1_network_policy_ingress_rule.py +test/test_v1_network_policy_list.py +test/test_v1_network_policy_peer.py +test/test_v1_network_policy_port.py +test/test_v1_network_policy_spec.py +test/test_v1_nfs_volume_source.py +test/test_v1_node.py +test/test_v1_node_address.py +test/test_v1_node_affinity.py +test/test_v1_node_condition.py +test/test_v1_node_config_source.py +test/test_v1_node_config_status.py +test/test_v1_node_daemon_endpoints.py +test/test_v1_node_features.py +test/test_v1_node_list.py +test/test_v1_node_runtime_handler.py +test/test_v1_node_runtime_handler_features.py +test/test_v1_node_selector.py +test/test_v1_node_selector_requirement.py +test/test_v1_node_selector_term.py +test/test_v1_node_spec.py +test/test_v1_node_status.py +test/test_v1_node_swap_status.py +test/test_v1_node_system_info.py +test/test_v1_non_resource_attributes.py +test/test_v1_non_resource_policy_rule.py +test/test_v1_non_resource_rule.py +test/test_v1_object_field_selector.py +test/test_v1_object_meta.py +test/test_v1_object_reference.py +test/test_v1_opaque_device_configuration.py +test/test_v1_overhead.py +test/test_v1_owner_reference.py +test/test_v1_param_kind.py +test/test_v1_param_ref.py +test/test_v1_parent_reference.py +test/test_v1_persistent_volume.py +test/test_v1_persistent_volume_claim.py +test/test_v1_persistent_volume_claim_condition.py +test/test_v1_persistent_volume_claim_list.py +test/test_v1_persistent_volume_claim_spec.py +test/test_v1_persistent_volume_claim_status.py +test/test_v1_persistent_volume_claim_template.py +test/test_v1_persistent_volume_claim_volume_source.py +test/test_v1_persistent_volume_list.py +test/test_v1_persistent_volume_spec.py +test/test_v1_persistent_volume_status.py +test/test_v1_photon_persistent_disk_volume_source.py +test/test_v1_pod.py +test/test_v1_pod_affinity.py +test/test_v1_pod_affinity_term.py +test/test_v1_pod_anti_affinity.py +test/test_v1_pod_certificate_projection.py +test/test_v1_pod_condition.py +test/test_v1_pod_disruption_budget.py +test/test_v1_pod_disruption_budget_list.py +test/test_v1_pod_disruption_budget_spec.py +test/test_v1_pod_disruption_budget_status.py +test/test_v1_pod_dns_config.py +test/test_v1_pod_dns_config_option.py +test/test_v1_pod_extended_resource_claim_status.py +test/test_v1_pod_failure_policy.py +test/test_v1_pod_failure_policy_on_exit_codes_requirement.py +test/test_v1_pod_failure_policy_on_pod_conditions_pattern.py +test/test_v1_pod_failure_policy_rule.py +test/test_v1_pod_ip.py +test/test_v1_pod_list.py +test/test_v1_pod_os.py +test/test_v1_pod_readiness_gate.py +test/test_v1_pod_resource_claim.py +test/test_v1_pod_resource_claim_status.py +test/test_v1_pod_scheduling_gate.py +test/test_v1_pod_security_context.py +test/test_v1_pod_spec.py +test/test_v1_pod_status.py +test/test_v1_pod_template.py +test/test_v1_pod_template_list.py +test/test_v1_pod_template_spec.py +test/test_v1_policy_rule.py +test/test_v1_policy_rules_with_subjects.py +test/test_v1_port_status.py +test/test_v1_portworx_volume_source.py +test/test_v1_preconditions.py +test/test_v1_preferred_scheduling_term.py +test/test_v1_priority_class.py +test/test_v1_priority_class_list.py +test/test_v1_priority_level_configuration.py +test/test_v1_priority_level_configuration_condition.py +test/test_v1_priority_level_configuration_list.py +test/test_v1_priority_level_configuration_reference.py +test/test_v1_priority_level_configuration_spec.py +test/test_v1_priority_level_configuration_status.py +test/test_v1_probe.py +test/test_v1_projected_volume_source.py +test/test_v1_queuing_configuration.py +test/test_v1_quobyte_volume_source.py +test/test_v1_rbd_persistent_volume_source.py +test/test_v1_rbd_volume_source.py +test/test_v1_replica_set.py +test/test_v1_replica_set_condition.py +test/test_v1_replica_set_list.py +test/test_v1_replica_set_spec.py +test/test_v1_replica_set_status.py +test/test_v1_replication_controller.py +test/test_v1_replication_controller_condition.py +test/test_v1_replication_controller_list.py +test/test_v1_replication_controller_spec.py +test/test_v1_replication_controller_status.py +test/test_v1_resource_attributes.py +test/test_v1_resource_claim_consumer_reference.py +test/test_v1_resource_claim_list.py +test/test_v1_resource_claim_spec.py +test/test_v1_resource_claim_status.py +test/test_v1_resource_claim_template.py +test/test_v1_resource_claim_template_list.py +test/test_v1_resource_claim_template_spec.py +test/test_v1_resource_field_selector.py +test/test_v1_resource_health.py +test/test_v1_resource_policy_rule.py +test/test_v1_resource_pool.py +test/test_v1_resource_quota.py +test/test_v1_resource_quota_list.py +test/test_v1_resource_quota_spec.py +test/test_v1_resource_quota_status.py +test/test_v1_resource_requirements.py +test/test_v1_resource_rule.py +test/test_v1_resource_slice.py +test/test_v1_resource_slice_list.py +test/test_v1_resource_slice_spec.py +test/test_v1_resource_status.py +test/test_v1_role.py +test/test_v1_role_binding.py +test/test_v1_role_binding_list.py +test/test_v1_role_list.py +test/test_v1_role_ref.py +test/test_v1_rolling_update_daemon_set.py +test/test_v1_rolling_update_deployment.py +test/test_v1_rolling_update_stateful_set_strategy.py +test/test_v1_rule_with_operations.py +test/test_v1_runtime_class.py +test/test_v1_runtime_class_list.py +test/test_v1_scale.py +test/test_v1_scale_io_persistent_volume_source.py +test/test_v1_scale_io_volume_source.py +test/test_v1_scale_spec.py +test/test_v1_scale_status.py +test/test_v1_scheduling.py +test/test_v1_scope_selector.py +test/test_v1_scoped_resource_selector_requirement.py +test/test_v1_se_linux_options.py +test/test_v1_seccomp_profile.py +test/test_v1_secret.py +test/test_v1_secret_env_source.py +test/test_v1_secret_key_selector.py +test/test_v1_secret_list.py +test/test_v1_secret_projection.py +test/test_v1_secret_reference.py +test/test_v1_secret_volume_source.py +test/test_v1_security_context.py +test/test_v1_selectable_field.py +test/test_v1_self_subject_access_review.py +test/test_v1_self_subject_access_review_spec.py +test/test_v1_self_subject_review.py +test/test_v1_self_subject_review_status.py +test/test_v1_self_subject_rules_review.py +test/test_v1_self_subject_rules_review_spec.py +test/test_v1_server_address_by_client_cidr.py +test/test_v1_service.py +test/test_v1_service_account.py +test/test_v1_service_account_list.py +test/test_v1_service_account_subject.py +test/test_v1_service_account_token_projection.py +test/test_v1_service_backend_port.py +test/test_v1_service_cidr.py +test/test_v1_service_cidr_list.py +test/test_v1_service_cidr_spec.py +test/test_v1_service_cidr_status.py +test/test_v1_service_list.py +test/test_v1_service_port.py +test/test_v1_service_spec.py +test/test_v1_service_status.py +test/test_v1_session_affinity_config.py +test/test_v1_sleep_action.py +test/test_v1_stateful_set.py +test/test_v1_stateful_set_condition.py +test/test_v1_stateful_set_list.py +test/test_v1_stateful_set_ordinals.py +test/test_v1_stateful_set_persistent_volume_claim_retention_policy.py +test/test_v1_stateful_set_spec.py +test/test_v1_stateful_set_status.py +test/test_v1_stateful_set_update_strategy.py +test/test_v1_status.py +test/test_v1_status_cause.py +test/test_v1_status_details.py +test/test_v1_storage_class.py +test/test_v1_storage_class_list.py +test/test_v1_storage_os_persistent_volume_source.py +test/test_v1_storage_os_volume_source.py +test/test_v1_subject_access_review.py +test/test_v1_subject_access_review_spec.py +test/test_v1_subject_access_review_status.py +test/test_v1_subject_rules_review_status.py +test/test_v1_success_policy.py +test/test_v1_success_policy_rule.py +test/test_v1_sysctl.py +test/test_v1_taint.py +test/test_v1_tcp_socket_action.py +test/test_v1_token_request_spec.py +test/test_v1_token_request_status.py +test/test_v1_token_review.py +test/test_v1_token_review_spec.py +test/test_v1_token_review_status.py +test/test_v1_toleration.py +test/test_v1_topology_selector_label_requirement.py +test/test_v1_topology_selector_term.py +test/test_v1_topology_spread_constraint.py +test/test_v1_type_checking.py +test/test_v1_typed_local_object_reference.py +test/test_v1_typed_object_reference.py +test/test_v1_uncounted_terminated_pods.py +test/test_v1_user_info.py +test/test_v1_user_subject.py +test/test_v1_validating_admission_policy.py +test/test_v1_validating_admission_policy_binding.py +test/test_v1_validating_admission_policy_binding_list.py +test/test_v1_validating_admission_policy_binding_spec.py +test/test_v1_validating_admission_policy_list.py +test/test_v1_validating_admission_policy_spec.py +test/test_v1_validating_admission_policy_status.py +test/test_v1_validating_webhook.py +test/test_v1_validating_webhook_configuration.py +test/test_v1_validating_webhook_configuration_list.py +test/test_v1_validation.py +test/test_v1_validation_rule.py +test/test_v1_variable.py +test/test_v1_volume.py +test/test_v1_volume_attachment.py +test/test_v1_volume_attachment_list.py +test/test_v1_volume_attachment_source.py +test/test_v1_volume_attachment_spec.py +test/test_v1_volume_attachment_status.py +test/test_v1_volume_attributes_class.py +test/test_v1_volume_attributes_class_list.py +test/test_v1_volume_device.py +test/test_v1_volume_error.py +test/test_v1_volume_mount.py +test/test_v1_volume_mount_status.py +test/test_v1_volume_node_affinity.py +test/test_v1_volume_node_resources.py +test/test_v1_volume_projection.py +test/test_v1_volume_resource_requirements.py +test/test_v1_vsphere_virtual_disk_volume_source.py +test/test_v1_watch_event.py +test/test_v1_webhook_conversion.py +test/test_v1_weighted_pod_affinity_term.py +test/test_v1_windows_security_context_options.py +test/test_v1_workload_reference.py +test/test_v1alpha1_apply_configuration.py +test/test_v1alpha1_cluster_trust_bundle.py +test/test_v1alpha1_cluster_trust_bundle_list.py +test/test_v1alpha1_cluster_trust_bundle_spec.py +test/test_v1alpha1_gang_scheduling_policy.py +test/test_v1alpha1_json_patch.py +test/test_v1alpha1_match_condition.py +test/test_v1alpha1_match_resources.py +test/test_v1alpha1_mutating_admission_policy.py +test/test_v1alpha1_mutating_admission_policy_binding.py +test/test_v1alpha1_mutating_admission_policy_binding_list.py +test/test_v1alpha1_mutating_admission_policy_binding_spec.py +test/test_v1alpha1_mutating_admission_policy_list.py +test/test_v1alpha1_mutating_admission_policy_spec.py +test/test_v1alpha1_mutation.py +test/test_v1alpha1_named_rule_with_operations.py +test/test_v1alpha1_param_kind.py +test/test_v1alpha1_param_ref.py +test/test_v1alpha1_pod_group.py +test/test_v1alpha1_pod_group_policy.py +test/test_v1alpha1_server_storage_version.py +test/test_v1alpha1_storage_version.py +test/test_v1alpha1_storage_version_condition.py +test/test_v1alpha1_storage_version_list.py +test/test_v1alpha1_storage_version_status.py +test/test_v1alpha1_typed_local_object_reference.py +test/test_v1alpha1_variable.py +test/test_v1alpha1_workload.py +test/test_v1alpha1_workload_list.py +test/test_v1alpha1_workload_spec.py +test/test_v1alpha2_lease_candidate.py +test/test_v1alpha2_lease_candidate_list.py +test/test_v1alpha2_lease_candidate_spec.py +test/test_v1alpha3_device_taint.py +test/test_v1alpha3_device_taint_rule.py +test/test_v1alpha3_device_taint_rule_list.py +test/test_v1alpha3_device_taint_rule_spec.py +test/test_v1alpha3_device_taint_rule_status.py +test/test_v1alpha3_device_taint_selector.py +test/test_v1beta1_allocated_device_status.py +test/test_v1beta1_allocation_result.py +test/test_v1beta1_apply_configuration.py +test/test_v1beta1_basic_device.py +test/test_v1beta1_capacity_request_policy.py +test/test_v1beta1_capacity_request_policy_range.py +test/test_v1beta1_capacity_requirements.py +test/test_v1beta1_cel_device_selector.py +test/test_v1beta1_cluster_trust_bundle.py +test/test_v1beta1_cluster_trust_bundle_list.py +test/test_v1beta1_cluster_trust_bundle_spec.py +test/test_v1beta1_counter.py +test/test_v1beta1_counter_set.py +test/test_v1beta1_device.py +test/test_v1beta1_device_allocation_configuration.py +test/test_v1beta1_device_allocation_result.py +test/test_v1beta1_device_attribute.py +test/test_v1beta1_device_capacity.py +test/test_v1beta1_device_claim.py +test/test_v1beta1_device_claim_configuration.py +test/test_v1beta1_device_class.py +test/test_v1beta1_device_class_configuration.py +test/test_v1beta1_device_class_list.py +test/test_v1beta1_device_class_spec.py +test/test_v1beta1_device_constraint.py +test/test_v1beta1_device_counter_consumption.py +test/test_v1beta1_device_request.py +test/test_v1beta1_device_request_allocation_result.py +test/test_v1beta1_device_selector.py +test/test_v1beta1_device_sub_request.py +test/test_v1beta1_device_taint.py +test/test_v1beta1_device_toleration.py +test/test_v1beta1_ip_address.py +test/test_v1beta1_ip_address_list.py +test/test_v1beta1_ip_address_spec.py +test/test_v1beta1_json_patch.py +test/test_v1beta1_lease_candidate.py +test/test_v1beta1_lease_candidate_list.py +test/test_v1beta1_lease_candidate_spec.py +test/test_v1beta1_match_condition.py +test/test_v1beta1_match_resources.py +test/test_v1beta1_mutating_admission_policy.py +test/test_v1beta1_mutating_admission_policy_binding.py +test/test_v1beta1_mutating_admission_policy_binding_list.py +test/test_v1beta1_mutating_admission_policy_binding_spec.py +test/test_v1beta1_mutating_admission_policy_list.py +test/test_v1beta1_mutating_admission_policy_spec.py +test/test_v1beta1_mutation.py +test/test_v1beta1_named_rule_with_operations.py +test/test_v1beta1_network_device_data.py +test/test_v1beta1_opaque_device_configuration.py +test/test_v1beta1_param_kind.py +test/test_v1beta1_param_ref.py +test/test_v1beta1_parent_reference.py +test/test_v1beta1_pod_certificate_request.py +test/test_v1beta1_pod_certificate_request_list.py +test/test_v1beta1_pod_certificate_request_spec.py +test/test_v1beta1_pod_certificate_request_status.py +test/test_v1beta1_resource_claim.py +test/test_v1beta1_resource_claim_consumer_reference.py +test/test_v1beta1_resource_claim_list.py +test/test_v1beta1_resource_claim_spec.py +test/test_v1beta1_resource_claim_status.py +test/test_v1beta1_resource_claim_template.py +test/test_v1beta1_resource_claim_template_list.py +test/test_v1beta1_resource_claim_template_spec.py +test/test_v1beta1_resource_pool.py +test/test_v1beta1_resource_slice.py +test/test_v1beta1_resource_slice_list.py +test/test_v1beta1_resource_slice_spec.py +test/test_v1beta1_service_cidr.py +test/test_v1beta1_service_cidr_list.py +test/test_v1beta1_service_cidr_spec.py +test/test_v1beta1_service_cidr_status.py +test/test_v1beta1_storage_version_migration.py +test/test_v1beta1_storage_version_migration_list.py +test/test_v1beta1_storage_version_migration_spec.py +test/test_v1beta1_storage_version_migration_status.py +test/test_v1beta1_variable.py +test/test_v1beta1_volume_attributes_class.py +test/test_v1beta1_volume_attributes_class_list.py +test/test_v1beta2_allocated_device_status.py +test/test_v1beta2_allocation_result.py +test/test_v1beta2_capacity_request_policy.py +test/test_v1beta2_capacity_request_policy_range.py +test/test_v1beta2_capacity_requirements.py +test/test_v1beta2_cel_device_selector.py +test/test_v1beta2_counter.py +test/test_v1beta2_counter_set.py +test/test_v1beta2_device.py +test/test_v1beta2_device_allocation_configuration.py +test/test_v1beta2_device_allocation_result.py +test/test_v1beta2_device_attribute.py +test/test_v1beta2_device_capacity.py +test/test_v1beta2_device_claim.py +test/test_v1beta2_device_claim_configuration.py +test/test_v1beta2_device_class.py +test/test_v1beta2_device_class_configuration.py +test/test_v1beta2_device_class_list.py +test/test_v1beta2_device_class_spec.py +test/test_v1beta2_device_constraint.py +test/test_v1beta2_device_counter_consumption.py +test/test_v1beta2_device_request.py +test/test_v1beta2_device_request_allocation_result.py +test/test_v1beta2_device_selector.py +test/test_v1beta2_device_sub_request.py +test/test_v1beta2_device_taint.py +test/test_v1beta2_device_toleration.py +test/test_v1beta2_exact_device_request.py +test/test_v1beta2_network_device_data.py +test/test_v1beta2_opaque_device_configuration.py +test/test_v1beta2_resource_claim.py +test/test_v1beta2_resource_claim_consumer_reference.py +test/test_v1beta2_resource_claim_list.py +test/test_v1beta2_resource_claim_spec.py +test/test_v1beta2_resource_claim_status.py +test/test_v1beta2_resource_claim_template.py +test/test_v1beta2_resource_claim_template_list.py +test/test_v1beta2_resource_claim_template_spec.py +test/test_v1beta2_resource_pool.py +test/test_v1beta2_resource_slice.py +test/test_v1beta2_resource_slice_list.py +test/test_v1beta2_resource_slice_spec.py +test/test_v2_api_group_discovery.py +test/test_v2_api_group_discovery_list.py +test/test_v2_api_resource_discovery.py +test/test_v2_api_subresource_discovery.py +test/test_v2_api_version_discovery.py +test/test_v2_container_resource_metric_source.py +test/test_v2_container_resource_metric_status.py +test/test_v2_cross_version_object_reference.py +test/test_v2_external_metric_source.py +test/test_v2_external_metric_status.py +test/test_v2_horizontal_pod_autoscaler.py +test/test_v2_horizontal_pod_autoscaler_behavior.py +test/test_v2_horizontal_pod_autoscaler_condition.py +test/test_v2_horizontal_pod_autoscaler_list.py +test/test_v2_horizontal_pod_autoscaler_spec.py +test/test_v2_horizontal_pod_autoscaler_status.py +test/test_v2_hpa_scaling_policy.py +test/test_v2_hpa_scaling_rules.py +test/test_v2_metric_identifier.py +test/test_v2_metric_spec.py +test/test_v2_metric_status.py +test/test_v2_metric_target.py +test/test_v2_metric_value_status.py +test/test_v2_object_metric_source.py +test/test_v2_object_metric_status.py +test/test_v2_pods_metric_source.py +test/test_v2_pods_metric_status.py +test/test_v2_resource_metric_source.py +test/test_v2_resource_metric_status.py +test/test_v2beta1_api_group_discovery.py +test/test_v2beta1_api_group_discovery_list.py +test/test_v2beta1_api_resource_discovery.py +test/test_v2beta1_api_subresource_discovery.py +test/test_v2beta1_api_version_discovery.py +test/test_version_api.py +test/test_version_info.py +test/test_well_known_api.py diff --git a/kubernetes/.openapi-generator/VERSION b/kubernetes/.openapi-generator/VERSION index 8191138914..cd802a1ec4 100644 --- a/kubernetes/.openapi-generator/VERSION +++ b/kubernetes/.openapi-generator/VERSION @@ -1 +1 @@ -4.3.0 \ No newline at end of file +6.6.0 \ No newline at end of file diff --git a/kubernetes/.openapi-generator/swagger.json-default.sha256 b/kubernetes/.openapi-generator/swagger.json-default.sha256 new file mode 100644 index 0000000000..2fd73dc6da --- /dev/null +++ b/kubernetes/.openapi-generator/swagger.json-default.sha256 @@ -0,0 +1 @@ +550c55f434bcea9a33b26c3dd2fae687acbf0fc36dc0031bb6858be079ca138b \ No newline at end of file diff --git a/kubernetes/.openapi-generator/swagger.json.sha256 b/kubernetes/.openapi-generator/swagger.json.sha256 index ee69ca3499..cedf7b5445 100644 --- a/kubernetes/.openapi-generator/swagger.json.sha256 +++ b/kubernetes/.openapi-generator/swagger.json.sha256 @@ -1 +1 @@ -6fd1426c8fa391e102e2e04f0d3937be4a4ce260ff7f23af66ef74ad49f46fb8 \ No newline at end of file +51a2e56ab80c4ae78c7e06fae1600eb7e15cfefd37b4d47c778f52e9438fd54d \ No newline at end of file diff --git a/kubernetes/README.md b/kubernetes/README.md index be850c0dcc..7f52c05ce8 100644 --- a/kubernetes/README.md +++ b/kubernetes/README.md @@ -3,9 +3,9 @@ No description provided (generated by Openapi Generator https://github.com/opena This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: release-1.30 -- Package version: 30.0.0+snapshot -- Build package: org.openapitools.codegen.languages.PythonClientCodegen +- API version: release-1.35 +- Package version: 35.0.0+snapshot +- Build package: org.openapitools.codegen.languages.PythonLegacyClientCodegen ## Requirements. @@ -46,22 +46,30 @@ Please follow the [installation procedure](#installation--usage) and then run th ```python from __future__ import print_function + import time import kubernetes.client from kubernetes.client.rest import ApiException from pprint import pprint -configuration = kubernetes.client.Configuration() +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = kubernetes.client.Configuration( + host = "http://localhost" +) + +# The kubernetes.client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + # Configure API key authorization: BearerToken -configuration.api_key['authorization'] = 'YOUR_API_KEY' +configuration.api_key['BearerToken'] = 'YOUR_API_KEY' + # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['authorization'] = 'Bearer' +# configuration.api_key_prefix['BearerToken'] = 'Bearer' -# Defining host is optional and default to http://localhost -configuration.host = "http://localhost" -# Defining host is optional and default to http://localhost -configuration.host = "http://localhost" # Enter a context with an instance of the API kubernetes.client with kubernetes.client.ApiClient(configuration) as api_client: # Create an instance of the API class @@ -115,42 +123,36 @@ Class | Method | HTTP request | Description *AdmissionregistrationV1Api* | [**replace_validating_admission_policy_binding**](docs/AdmissionregistrationV1Api.md#replace_validating_admission_policy_binding) | **PUT** /apis/admissionregistration.k8s.io/v1/validatingadmissionpolicybindings/{name} | *AdmissionregistrationV1Api* | [**replace_validating_admission_policy_status**](docs/AdmissionregistrationV1Api.md#replace_validating_admission_policy_status) | **PUT** /apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies/{name}/status | *AdmissionregistrationV1Api* | [**replace_validating_webhook_configuration**](docs/AdmissionregistrationV1Api.md#replace_validating_webhook_configuration) | **PUT** /apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name} | -*AdmissionregistrationV1alpha1Api* | [**create_validating_admission_policy**](docs/AdmissionregistrationV1alpha1Api.md#create_validating_admission_policy) | **POST** /apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies | -*AdmissionregistrationV1alpha1Api* | [**create_validating_admission_policy_binding**](docs/AdmissionregistrationV1alpha1Api.md#create_validating_admission_policy_binding) | **POST** /apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicybindings | -*AdmissionregistrationV1alpha1Api* | [**delete_collection_validating_admission_policy**](docs/AdmissionregistrationV1alpha1Api.md#delete_collection_validating_admission_policy) | **DELETE** /apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies | -*AdmissionregistrationV1alpha1Api* | [**delete_collection_validating_admission_policy_binding**](docs/AdmissionregistrationV1alpha1Api.md#delete_collection_validating_admission_policy_binding) | **DELETE** /apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicybindings | -*AdmissionregistrationV1alpha1Api* | [**delete_validating_admission_policy**](docs/AdmissionregistrationV1alpha1Api.md#delete_validating_admission_policy) | **DELETE** /apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies/{name} | -*AdmissionregistrationV1alpha1Api* | [**delete_validating_admission_policy_binding**](docs/AdmissionregistrationV1alpha1Api.md#delete_validating_admission_policy_binding) | **DELETE** /apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicybindings/{name} | +*AdmissionregistrationV1alpha1Api* | [**create_mutating_admission_policy**](docs/AdmissionregistrationV1alpha1Api.md#create_mutating_admission_policy) | **POST** /apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicies | +*AdmissionregistrationV1alpha1Api* | [**create_mutating_admission_policy_binding**](docs/AdmissionregistrationV1alpha1Api.md#create_mutating_admission_policy_binding) | **POST** /apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicybindings | +*AdmissionregistrationV1alpha1Api* | [**delete_collection_mutating_admission_policy**](docs/AdmissionregistrationV1alpha1Api.md#delete_collection_mutating_admission_policy) | **DELETE** /apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicies | +*AdmissionregistrationV1alpha1Api* | [**delete_collection_mutating_admission_policy_binding**](docs/AdmissionregistrationV1alpha1Api.md#delete_collection_mutating_admission_policy_binding) | **DELETE** /apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicybindings | +*AdmissionregistrationV1alpha1Api* | [**delete_mutating_admission_policy**](docs/AdmissionregistrationV1alpha1Api.md#delete_mutating_admission_policy) | **DELETE** /apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicies/{name} | +*AdmissionregistrationV1alpha1Api* | [**delete_mutating_admission_policy_binding**](docs/AdmissionregistrationV1alpha1Api.md#delete_mutating_admission_policy_binding) | **DELETE** /apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicybindings/{name} | *AdmissionregistrationV1alpha1Api* | [**get_api_resources**](docs/AdmissionregistrationV1alpha1Api.md#get_api_resources) | **GET** /apis/admissionregistration.k8s.io/v1alpha1/ | -*AdmissionregistrationV1alpha1Api* | [**list_validating_admission_policy**](docs/AdmissionregistrationV1alpha1Api.md#list_validating_admission_policy) | **GET** /apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies | -*AdmissionregistrationV1alpha1Api* | [**list_validating_admission_policy_binding**](docs/AdmissionregistrationV1alpha1Api.md#list_validating_admission_policy_binding) | **GET** /apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicybindings | -*AdmissionregistrationV1alpha1Api* | [**patch_validating_admission_policy**](docs/AdmissionregistrationV1alpha1Api.md#patch_validating_admission_policy) | **PATCH** /apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies/{name} | -*AdmissionregistrationV1alpha1Api* | [**patch_validating_admission_policy_binding**](docs/AdmissionregistrationV1alpha1Api.md#patch_validating_admission_policy_binding) | **PATCH** /apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicybindings/{name} | -*AdmissionregistrationV1alpha1Api* | [**patch_validating_admission_policy_status**](docs/AdmissionregistrationV1alpha1Api.md#patch_validating_admission_policy_status) | **PATCH** /apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies/{name}/status | -*AdmissionregistrationV1alpha1Api* | [**read_validating_admission_policy**](docs/AdmissionregistrationV1alpha1Api.md#read_validating_admission_policy) | **GET** /apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies/{name} | -*AdmissionregistrationV1alpha1Api* | [**read_validating_admission_policy_binding**](docs/AdmissionregistrationV1alpha1Api.md#read_validating_admission_policy_binding) | **GET** /apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicybindings/{name} | -*AdmissionregistrationV1alpha1Api* | [**read_validating_admission_policy_status**](docs/AdmissionregistrationV1alpha1Api.md#read_validating_admission_policy_status) | **GET** /apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies/{name}/status | -*AdmissionregistrationV1alpha1Api* | [**replace_validating_admission_policy**](docs/AdmissionregistrationV1alpha1Api.md#replace_validating_admission_policy) | **PUT** /apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies/{name} | -*AdmissionregistrationV1alpha1Api* | [**replace_validating_admission_policy_binding**](docs/AdmissionregistrationV1alpha1Api.md#replace_validating_admission_policy_binding) | **PUT** /apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicybindings/{name} | -*AdmissionregistrationV1alpha1Api* | [**replace_validating_admission_policy_status**](docs/AdmissionregistrationV1alpha1Api.md#replace_validating_admission_policy_status) | **PUT** /apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies/{name}/status | -*AdmissionregistrationV1beta1Api* | [**create_validating_admission_policy**](docs/AdmissionregistrationV1beta1Api.md#create_validating_admission_policy) | **POST** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies | -*AdmissionregistrationV1beta1Api* | [**create_validating_admission_policy_binding**](docs/AdmissionregistrationV1beta1Api.md#create_validating_admission_policy_binding) | **POST** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings | -*AdmissionregistrationV1beta1Api* | [**delete_collection_validating_admission_policy**](docs/AdmissionregistrationV1beta1Api.md#delete_collection_validating_admission_policy) | **DELETE** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies | -*AdmissionregistrationV1beta1Api* | [**delete_collection_validating_admission_policy_binding**](docs/AdmissionregistrationV1beta1Api.md#delete_collection_validating_admission_policy_binding) | **DELETE** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings | -*AdmissionregistrationV1beta1Api* | [**delete_validating_admission_policy**](docs/AdmissionregistrationV1beta1Api.md#delete_validating_admission_policy) | **DELETE** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name} | -*AdmissionregistrationV1beta1Api* | [**delete_validating_admission_policy_binding**](docs/AdmissionregistrationV1beta1Api.md#delete_validating_admission_policy_binding) | **DELETE** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings/{name} | +*AdmissionregistrationV1alpha1Api* | [**list_mutating_admission_policy**](docs/AdmissionregistrationV1alpha1Api.md#list_mutating_admission_policy) | **GET** /apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicies | +*AdmissionregistrationV1alpha1Api* | [**list_mutating_admission_policy_binding**](docs/AdmissionregistrationV1alpha1Api.md#list_mutating_admission_policy_binding) | **GET** /apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicybindings | +*AdmissionregistrationV1alpha1Api* | [**patch_mutating_admission_policy**](docs/AdmissionregistrationV1alpha1Api.md#patch_mutating_admission_policy) | **PATCH** /apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicies/{name} | +*AdmissionregistrationV1alpha1Api* | [**patch_mutating_admission_policy_binding**](docs/AdmissionregistrationV1alpha1Api.md#patch_mutating_admission_policy_binding) | **PATCH** /apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicybindings/{name} | +*AdmissionregistrationV1alpha1Api* | [**read_mutating_admission_policy**](docs/AdmissionregistrationV1alpha1Api.md#read_mutating_admission_policy) | **GET** /apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicies/{name} | +*AdmissionregistrationV1alpha1Api* | [**read_mutating_admission_policy_binding**](docs/AdmissionregistrationV1alpha1Api.md#read_mutating_admission_policy_binding) | **GET** /apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicybindings/{name} | +*AdmissionregistrationV1alpha1Api* | [**replace_mutating_admission_policy**](docs/AdmissionregistrationV1alpha1Api.md#replace_mutating_admission_policy) | **PUT** /apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicies/{name} | +*AdmissionregistrationV1alpha1Api* | [**replace_mutating_admission_policy_binding**](docs/AdmissionregistrationV1alpha1Api.md#replace_mutating_admission_policy_binding) | **PUT** /apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicybindings/{name} | +*AdmissionregistrationV1beta1Api* | [**create_mutating_admission_policy**](docs/AdmissionregistrationV1beta1Api.md#create_mutating_admission_policy) | **POST** /apis/admissionregistration.k8s.io/v1beta1/mutatingadmissionpolicies | +*AdmissionregistrationV1beta1Api* | [**create_mutating_admission_policy_binding**](docs/AdmissionregistrationV1beta1Api.md#create_mutating_admission_policy_binding) | **POST** /apis/admissionregistration.k8s.io/v1beta1/mutatingadmissionpolicybindings | +*AdmissionregistrationV1beta1Api* | [**delete_collection_mutating_admission_policy**](docs/AdmissionregistrationV1beta1Api.md#delete_collection_mutating_admission_policy) | **DELETE** /apis/admissionregistration.k8s.io/v1beta1/mutatingadmissionpolicies | +*AdmissionregistrationV1beta1Api* | [**delete_collection_mutating_admission_policy_binding**](docs/AdmissionregistrationV1beta1Api.md#delete_collection_mutating_admission_policy_binding) | **DELETE** /apis/admissionregistration.k8s.io/v1beta1/mutatingadmissionpolicybindings | +*AdmissionregistrationV1beta1Api* | [**delete_mutating_admission_policy**](docs/AdmissionregistrationV1beta1Api.md#delete_mutating_admission_policy) | **DELETE** /apis/admissionregistration.k8s.io/v1beta1/mutatingadmissionpolicies/{name} | +*AdmissionregistrationV1beta1Api* | [**delete_mutating_admission_policy_binding**](docs/AdmissionregistrationV1beta1Api.md#delete_mutating_admission_policy_binding) | **DELETE** /apis/admissionregistration.k8s.io/v1beta1/mutatingadmissionpolicybindings/{name} | *AdmissionregistrationV1beta1Api* | [**get_api_resources**](docs/AdmissionregistrationV1beta1Api.md#get_api_resources) | **GET** /apis/admissionregistration.k8s.io/v1beta1/ | -*AdmissionregistrationV1beta1Api* | [**list_validating_admission_policy**](docs/AdmissionregistrationV1beta1Api.md#list_validating_admission_policy) | **GET** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies | -*AdmissionregistrationV1beta1Api* | [**list_validating_admission_policy_binding**](docs/AdmissionregistrationV1beta1Api.md#list_validating_admission_policy_binding) | **GET** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings | -*AdmissionregistrationV1beta1Api* | [**patch_validating_admission_policy**](docs/AdmissionregistrationV1beta1Api.md#patch_validating_admission_policy) | **PATCH** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name} | -*AdmissionregistrationV1beta1Api* | [**patch_validating_admission_policy_binding**](docs/AdmissionregistrationV1beta1Api.md#patch_validating_admission_policy_binding) | **PATCH** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings/{name} | -*AdmissionregistrationV1beta1Api* | [**patch_validating_admission_policy_status**](docs/AdmissionregistrationV1beta1Api.md#patch_validating_admission_policy_status) | **PATCH** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name}/status | -*AdmissionregistrationV1beta1Api* | [**read_validating_admission_policy**](docs/AdmissionregistrationV1beta1Api.md#read_validating_admission_policy) | **GET** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name} | -*AdmissionregistrationV1beta1Api* | [**read_validating_admission_policy_binding**](docs/AdmissionregistrationV1beta1Api.md#read_validating_admission_policy_binding) | **GET** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings/{name} | -*AdmissionregistrationV1beta1Api* | [**read_validating_admission_policy_status**](docs/AdmissionregistrationV1beta1Api.md#read_validating_admission_policy_status) | **GET** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name}/status | -*AdmissionregistrationV1beta1Api* | [**replace_validating_admission_policy**](docs/AdmissionregistrationV1beta1Api.md#replace_validating_admission_policy) | **PUT** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name} | -*AdmissionregistrationV1beta1Api* | [**replace_validating_admission_policy_binding**](docs/AdmissionregistrationV1beta1Api.md#replace_validating_admission_policy_binding) | **PUT** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings/{name} | -*AdmissionregistrationV1beta1Api* | [**replace_validating_admission_policy_status**](docs/AdmissionregistrationV1beta1Api.md#replace_validating_admission_policy_status) | **PUT** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name}/status | +*AdmissionregistrationV1beta1Api* | [**list_mutating_admission_policy**](docs/AdmissionregistrationV1beta1Api.md#list_mutating_admission_policy) | **GET** /apis/admissionregistration.k8s.io/v1beta1/mutatingadmissionpolicies | +*AdmissionregistrationV1beta1Api* | [**list_mutating_admission_policy_binding**](docs/AdmissionregistrationV1beta1Api.md#list_mutating_admission_policy_binding) | **GET** /apis/admissionregistration.k8s.io/v1beta1/mutatingadmissionpolicybindings | +*AdmissionregistrationV1beta1Api* | [**patch_mutating_admission_policy**](docs/AdmissionregistrationV1beta1Api.md#patch_mutating_admission_policy) | **PATCH** /apis/admissionregistration.k8s.io/v1beta1/mutatingadmissionpolicies/{name} | +*AdmissionregistrationV1beta1Api* | [**patch_mutating_admission_policy_binding**](docs/AdmissionregistrationV1beta1Api.md#patch_mutating_admission_policy_binding) | **PATCH** /apis/admissionregistration.k8s.io/v1beta1/mutatingadmissionpolicybindings/{name} | +*AdmissionregistrationV1beta1Api* | [**read_mutating_admission_policy**](docs/AdmissionregistrationV1beta1Api.md#read_mutating_admission_policy) | **GET** /apis/admissionregistration.k8s.io/v1beta1/mutatingadmissionpolicies/{name} | +*AdmissionregistrationV1beta1Api* | [**read_mutating_admission_policy_binding**](docs/AdmissionregistrationV1beta1Api.md#read_mutating_admission_policy_binding) | **GET** /apis/admissionregistration.k8s.io/v1beta1/mutatingadmissionpolicybindings/{name} | +*AdmissionregistrationV1beta1Api* | [**replace_mutating_admission_policy**](docs/AdmissionregistrationV1beta1Api.md#replace_mutating_admission_policy) | **PUT** /apis/admissionregistration.k8s.io/v1beta1/mutatingadmissionpolicies/{name} | +*AdmissionregistrationV1beta1Api* | [**replace_mutating_admission_policy_binding**](docs/AdmissionregistrationV1beta1Api.md#replace_mutating_admission_policy_binding) | **PUT** /apis/admissionregistration.k8s.io/v1beta1/mutatingadmissionpolicybindings/{name} | *ApiextensionsApi* | [**get_api_group**](docs/ApiextensionsApi.md#get_api_group) | **GET** /apis/apiextensions.k8s.io/ | *ApiextensionsV1Api* | [**create_custom_resource_definition**](docs/ApiextensionsV1Api.md#create_custom_resource_definition) | **POST** /apis/apiextensions.k8s.io/v1/customresourcedefinitions | *ApiextensionsV1Api* | [**delete_collection_custom_resource_definition**](docs/ApiextensionsV1Api.md#delete_collection_custom_resource_definition) | **DELETE** /apis/apiextensions.k8s.io/v1/customresourcedefinitions | @@ -243,10 +245,6 @@ Class | Method | HTTP request | Description *AuthenticationV1Api* | [**create_self_subject_review**](docs/AuthenticationV1Api.md#create_self_subject_review) | **POST** /apis/authentication.k8s.io/v1/selfsubjectreviews | *AuthenticationV1Api* | [**create_token_review**](docs/AuthenticationV1Api.md#create_token_review) | **POST** /apis/authentication.k8s.io/v1/tokenreviews | *AuthenticationV1Api* | [**get_api_resources**](docs/AuthenticationV1Api.md#get_api_resources) | **GET** /apis/authentication.k8s.io/v1/ | -*AuthenticationV1alpha1Api* | [**create_self_subject_review**](docs/AuthenticationV1alpha1Api.md#create_self_subject_review) | **POST** /apis/authentication.k8s.io/v1alpha1/selfsubjectreviews | -*AuthenticationV1alpha1Api* | [**get_api_resources**](docs/AuthenticationV1alpha1Api.md#get_api_resources) | **GET** /apis/authentication.k8s.io/v1alpha1/ | -*AuthenticationV1beta1Api* | [**create_self_subject_review**](docs/AuthenticationV1beta1Api.md#create_self_subject_review) | **POST** /apis/authentication.k8s.io/v1beta1/selfsubjectreviews | -*AuthenticationV1beta1Api* | [**get_api_resources**](docs/AuthenticationV1beta1Api.md#get_api_resources) | **GET** /apis/authentication.k8s.io/v1beta1/ | *AuthorizationApi* | [**get_api_group**](docs/AuthorizationApi.md#get_api_group) | **GET** /apis/authorization.k8s.io/ | *AuthorizationV1Api* | [**create_namespaced_local_subject_access_review**](docs/AuthorizationV1Api.md#create_namespaced_local_subject_access_review) | **POST** /apis/authorization.k8s.io/v1/namespaces/{namespace}/localsubjectaccessreviews | *AuthorizationV1Api* | [**create_self_subject_access_review**](docs/AuthorizationV1Api.md#create_self_subject_access_review) | **POST** /apis/authorization.k8s.io/v1/selfsubjectaccessreviews | @@ -325,6 +323,25 @@ Class | Method | HTTP request | Description *CertificatesV1alpha1Api* | [**patch_cluster_trust_bundle**](docs/CertificatesV1alpha1Api.md#patch_cluster_trust_bundle) | **PATCH** /apis/certificates.k8s.io/v1alpha1/clustertrustbundles/{name} | *CertificatesV1alpha1Api* | [**read_cluster_trust_bundle**](docs/CertificatesV1alpha1Api.md#read_cluster_trust_bundle) | **GET** /apis/certificates.k8s.io/v1alpha1/clustertrustbundles/{name} | *CertificatesV1alpha1Api* | [**replace_cluster_trust_bundle**](docs/CertificatesV1alpha1Api.md#replace_cluster_trust_bundle) | **PUT** /apis/certificates.k8s.io/v1alpha1/clustertrustbundles/{name} | +*CertificatesV1beta1Api* | [**create_cluster_trust_bundle**](docs/CertificatesV1beta1Api.md#create_cluster_trust_bundle) | **POST** /apis/certificates.k8s.io/v1beta1/clustertrustbundles | +*CertificatesV1beta1Api* | [**create_namespaced_pod_certificate_request**](docs/CertificatesV1beta1Api.md#create_namespaced_pod_certificate_request) | **POST** /apis/certificates.k8s.io/v1beta1/namespaces/{namespace}/podcertificaterequests | +*CertificatesV1beta1Api* | [**delete_cluster_trust_bundle**](docs/CertificatesV1beta1Api.md#delete_cluster_trust_bundle) | **DELETE** /apis/certificates.k8s.io/v1beta1/clustertrustbundles/{name} | +*CertificatesV1beta1Api* | [**delete_collection_cluster_trust_bundle**](docs/CertificatesV1beta1Api.md#delete_collection_cluster_trust_bundle) | **DELETE** /apis/certificates.k8s.io/v1beta1/clustertrustbundles | +*CertificatesV1beta1Api* | [**delete_collection_namespaced_pod_certificate_request**](docs/CertificatesV1beta1Api.md#delete_collection_namespaced_pod_certificate_request) | **DELETE** /apis/certificates.k8s.io/v1beta1/namespaces/{namespace}/podcertificaterequests | +*CertificatesV1beta1Api* | [**delete_namespaced_pod_certificate_request**](docs/CertificatesV1beta1Api.md#delete_namespaced_pod_certificate_request) | **DELETE** /apis/certificates.k8s.io/v1beta1/namespaces/{namespace}/podcertificaterequests/{name} | +*CertificatesV1beta1Api* | [**get_api_resources**](docs/CertificatesV1beta1Api.md#get_api_resources) | **GET** /apis/certificates.k8s.io/v1beta1/ | +*CertificatesV1beta1Api* | [**list_cluster_trust_bundle**](docs/CertificatesV1beta1Api.md#list_cluster_trust_bundle) | **GET** /apis/certificates.k8s.io/v1beta1/clustertrustbundles | +*CertificatesV1beta1Api* | [**list_namespaced_pod_certificate_request**](docs/CertificatesV1beta1Api.md#list_namespaced_pod_certificate_request) | **GET** /apis/certificates.k8s.io/v1beta1/namespaces/{namespace}/podcertificaterequests | +*CertificatesV1beta1Api* | [**list_pod_certificate_request_for_all_namespaces**](docs/CertificatesV1beta1Api.md#list_pod_certificate_request_for_all_namespaces) | **GET** /apis/certificates.k8s.io/v1beta1/podcertificaterequests | +*CertificatesV1beta1Api* | [**patch_cluster_trust_bundle**](docs/CertificatesV1beta1Api.md#patch_cluster_trust_bundle) | **PATCH** /apis/certificates.k8s.io/v1beta1/clustertrustbundles/{name} | +*CertificatesV1beta1Api* | [**patch_namespaced_pod_certificate_request**](docs/CertificatesV1beta1Api.md#patch_namespaced_pod_certificate_request) | **PATCH** /apis/certificates.k8s.io/v1beta1/namespaces/{namespace}/podcertificaterequests/{name} | +*CertificatesV1beta1Api* | [**patch_namespaced_pod_certificate_request_status**](docs/CertificatesV1beta1Api.md#patch_namespaced_pod_certificate_request_status) | **PATCH** /apis/certificates.k8s.io/v1beta1/namespaces/{namespace}/podcertificaterequests/{name}/status | +*CertificatesV1beta1Api* | [**read_cluster_trust_bundle**](docs/CertificatesV1beta1Api.md#read_cluster_trust_bundle) | **GET** /apis/certificates.k8s.io/v1beta1/clustertrustbundles/{name} | +*CertificatesV1beta1Api* | [**read_namespaced_pod_certificate_request**](docs/CertificatesV1beta1Api.md#read_namespaced_pod_certificate_request) | **GET** /apis/certificates.k8s.io/v1beta1/namespaces/{namespace}/podcertificaterequests/{name} | +*CertificatesV1beta1Api* | [**read_namespaced_pod_certificate_request_status**](docs/CertificatesV1beta1Api.md#read_namespaced_pod_certificate_request_status) | **GET** /apis/certificates.k8s.io/v1beta1/namespaces/{namespace}/podcertificaterequests/{name}/status | +*CertificatesV1beta1Api* | [**replace_cluster_trust_bundle**](docs/CertificatesV1beta1Api.md#replace_cluster_trust_bundle) | **PUT** /apis/certificates.k8s.io/v1beta1/clustertrustbundles/{name} | +*CertificatesV1beta1Api* | [**replace_namespaced_pod_certificate_request**](docs/CertificatesV1beta1Api.md#replace_namespaced_pod_certificate_request) | **PUT** /apis/certificates.k8s.io/v1beta1/namespaces/{namespace}/podcertificaterequests/{name} | +*CertificatesV1beta1Api* | [**replace_namespaced_pod_certificate_request_status**](docs/CertificatesV1beta1Api.md#replace_namespaced_pod_certificate_request_status) | **PUT** /apis/certificates.k8s.io/v1beta1/namespaces/{namespace}/podcertificaterequests/{name}/status | *CoordinationApi* | [**get_api_group**](docs/CoordinationApi.md#get_api_group) | **GET** /apis/coordination.k8s.io/ | *CoordinationV1Api* | [**create_namespaced_lease**](docs/CoordinationV1Api.md#create_namespaced_lease) | **POST** /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases | *CoordinationV1Api* | [**delete_collection_namespaced_lease**](docs/CoordinationV1Api.md#delete_collection_namespaced_lease) | **DELETE** /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases | @@ -335,6 +352,24 @@ Class | Method | HTTP request | Description *CoordinationV1Api* | [**patch_namespaced_lease**](docs/CoordinationV1Api.md#patch_namespaced_lease) | **PATCH** /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name} | *CoordinationV1Api* | [**read_namespaced_lease**](docs/CoordinationV1Api.md#read_namespaced_lease) | **GET** /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name} | *CoordinationV1Api* | [**replace_namespaced_lease**](docs/CoordinationV1Api.md#replace_namespaced_lease) | **PUT** /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name} | +*CoordinationV1alpha2Api* | [**create_namespaced_lease_candidate**](docs/CoordinationV1alpha2Api.md#create_namespaced_lease_candidate) | **POST** /apis/coordination.k8s.io/v1alpha2/namespaces/{namespace}/leasecandidates | +*CoordinationV1alpha2Api* | [**delete_collection_namespaced_lease_candidate**](docs/CoordinationV1alpha2Api.md#delete_collection_namespaced_lease_candidate) | **DELETE** /apis/coordination.k8s.io/v1alpha2/namespaces/{namespace}/leasecandidates | +*CoordinationV1alpha2Api* | [**delete_namespaced_lease_candidate**](docs/CoordinationV1alpha2Api.md#delete_namespaced_lease_candidate) | **DELETE** /apis/coordination.k8s.io/v1alpha2/namespaces/{namespace}/leasecandidates/{name} | +*CoordinationV1alpha2Api* | [**get_api_resources**](docs/CoordinationV1alpha2Api.md#get_api_resources) | **GET** /apis/coordination.k8s.io/v1alpha2/ | +*CoordinationV1alpha2Api* | [**list_lease_candidate_for_all_namespaces**](docs/CoordinationV1alpha2Api.md#list_lease_candidate_for_all_namespaces) | **GET** /apis/coordination.k8s.io/v1alpha2/leasecandidates | +*CoordinationV1alpha2Api* | [**list_namespaced_lease_candidate**](docs/CoordinationV1alpha2Api.md#list_namespaced_lease_candidate) | **GET** /apis/coordination.k8s.io/v1alpha2/namespaces/{namespace}/leasecandidates | +*CoordinationV1alpha2Api* | [**patch_namespaced_lease_candidate**](docs/CoordinationV1alpha2Api.md#patch_namespaced_lease_candidate) | **PATCH** /apis/coordination.k8s.io/v1alpha2/namespaces/{namespace}/leasecandidates/{name} | +*CoordinationV1alpha2Api* | [**read_namespaced_lease_candidate**](docs/CoordinationV1alpha2Api.md#read_namespaced_lease_candidate) | **GET** /apis/coordination.k8s.io/v1alpha2/namespaces/{namespace}/leasecandidates/{name} | +*CoordinationV1alpha2Api* | [**replace_namespaced_lease_candidate**](docs/CoordinationV1alpha2Api.md#replace_namespaced_lease_candidate) | **PUT** /apis/coordination.k8s.io/v1alpha2/namespaces/{namespace}/leasecandidates/{name} | +*CoordinationV1beta1Api* | [**create_namespaced_lease_candidate**](docs/CoordinationV1beta1Api.md#create_namespaced_lease_candidate) | **POST** /apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leasecandidates | +*CoordinationV1beta1Api* | [**delete_collection_namespaced_lease_candidate**](docs/CoordinationV1beta1Api.md#delete_collection_namespaced_lease_candidate) | **DELETE** /apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leasecandidates | +*CoordinationV1beta1Api* | [**delete_namespaced_lease_candidate**](docs/CoordinationV1beta1Api.md#delete_namespaced_lease_candidate) | **DELETE** /apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leasecandidates/{name} | +*CoordinationV1beta1Api* | [**get_api_resources**](docs/CoordinationV1beta1Api.md#get_api_resources) | **GET** /apis/coordination.k8s.io/v1beta1/ | +*CoordinationV1beta1Api* | [**list_lease_candidate_for_all_namespaces**](docs/CoordinationV1beta1Api.md#list_lease_candidate_for_all_namespaces) | **GET** /apis/coordination.k8s.io/v1beta1/leasecandidates | +*CoordinationV1beta1Api* | [**list_namespaced_lease_candidate**](docs/CoordinationV1beta1Api.md#list_namespaced_lease_candidate) | **GET** /apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leasecandidates | +*CoordinationV1beta1Api* | [**patch_namespaced_lease_candidate**](docs/CoordinationV1beta1Api.md#patch_namespaced_lease_candidate) | **PATCH** /apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leasecandidates/{name} | +*CoordinationV1beta1Api* | [**read_namespaced_lease_candidate**](docs/CoordinationV1beta1Api.md#read_namespaced_lease_candidate) | **GET** /apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leasecandidates/{name} | +*CoordinationV1beta1Api* | [**replace_namespaced_lease_candidate**](docs/CoordinationV1beta1Api.md#replace_namespaced_lease_candidate) | **PUT** /apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leasecandidates/{name} | *CoreApi* | [**get_api_versions**](docs/CoreApi.md#get_api_versions) | **GET** /api/ | *CoreV1Api* | [**connect_delete_namespaced_pod_proxy**](docs/CoreV1Api.md#connect_delete_namespaced_pod_proxy) | **DELETE** /api/v1/namespaces/{namespace}/pods/{name}/proxy | *CoreV1Api* | [**connect_delete_namespaced_pod_proxy_with_path**](docs/CoreV1Api.md#connect_delete_namespaced_pod_proxy_with_path) | **DELETE** /api/v1/namespaces/{namespace}/pods/{name}/proxy/{path} | @@ -471,6 +506,7 @@ Class | Method | HTTP request | Description *CoreV1Api* | [**patch_namespaced_persistent_volume_claim_status**](docs/CoreV1Api.md#patch_namespaced_persistent_volume_claim_status) | **PATCH** /api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status | *CoreV1Api* | [**patch_namespaced_pod**](docs/CoreV1Api.md#patch_namespaced_pod) | **PATCH** /api/v1/namespaces/{namespace}/pods/{name} | *CoreV1Api* | [**patch_namespaced_pod_ephemeralcontainers**](docs/CoreV1Api.md#patch_namespaced_pod_ephemeralcontainers) | **PATCH** /api/v1/namespaces/{namespace}/pods/{name}/ephemeralcontainers | +*CoreV1Api* | [**patch_namespaced_pod_resize**](docs/CoreV1Api.md#patch_namespaced_pod_resize) | **PATCH** /api/v1/namespaces/{namespace}/pods/{name}/resize | *CoreV1Api* | [**patch_namespaced_pod_status**](docs/CoreV1Api.md#patch_namespaced_pod_status) | **PATCH** /api/v1/namespaces/{namespace}/pods/{name}/status | *CoreV1Api* | [**patch_namespaced_pod_template**](docs/CoreV1Api.md#patch_namespaced_pod_template) | **PATCH** /api/v1/namespaces/{namespace}/podtemplates/{name} | *CoreV1Api* | [**patch_namespaced_replication_controller**](docs/CoreV1Api.md#patch_namespaced_replication_controller) | **PATCH** /api/v1/namespaces/{namespace}/replicationcontrollers/{name} | @@ -498,6 +534,7 @@ Class | Method | HTTP request | Description *CoreV1Api* | [**read_namespaced_pod**](docs/CoreV1Api.md#read_namespaced_pod) | **GET** /api/v1/namespaces/{namespace}/pods/{name} | *CoreV1Api* | [**read_namespaced_pod_ephemeralcontainers**](docs/CoreV1Api.md#read_namespaced_pod_ephemeralcontainers) | **GET** /api/v1/namespaces/{namespace}/pods/{name}/ephemeralcontainers | *CoreV1Api* | [**read_namespaced_pod_log**](docs/CoreV1Api.md#read_namespaced_pod_log) | **GET** /api/v1/namespaces/{namespace}/pods/{name}/log | +*CoreV1Api* | [**read_namespaced_pod_resize**](docs/CoreV1Api.md#read_namespaced_pod_resize) | **GET** /api/v1/namespaces/{namespace}/pods/{name}/resize | *CoreV1Api* | [**read_namespaced_pod_status**](docs/CoreV1Api.md#read_namespaced_pod_status) | **GET** /api/v1/namespaces/{namespace}/pods/{name}/status | *CoreV1Api* | [**read_namespaced_pod_template**](docs/CoreV1Api.md#read_namespaced_pod_template) | **GET** /api/v1/namespaces/{namespace}/podtemplates/{name} | *CoreV1Api* | [**read_namespaced_replication_controller**](docs/CoreV1Api.md#read_namespaced_replication_controller) | **GET** /api/v1/namespaces/{namespace}/replicationcontrollers/{name} | @@ -524,6 +561,7 @@ Class | Method | HTTP request | Description *CoreV1Api* | [**replace_namespaced_persistent_volume_claim_status**](docs/CoreV1Api.md#replace_namespaced_persistent_volume_claim_status) | **PUT** /api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status | *CoreV1Api* | [**replace_namespaced_pod**](docs/CoreV1Api.md#replace_namespaced_pod) | **PUT** /api/v1/namespaces/{namespace}/pods/{name} | *CoreV1Api* | [**replace_namespaced_pod_ephemeralcontainers**](docs/CoreV1Api.md#replace_namespaced_pod_ephemeralcontainers) | **PUT** /api/v1/namespaces/{namespace}/pods/{name}/ephemeralcontainers | +*CoreV1Api* | [**replace_namespaced_pod_resize**](docs/CoreV1Api.md#replace_namespaced_pod_resize) | **PUT** /api/v1/namespaces/{namespace}/pods/{name}/resize | *CoreV1Api* | [**replace_namespaced_pod_status**](docs/CoreV1Api.md#replace_namespaced_pod_status) | **PUT** /api/v1/namespaces/{namespace}/pods/{name}/status | *CoreV1Api* | [**replace_namespaced_pod_template**](docs/CoreV1Api.md#replace_namespaced_pod_template) | **PUT** /api/v1/namespaces/{namespace}/podtemplates/{name} | *CoreV1Api* | [**replace_namespaced_replication_controller**](docs/CoreV1Api.md#replace_namespaced_replication_controller) | **PUT** /api/v1/namespaces/{namespace}/replicationcontrollers/{name} | @@ -553,6 +591,7 @@ Class | Method | HTTP request | Description *CustomObjectsApi* | [**get_namespaced_custom_object_scale**](docs/CustomObjectsApi.md#get_namespaced_custom_object_scale) | **GET** /apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/scale | *CustomObjectsApi* | [**get_namespaced_custom_object_status**](docs/CustomObjectsApi.md#get_namespaced_custom_object_status) | **GET** /apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/status | *CustomObjectsApi* | [**list_cluster_custom_object**](docs/CustomObjectsApi.md#list_cluster_custom_object) | **GET** /apis/{group}/{version}/{plural} | +*CustomObjectsApi* | [**list_custom_object_for_all_namespaces**](docs/CustomObjectsApi.md#list_custom_object_for_all_namespaces) | **GET** /apis/{group}/{version}/{resource_plural} | *CustomObjectsApi* | [**list_namespaced_custom_object**](docs/CustomObjectsApi.md#list_namespaced_custom_object) | **GET** /apis/{group}/{version}/namespaces/{namespace}/{plural} | *CustomObjectsApi* | [**patch_cluster_custom_object**](docs/CustomObjectsApi.md#patch_cluster_custom_object) | **PATCH** /apis/{group}/{version}/{plural}/{name} | *CustomObjectsApi* | [**patch_cluster_custom_object_scale**](docs/CustomObjectsApi.md#patch_cluster_custom_object_scale) | **PATCH** /apis/{group}/{version}/{plural}/{name}/scale | @@ -608,27 +647,6 @@ Class | Method | HTTP request | Description *FlowcontrolApiserverV1Api* | [**replace_flow_schema_status**](docs/FlowcontrolApiserverV1Api.md#replace_flow_schema_status) | **PUT** /apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/{name}/status | *FlowcontrolApiserverV1Api* | [**replace_priority_level_configuration**](docs/FlowcontrolApiserverV1Api.md#replace_priority_level_configuration) | **PUT** /apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations/{name} | *FlowcontrolApiserverV1Api* | [**replace_priority_level_configuration_status**](docs/FlowcontrolApiserverV1Api.md#replace_priority_level_configuration_status) | **PUT** /apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations/{name}/status | -*FlowcontrolApiserverV1beta3Api* | [**create_flow_schema**](docs/FlowcontrolApiserverV1beta3Api.md#create_flow_schema) | **POST** /apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas | -*FlowcontrolApiserverV1beta3Api* | [**create_priority_level_configuration**](docs/FlowcontrolApiserverV1beta3Api.md#create_priority_level_configuration) | **POST** /apis/flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations | -*FlowcontrolApiserverV1beta3Api* | [**delete_collection_flow_schema**](docs/FlowcontrolApiserverV1beta3Api.md#delete_collection_flow_schema) | **DELETE** /apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas | -*FlowcontrolApiserverV1beta3Api* | [**delete_collection_priority_level_configuration**](docs/FlowcontrolApiserverV1beta3Api.md#delete_collection_priority_level_configuration) | **DELETE** /apis/flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations | -*FlowcontrolApiserverV1beta3Api* | [**delete_flow_schema**](docs/FlowcontrolApiserverV1beta3Api.md#delete_flow_schema) | **DELETE** /apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas/{name} | -*FlowcontrolApiserverV1beta3Api* | [**delete_priority_level_configuration**](docs/FlowcontrolApiserverV1beta3Api.md#delete_priority_level_configuration) | **DELETE** /apis/flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations/{name} | -*FlowcontrolApiserverV1beta3Api* | [**get_api_resources**](docs/FlowcontrolApiserverV1beta3Api.md#get_api_resources) | **GET** /apis/flowcontrol.apiserver.k8s.io/v1beta3/ | -*FlowcontrolApiserverV1beta3Api* | [**list_flow_schema**](docs/FlowcontrolApiserverV1beta3Api.md#list_flow_schema) | **GET** /apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas | -*FlowcontrolApiserverV1beta3Api* | [**list_priority_level_configuration**](docs/FlowcontrolApiserverV1beta3Api.md#list_priority_level_configuration) | **GET** /apis/flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations | -*FlowcontrolApiserverV1beta3Api* | [**patch_flow_schema**](docs/FlowcontrolApiserverV1beta3Api.md#patch_flow_schema) | **PATCH** /apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas/{name} | -*FlowcontrolApiserverV1beta3Api* | [**patch_flow_schema_status**](docs/FlowcontrolApiserverV1beta3Api.md#patch_flow_schema_status) | **PATCH** /apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas/{name}/status | -*FlowcontrolApiserverV1beta3Api* | [**patch_priority_level_configuration**](docs/FlowcontrolApiserverV1beta3Api.md#patch_priority_level_configuration) | **PATCH** /apis/flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations/{name} | -*FlowcontrolApiserverV1beta3Api* | [**patch_priority_level_configuration_status**](docs/FlowcontrolApiserverV1beta3Api.md#patch_priority_level_configuration_status) | **PATCH** /apis/flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations/{name}/status | -*FlowcontrolApiserverV1beta3Api* | [**read_flow_schema**](docs/FlowcontrolApiserverV1beta3Api.md#read_flow_schema) | **GET** /apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas/{name} | -*FlowcontrolApiserverV1beta3Api* | [**read_flow_schema_status**](docs/FlowcontrolApiserverV1beta3Api.md#read_flow_schema_status) | **GET** /apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas/{name}/status | -*FlowcontrolApiserverV1beta3Api* | [**read_priority_level_configuration**](docs/FlowcontrolApiserverV1beta3Api.md#read_priority_level_configuration) | **GET** /apis/flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations/{name} | -*FlowcontrolApiserverV1beta3Api* | [**read_priority_level_configuration_status**](docs/FlowcontrolApiserverV1beta3Api.md#read_priority_level_configuration_status) | **GET** /apis/flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations/{name}/status | -*FlowcontrolApiserverV1beta3Api* | [**replace_flow_schema**](docs/FlowcontrolApiserverV1beta3Api.md#replace_flow_schema) | **PUT** /apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas/{name} | -*FlowcontrolApiserverV1beta3Api* | [**replace_flow_schema_status**](docs/FlowcontrolApiserverV1beta3Api.md#replace_flow_schema_status) | **PUT** /apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas/{name}/status | -*FlowcontrolApiserverV1beta3Api* | [**replace_priority_level_configuration**](docs/FlowcontrolApiserverV1beta3Api.md#replace_priority_level_configuration) | **PUT** /apis/flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations/{name} | -*FlowcontrolApiserverV1beta3Api* | [**replace_priority_level_configuration_status**](docs/FlowcontrolApiserverV1beta3Api.md#replace_priority_level_configuration_status) | **PUT** /apis/flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations/{name}/status | *InternalApiserverApi* | [**get_api_group**](docs/InternalApiserverApi.md#get_api_group) | **GET** /apis/internal.apiserver.k8s.io/ | *InternalApiserverV1alpha1Api* | [**create_storage_version**](docs/InternalApiserverV1alpha1Api.md#create_storage_version) | **POST** /apis/internal.apiserver.k8s.io/v1alpha1/storageversions | *InternalApiserverV1alpha1Api* | [**delete_collection_storage_version**](docs/InternalApiserverV1alpha1Api.md#delete_collection_storage_version) | **DELETE** /apis/internal.apiserver.k8s.io/v1alpha1/storageversions | @@ -645,50 +663,67 @@ Class | Method | HTTP request | Description *LogsApi* | [**log_file_list_handler**](docs/LogsApi.md#log_file_list_handler) | **GET** /logs/ | *NetworkingApi* | [**get_api_group**](docs/NetworkingApi.md#get_api_group) | **GET** /apis/networking.k8s.io/ | *NetworkingV1Api* | [**create_ingress_class**](docs/NetworkingV1Api.md#create_ingress_class) | **POST** /apis/networking.k8s.io/v1/ingressclasses | +*NetworkingV1Api* | [**create_ip_address**](docs/NetworkingV1Api.md#create_ip_address) | **POST** /apis/networking.k8s.io/v1/ipaddresses | *NetworkingV1Api* | [**create_namespaced_ingress**](docs/NetworkingV1Api.md#create_namespaced_ingress) | **POST** /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses | *NetworkingV1Api* | [**create_namespaced_network_policy**](docs/NetworkingV1Api.md#create_namespaced_network_policy) | **POST** /apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies | +*NetworkingV1Api* | [**create_service_cidr**](docs/NetworkingV1Api.md#create_service_cidr) | **POST** /apis/networking.k8s.io/v1/servicecidrs | *NetworkingV1Api* | [**delete_collection_ingress_class**](docs/NetworkingV1Api.md#delete_collection_ingress_class) | **DELETE** /apis/networking.k8s.io/v1/ingressclasses | +*NetworkingV1Api* | [**delete_collection_ip_address**](docs/NetworkingV1Api.md#delete_collection_ip_address) | **DELETE** /apis/networking.k8s.io/v1/ipaddresses | *NetworkingV1Api* | [**delete_collection_namespaced_ingress**](docs/NetworkingV1Api.md#delete_collection_namespaced_ingress) | **DELETE** /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses | *NetworkingV1Api* | [**delete_collection_namespaced_network_policy**](docs/NetworkingV1Api.md#delete_collection_namespaced_network_policy) | **DELETE** /apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies | +*NetworkingV1Api* | [**delete_collection_service_cidr**](docs/NetworkingV1Api.md#delete_collection_service_cidr) | **DELETE** /apis/networking.k8s.io/v1/servicecidrs | *NetworkingV1Api* | [**delete_ingress_class**](docs/NetworkingV1Api.md#delete_ingress_class) | **DELETE** /apis/networking.k8s.io/v1/ingressclasses/{name} | +*NetworkingV1Api* | [**delete_ip_address**](docs/NetworkingV1Api.md#delete_ip_address) | **DELETE** /apis/networking.k8s.io/v1/ipaddresses/{name} | *NetworkingV1Api* | [**delete_namespaced_ingress**](docs/NetworkingV1Api.md#delete_namespaced_ingress) | **DELETE** /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name} | *NetworkingV1Api* | [**delete_namespaced_network_policy**](docs/NetworkingV1Api.md#delete_namespaced_network_policy) | **DELETE** /apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name} | +*NetworkingV1Api* | [**delete_service_cidr**](docs/NetworkingV1Api.md#delete_service_cidr) | **DELETE** /apis/networking.k8s.io/v1/servicecidrs/{name} | *NetworkingV1Api* | [**get_api_resources**](docs/NetworkingV1Api.md#get_api_resources) | **GET** /apis/networking.k8s.io/v1/ | *NetworkingV1Api* | [**list_ingress_class**](docs/NetworkingV1Api.md#list_ingress_class) | **GET** /apis/networking.k8s.io/v1/ingressclasses | *NetworkingV1Api* | [**list_ingress_for_all_namespaces**](docs/NetworkingV1Api.md#list_ingress_for_all_namespaces) | **GET** /apis/networking.k8s.io/v1/ingresses | +*NetworkingV1Api* | [**list_ip_address**](docs/NetworkingV1Api.md#list_ip_address) | **GET** /apis/networking.k8s.io/v1/ipaddresses | *NetworkingV1Api* | [**list_namespaced_ingress**](docs/NetworkingV1Api.md#list_namespaced_ingress) | **GET** /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses | *NetworkingV1Api* | [**list_namespaced_network_policy**](docs/NetworkingV1Api.md#list_namespaced_network_policy) | **GET** /apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies | *NetworkingV1Api* | [**list_network_policy_for_all_namespaces**](docs/NetworkingV1Api.md#list_network_policy_for_all_namespaces) | **GET** /apis/networking.k8s.io/v1/networkpolicies | +*NetworkingV1Api* | [**list_service_cidr**](docs/NetworkingV1Api.md#list_service_cidr) | **GET** /apis/networking.k8s.io/v1/servicecidrs | *NetworkingV1Api* | [**patch_ingress_class**](docs/NetworkingV1Api.md#patch_ingress_class) | **PATCH** /apis/networking.k8s.io/v1/ingressclasses/{name} | +*NetworkingV1Api* | [**patch_ip_address**](docs/NetworkingV1Api.md#patch_ip_address) | **PATCH** /apis/networking.k8s.io/v1/ipaddresses/{name} | *NetworkingV1Api* | [**patch_namespaced_ingress**](docs/NetworkingV1Api.md#patch_namespaced_ingress) | **PATCH** /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name} | *NetworkingV1Api* | [**patch_namespaced_ingress_status**](docs/NetworkingV1Api.md#patch_namespaced_ingress_status) | **PATCH** /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}/status | *NetworkingV1Api* | [**patch_namespaced_network_policy**](docs/NetworkingV1Api.md#patch_namespaced_network_policy) | **PATCH** /apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name} | +*NetworkingV1Api* | [**patch_service_cidr**](docs/NetworkingV1Api.md#patch_service_cidr) | **PATCH** /apis/networking.k8s.io/v1/servicecidrs/{name} | +*NetworkingV1Api* | [**patch_service_cidr_status**](docs/NetworkingV1Api.md#patch_service_cidr_status) | **PATCH** /apis/networking.k8s.io/v1/servicecidrs/{name}/status | *NetworkingV1Api* | [**read_ingress_class**](docs/NetworkingV1Api.md#read_ingress_class) | **GET** /apis/networking.k8s.io/v1/ingressclasses/{name} | +*NetworkingV1Api* | [**read_ip_address**](docs/NetworkingV1Api.md#read_ip_address) | **GET** /apis/networking.k8s.io/v1/ipaddresses/{name} | *NetworkingV1Api* | [**read_namespaced_ingress**](docs/NetworkingV1Api.md#read_namespaced_ingress) | **GET** /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name} | *NetworkingV1Api* | [**read_namespaced_ingress_status**](docs/NetworkingV1Api.md#read_namespaced_ingress_status) | **GET** /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}/status | *NetworkingV1Api* | [**read_namespaced_network_policy**](docs/NetworkingV1Api.md#read_namespaced_network_policy) | **GET** /apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name} | +*NetworkingV1Api* | [**read_service_cidr**](docs/NetworkingV1Api.md#read_service_cidr) | **GET** /apis/networking.k8s.io/v1/servicecidrs/{name} | +*NetworkingV1Api* | [**read_service_cidr_status**](docs/NetworkingV1Api.md#read_service_cidr_status) | **GET** /apis/networking.k8s.io/v1/servicecidrs/{name}/status | *NetworkingV1Api* | [**replace_ingress_class**](docs/NetworkingV1Api.md#replace_ingress_class) | **PUT** /apis/networking.k8s.io/v1/ingressclasses/{name} | +*NetworkingV1Api* | [**replace_ip_address**](docs/NetworkingV1Api.md#replace_ip_address) | **PUT** /apis/networking.k8s.io/v1/ipaddresses/{name} | *NetworkingV1Api* | [**replace_namespaced_ingress**](docs/NetworkingV1Api.md#replace_namespaced_ingress) | **PUT** /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name} | *NetworkingV1Api* | [**replace_namespaced_ingress_status**](docs/NetworkingV1Api.md#replace_namespaced_ingress_status) | **PUT** /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}/status | *NetworkingV1Api* | [**replace_namespaced_network_policy**](docs/NetworkingV1Api.md#replace_namespaced_network_policy) | **PUT** /apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name} | -*NetworkingV1alpha1Api* | [**create_ip_address**](docs/NetworkingV1alpha1Api.md#create_ip_address) | **POST** /apis/networking.k8s.io/v1alpha1/ipaddresses | -*NetworkingV1alpha1Api* | [**create_service_cidr**](docs/NetworkingV1alpha1Api.md#create_service_cidr) | **POST** /apis/networking.k8s.io/v1alpha1/servicecidrs | -*NetworkingV1alpha1Api* | [**delete_collection_ip_address**](docs/NetworkingV1alpha1Api.md#delete_collection_ip_address) | **DELETE** /apis/networking.k8s.io/v1alpha1/ipaddresses | -*NetworkingV1alpha1Api* | [**delete_collection_service_cidr**](docs/NetworkingV1alpha1Api.md#delete_collection_service_cidr) | **DELETE** /apis/networking.k8s.io/v1alpha1/servicecidrs | -*NetworkingV1alpha1Api* | [**delete_ip_address**](docs/NetworkingV1alpha1Api.md#delete_ip_address) | **DELETE** /apis/networking.k8s.io/v1alpha1/ipaddresses/{name} | -*NetworkingV1alpha1Api* | [**delete_service_cidr**](docs/NetworkingV1alpha1Api.md#delete_service_cidr) | **DELETE** /apis/networking.k8s.io/v1alpha1/servicecidrs/{name} | -*NetworkingV1alpha1Api* | [**get_api_resources**](docs/NetworkingV1alpha1Api.md#get_api_resources) | **GET** /apis/networking.k8s.io/v1alpha1/ | -*NetworkingV1alpha1Api* | [**list_ip_address**](docs/NetworkingV1alpha1Api.md#list_ip_address) | **GET** /apis/networking.k8s.io/v1alpha1/ipaddresses | -*NetworkingV1alpha1Api* | [**list_service_cidr**](docs/NetworkingV1alpha1Api.md#list_service_cidr) | **GET** /apis/networking.k8s.io/v1alpha1/servicecidrs | -*NetworkingV1alpha1Api* | [**patch_ip_address**](docs/NetworkingV1alpha1Api.md#patch_ip_address) | **PATCH** /apis/networking.k8s.io/v1alpha1/ipaddresses/{name} | -*NetworkingV1alpha1Api* | [**patch_service_cidr**](docs/NetworkingV1alpha1Api.md#patch_service_cidr) | **PATCH** /apis/networking.k8s.io/v1alpha1/servicecidrs/{name} | -*NetworkingV1alpha1Api* | [**patch_service_cidr_status**](docs/NetworkingV1alpha1Api.md#patch_service_cidr_status) | **PATCH** /apis/networking.k8s.io/v1alpha1/servicecidrs/{name}/status | -*NetworkingV1alpha1Api* | [**read_ip_address**](docs/NetworkingV1alpha1Api.md#read_ip_address) | **GET** /apis/networking.k8s.io/v1alpha1/ipaddresses/{name} | -*NetworkingV1alpha1Api* | [**read_service_cidr**](docs/NetworkingV1alpha1Api.md#read_service_cidr) | **GET** /apis/networking.k8s.io/v1alpha1/servicecidrs/{name} | -*NetworkingV1alpha1Api* | [**read_service_cidr_status**](docs/NetworkingV1alpha1Api.md#read_service_cidr_status) | **GET** /apis/networking.k8s.io/v1alpha1/servicecidrs/{name}/status | -*NetworkingV1alpha1Api* | [**replace_ip_address**](docs/NetworkingV1alpha1Api.md#replace_ip_address) | **PUT** /apis/networking.k8s.io/v1alpha1/ipaddresses/{name} | -*NetworkingV1alpha1Api* | [**replace_service_cidr**](docs/NetworkingV1alpha1Api.md#replace_service_cidr) | **PUT** /apis/networking.k8s.io/v1alpha1/servicecidrs/{name} | -*NetworkingV1alpha1Api* | [**replace_service_cidr_status**](docs/NetworkingV1alpha1Api.md#replace_service_cidr_status) | **PUT** /apis/networking.k8s.io/v1alpha1/servicecidrs/{name}/status | +*NetworkingV1Api* | [**replace_service_cidr**](docs/NetworkingV1Api.md#replace_service_cidr) | **PUT** /apis/networking.k8s.io/v1/servicecidrs/{name} | +*NetworkingV1Api* | [**replace_service_cidr_status**](docs/NetworkingV1Api.md#replace_service_cidr_status) | **PUT** /apis/networking.k8s.io/v1/servicecidrs/{name}/status | +*NetworkingV1beta1Api* | [**create_ip_address**](docs/NetworkingV1beta1Api.md#create_ip_address) | **POST** /apis/networking.k8s.io/v1beta1/ipaddresses | +*NetworkingV1beta1Api* | [**create_service_cidr**](docs/NetworkingV1beta1Api.md#create_service_cidr) | **POST** /apis/networking.k8s.io/v1beta1/servicecidrs | +*NetworkingV1beta1Api* | [**delete_collection_ip_address**](docs/NetworkingV1beta1Api.md#delete_collection_ip_address) | **DELETE** /apis/networking.k8s.io/v1beta1/ipaddresses | +*NetworkingV1beta1Api* | [**delete_collection_service_cidr**](docs/NetworkingV1beta1Api.md#delete_collection_service_cidr) | **DELETE** /apis/networking.k8s.io/v1beta1/servicecidrs | +*NetworkingV1beta1Api* | [**delete_ip_address**](docs/NetworkingV1beta1Api.md#delete_ip_address) | **DELETE** /apis/networking.k8s.io/v1beta1/ipaddresses/{name} | +*NetworkingV1beta1Api* | [**delete_service_cidr**](docs/NetworkingV1beta1Api.md#delete_service_cidr) | **DELETE** /apis/networking.k8s.io/v1beta1/servicecidrs/{name} | +*NetworkingV1beta1Api* | [**get_api_resources**](docs/NetworkingV1beta1Api.md#get_api_resources) | **GET** /apis/networking.k8s.io/v1beta1/ | +*NetworkingV1beta1Api* | [**list_ip_address**](docs/NetworkingV1beta1Api.md#list_ip_address) | **GET** /apis/networking.k8s.io/v1beta1/ipaddresses | +*NetworkingV1beta1Api* | [**list_service_cidr**](docs/NetworkingV1beta1Api.md#list_service_cidr) | **GET** /apis/networking.k8s.io/v1beta1/servicecidrs | +*NetworkingV1beta1Api* | [**patch_ip_address**](docs/NetworkingV1beta1Api.md#patch_ip_address) | **PATCH** /apis/networking.k8s.io/v1beta1/ipaddresses/{name} | +*NetworkingV1beta1Api* | [**patch_service_cidr**](docs/NetworkingV1beta1Api.md#patch_service_cidr) | **PATCH** /apis/networking.k8s.io/v1beta1/servicecidrs/{name} | +*NetworkingV1beta1Api* | [**patch_service_cidr_status**](docs/NetworkingV1beta1Api.md#patch_service_cidr_status) | **PATCH** /apis/networking.k8s.io/v1beta1/servicecidrs/{name}/status | +*NetworkingV1beta1Api* | [**read_ip_address**](docs/NetworkingV1beta1Api.md#read_ip_address) | **GET** /apis/networking.k8s.io/v1beta1/ipaddresses/{name} | +*NetworkingV1beta1Api* | [**read_service_cidr**](docs/NetworkingV1beta1Api.md#read_service_cidr) | **GET** /apis/networking.k8s.io/v1beta1/servicecidrs/{name} | +*NetworkingV1beta1Api* | [**read_service_cidr_status**](docs/NetworkingV1beta1Api.md#read_service_cidr_status) | **GET** /apis/networking.k8s.io/v1beta1/servicecidrs/{name}/status | +*NetworkingV1beta1Api* | [**replace_ip_address**](docs/NetworkingV1beta1Api.md#replace_ip_address) | **PUT** /apis/networking.k8s.io/v1beta1/ipaddresses/{name} | +*NetworkingV1beta1Api* | [**replace_service_cidr**](docs/NetworkingV1beta1Api.md#replace_service_cidr) | **PUT** /apis/networking.k8s.io/v1beta1/servicecidrs/{name} | +*NetworkingV1beta1Api* | [**replace_service_cidr_status**](docs/NetworkingV1beta1Api.md#replace_service_cidr_status) | **PUT** /apis/networking.k8s.io/v1beta1/servicecidrs/{name}/status | *NodeApi* | [**get_api_group**](docs/NodeApi.md#get_api_group) | **GET** /apis/node.k8s.io/ | *NodeV1Api* | [**create_runtime_class**](docs/NodeV1Api.md#create_runtime_class) | **POST** /apis/node.k8s.io/v1/runtimeclasses | *NodeV1Api* | [**delete_collection_runtime_class**](docs/NodeV1Api.md#delete_collection_runtime_class) | **DELETE** /apis/node.k8s.io/v1/runtimeclasses | @@ -745,67 +780,119 @@ Class | Method | HTTP request | Description *RbacAuthorizationV1Api* | [**replace_namespaced_role**](docs/RbacAuthorizationV1Api.md#replace_namespaced_role) | **PUT** /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name} | *RbacAuthorizationV1Api* | [**replace_namespaced_role_binding**](docs/RbacAuthorizationV1Api.md#replace_namespaced_role_binding) | **PUT** /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name} | *ResourceApi* | [**get_api_group**](docs/ResourceApi.md#get_api_group) | **GET** /apis/resource.k8s.io/ | -*ResourceV1alpha2Api* | [**create_namespaced_pod_scheduling_context**](docs/ResourceV1alpha2Api.md#create_namespaced_pod_scheduling_context) | **POST** /apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/podschedulingcontexts | -*ResourceV1alpha2Api* | [**create_namespaced_resource_claim**](docs/ResourceV1alpha2Api.md#create_namespaced_resource_claim) | **POST** /apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaims | -*ResourceV1alpha2Api* | [**create_namespaced_resource_claim_parameters**](docs/ResourceV1alpha2Api.md#create_namespaced_resource_claim_parameters) | **POST** /apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaimparameters | -*ResourceV1alpha2Api* | [**create_namespaced_resource_claim_template**](docs/ResourceV1alpha2Api.md#create_namespaced_resource_claim_template) | **POST** /apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaimtemplates | -*ResourceV1alpha2Api* | [**create_namespaced_resource_class_parameters**](docs/ResourceV1alpha2Api.md#create_namespaced_resource_class_parameters) | **POST** /apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclassparameters | -*ResourceV1alpha2Api* | [**create_resource_class**](docs/ResourceV1alpha2Api.md#create_resource_class) | **POST** /apis/resource.k8s.io/v1alpha2/resourceclasses | -*ResourceV1alpha2Api* | [**create_resource_slice**](docs/ResourceV1alpha2Api.md#create_resource_slice) | **POST** /apis/resource.k8s.io/v1alpha2/resourceslices | -*ResourceV1alpha2Api* | [**delete_collection_namespaced_pod_scheduling_context**](docs/ResourceV1alpha2Api.md#delete_collection_namespaced_pod_scheduling_context) | **DELETE** /apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/podschedulingcontexts | -*ResourceV1alpha2Api* | [**delete_collection_namespaced_resource_claim**](docs/ResourceV1alpha2Api.md#delete_collection_namespaced_resource_claim) | **DELETE** /apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaims | -*ResourceV1alpha2Api* | [**delete_collection_namespaced_resource_claim_parameters**](docs/ResourceV1alpha2Api.md#delete_collection_namespaced_resource_claim_parameters) | **DELETE** /apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaimparameters | -*ResourceV1alpha2Api* | [**delete_collection_namespaced_resource_claim_template**](docs/ResourceV1alpha2Api.md#delete_collection_namespaced_resource_claim_template) | **DELETE** /apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaimtemplates | -*ResourceV1alpha2Api* | [**delete_collection_namespaced_resource_class_parameters**](docs/ResourceV1alpha2Api.md#delete_collection_namespaced_resource_class_parameters) | **DELETE** /apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclassparameters | -*ResourceV1alpha2Api* | [**delete_collection_resource_class**](docs/ResourceV1alpha2Api.md#delete_collection_resource_class) | **DELETE** /apis/resource.k8s.io/v1alpha2/resourceclasses | -*ResourceV1alpha2Api* | [**delete_collection_resource_slice**](docs/ResourceV1alpha2Api.md#delete_collection_resource_slice) | **DELETE** /apis/resource.k8s.io/v1alpha2/resourceslices | -*ResourceV1alpha2Api* | [**delete_namespaced_pod_scheduling_context**](docs/ResourceV1alpha2Api.md#delete_namespaced_pod_scheduling_context) | **DELETE** /apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/podschedulingcontexts/{name} | -*ResourceV1alpha2Api* | [**delete_namespaced_resource_claim**](docs/ResourceV1alpha2Api.md#delete_namespaced_resource_claim) | **DELETE** /apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaims/{name} | -*ResourceV1alpha2Api* | [**delete_namespaced_resource_claim_parameters**](docs/ResourceV1alpha2Api.md#delete_namespaced_resource_claim_parameters) | **DELETE** /apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaimparameters/{name} | -*ResourceV1alpha2Api* | [**delete_namespaced_resource_claim_template**](docs/ResourceV1alpha2Api.md#delete_namespaced_resource_claim_template) | **DELETE** /apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaimtemplates/{name} | -*ResourceV1alpha2Api* | [**delete_namespaced_resource_class_parameters**](docs/ResourceV1alpha2Api.md#delete_namespaced_resource_class_parameters) | **DELETE** /apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclassparameters/{name} | -*ResourceV1alpha2Api* | [**delete_resource_class**](docs/ResourceV1alpha2Api.md#delete_resource_class) | **DELETE** /apis/resource.k8s.io/v1alpha2/resourceclasses/{name} | -*ResourceV1alpha2Api* | [**delete_resource_slice**](docs/ResourceV1alpha2Api.md#delete_resource_slice) | **DELETE** /apis/resource.k8s.io/v1alpha2/resourceslices/{name} | -*ResourceV1alpha2Api* | [**get_api_resources**](docs/ResourceV1alpha2Api.md#get_api_resources) | **GET** /apis/resource.k8s.io/v1alpha2/ | -*ResourceV1alpha2Api* | [**list_namespaced_pod_scheduling_context**](docs/ResourceV1alpha2Api.md#list_namespaced_pod_scheduling_context) | **GET** /apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/podschedulingcontexts | -*ResourceV1alpha2Api* | [**list_namespaced_resource_claim**](docs/ResourceV1alpha2Api.md#list_namespaced_resource_claim) | **GET** /apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaims | -*ResourceV1alpha2Api* | [**list_namespaced_resource_claim_parameters**](docs/ResourceV1alpha2Api.md#list_namespaced_resource_claim_parameters) | **GET** /apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaimparameters | -*ResourceV1alpha2Api* | [**list_namespaced_resource_claim_template**](docs/ResourceV1alpha2Api.md#list_namespaced_resource_claim_template) | **GET** /apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaimtemplates | -*ResourceV1alpha2Api* | [**list_namespaced_resource_class_parameters**](docs/ResourceV1alpha2Api.md#list_namespaced_resource_class_parameters) | **GET** /apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclassparameters | -*ResourceV1alpha2Api* | [**list_pod_scheduling_context_for_all_namespaces**](docs/ResourceV1alpha2Api.md#list_pod_scheduling_context_for_all_namespaces) | **GET** /apis/resource.k8s.io/v1alpha2/podschedulingcontexts | -*ResourceV1alpha2Api* | [**list_resource_claim_for_all_namespaces**](docs/ResourceV1alpha2Api.md#list_resource_claim_for_all_namespaces) | **GET** /apis/resource.k8s.io/v1alpha2/resourceclaims | -*ResourceV1alpha2Api* | [**list_resource_claim_parameters_for_all_namespaces**](docs/ResourceV1alpha2Api.md#list_resource_claim_parameters_for_all_namespaces) | **GET** /apis/resource.k8s.io/v1alpha2/resourceclaimparameters | -*ResourceV1alpha2Api* | [**list_resource_claim_template_for_all_namespaces**](docs/ResourceV1alpha2Api.md#list_resource_claim_template_for_all_namespaces) | **GET** /apis/resource.k8s.io/v1alpha2/resourceclaimtemplates | -*ResourceV1alpha2Api* | [**list_resource_class**](docs/ResourceV1alpha2Api.md#list_resource_class) | **GET** /apis/resource.k8s.io/v1alpha2/resourceclasses | -*ResourceV1alpha2Api* | [**list_resource_class_parameters_for_all_namespaces**](docs/ResourceV1alpha2Api.md#list_resource_class_parameters_for_all_namespaces) | **GET** /apis/resource.k8s.io/v1alpha2/resourceclassparameters | -*ResourceV1alpha2Api* | [**list_resource_slice**](docs/ResourceV1alpha2Api.md#list_resource_slice) | **GET** /apis/resource.k8s.io/v1alpha2/resourceslices | -*ResourceV1alpha2Api* | [**patch_namespaced_pod_scheduling_context**](docs/ResourceV1alpha2Api.md#patch_namespaced_pod_scheduling_context) | **PATCH** /apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/podschedulingcontexts/{name} | -*ResourceV1alpha2Api* | [**patch_namespaced_pod_scheduling_context_status**](docs/ResourceV1alpha2Api.md#patch_namespaced_pod_scheduling_context_status) | **PATCH** /apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/podschedulingcontexts/{name}/status | -*ResourceV1alpha2Api* | [**patch_namespaced_resource_claim**](docs/ResourceV1alpha2Api.md#patch_namespaced_resource_claim) | **PATCH** /apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaims/{name} | -*ResourceV1alpha2Api* | [**patch_namespaced_resource_claim_parameters**](docs/ResourceV1alpha2Api.md#patch_namespaced_resource_claim_parameters) | **PATCH** /apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaimparameters/{name} | -*ResourceV1alpha2Api* | [**patch_namespaced_resource_claim_status**](docs/ResourceV1alpha2Api.md#patch_namespaced_resource_claim_status) | **PATCH** /apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaims/{name}/status | -*ResourceV1alpha2Api* | [**patch_namespaced_resource_claim_template**](docs/ResourceV1alpha2Api.md#patch_namespaced_resource_claim_template) | **PATCH** /apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaimtemplates/{name} | -*ResourceV1alpha2Api* | [**patch_namespaced_resource_class_parameters**](docs/ResourceV1alpha2Api.md#patch_namespaced_resource_class_parameters) | **PATCH** /apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclassparameters/{name} | -*ResourceV1alpha2Api* | [**patch_resource_class**](docs/ResourceV1alpha2Api.md#patch_resource_class) | **PATCH** /apis/resource.k8s.io/v1alpha2/resourceclasses/{name} | -*ResourceV1alpha2Api* | [**patch_resource_slice**](docs/ResourceV1alpha2Api.md#patch_resource_slice) | **PATCH** /apis/resource.k8s.io/v1alpha2/resourceslices/{name} | -*ResourceV1alpha2Api* | [**read_namespaced_pod_scheduling_context**](docs/ResourceV1alpha2Api.md#read_namespaced_pod_scheduling_context) | **GET** /apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/podschedulingcontexts/{name} | -*ResourceV1alpha2Api* | [**read_namespaced_pod_scheduling_context_status**](docs/ResourceV1alpha2Api.md#read_namespaced_pod_scheduling_context_status) | **GET** /apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/podschedulingcontexts/{name}/status | -*ResourceV1alpha2Api* | [**read_namespaced_resource_claim**](docs/ResourceV1alpha2Api.md#read_namespaced_resource_claim) | **GET** /apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaims/{name} | -*ResourceV1alpha2Api* | [**read_namespaced_resource_claim_parameters**](docs/ResourceV1alpha2Api.md#read_namespaced_resource_claim_parameters) | **GET** /apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaimparameters/{name} | -*ResourceV1alpha2Api* | [**read_namespaced_resource_claim_status**](docs/ResourceV1alpha2Api.md#read_namespaced_resource_claim_status) | **GET** /apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaims/{name}/status | -*ResourceV1alpha2Api* | [**read_namespaced_resource_claim_template**](docs/ResourceV1alpha2Api.md#read_namespaced_resource_claim_template) | **GET** /apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaimtemplates/{name} | -*ResourceV1alpha2Api* | [**read_namespaced_resource_class_parameters**](docs/ResourceV1alpha2Api.md#read_namespaced_resource_class_parameters) | **GET** /apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclassparameters/{name} | -*ResourceV1alpha2Api* | [**read_resource_class**](docs/ResourceV1alpha2Api.md#read_resource_class) | **GET** /apis/resource.k8s.io/v1alpha2/resourceclasses/{name} | -*ResourceV1alpha2Api* | [**read_resource_slice**](docs/ResourceV1alpha2Api.md#read_resource_slice) | **GET** /apis/resource.k8s.io/v1alpha2/resourceslices/{name} | -*ResourceV1alpha2Api* | [**replace_namespaced_pod_scheduling_context**](docs/ResourceV1alpha2Api.md#replace_namespaced_pod_scheduling_context) | **PUT** /apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/podschedulingcontexts/{name} | -*ResourceV1alpha2Api* | [**replace_namespaced_pod_scheduling_context_status**](docs/ResourceV1alpha2Api.md#replace_namespaced_pod_scheduling_context_status) | **PUT** /apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/podschedulingcontexts/{name}/status | -*ResourceV1alpha2Api* | [**replace_namespaced_resource_claim**](docs/ResourceV1alpha2Api.md#replace_namespaced_resource_claim) | **PUT** /apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaims/{name} | -*ResourceV1alpha2Api* | [**replace_namespaced_resource_claim_parameters**](docs/ResourceV1alpha2Api.md#replace_namespaced_resource_claim_parameters) | **PUT** /apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaimparameters/{name} | -*ResourceV1alpha2Api* | [**replace_namespaced_resource_claim_status**](docs/ResourceV1alpha2Api.md#replace_namespaced_resource_claim_status) | **PUT** /apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaims/{name}/status | -*ResourceV1alpha2Api* | [**replace_namespaced_resource_claim_template**](docs/ResourceV1alpha2Api.md#replace_namespaced_resource_claim_template) | **PUT** /apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaimtemplates/{name} | -*ResourceV1alpha2Api* | [**replace_namespaced_resource_class_parameters**](docs/ResourceV1alpha2Api.md#replace_namespaced_resource_class_parameters) | **PUT** /apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclassparameters/{name} | -*ResourceV1alpha2Api* | [**replace_resource_class**](docs/ResourceV1alpha2Api.md#replace_resource_class) | **PUT** /apis/resource.k8s.io/v1alpha2/resourceclasses/{name} | -*ResourceV1alpha2Api* | [**replace_resource_slice**](docs/ResourceV1alpha2Api.md#replace_resource_slice) | **PUT** /apis/resource.k8s.io/v1alpha2/resourceslices/{name} | +*ResourceV1Api* | [**create_device_class**](docs/ResourceV1Api.md#create_device_class) | **POST** /apis/resource.k8s.io/v1/deviceclasses | +*ResourceV1Api* | [**create_namespaced_resource_claim**](docs/ResourceV1Api.md#create_namespaced_resource_claim) | **POST** /apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaims | +*ResourceV1Api* | [**create_namespaced_resource_claim_template**](docs/ResourceV1Api.md#create_namespaced_resource_claim_template) | **POST** /apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaimtemplates | +*ResourceV1Api* | [**create_resource_slice**](docs/ResourceV1Api.md#create_resource_slice) | **POST** /apis/resource.k8s.io/v1/resourceslices | +*ResourceV1Api* | [**delete_collection_device_class**](docs/ResourceV1Api.md#delete_collection_device_class) | **DELETE** /apis/resource.k8s.io/v1/deviceclasses | +*ResourceV1Api* | [**delete_collection_namespaced_resource_claim**](docs/ResourceV1Api.md#delete_collection_namespaced_resource_claim) | **DELETE** /apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaims | +*ResourceV1Api* | [**delete_collection_namespaced_resource_claim_template**](docs/ResourceV1Api.md#delete_collection_namespaced_resource_claim_template) | **DELETE** /apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaimtemplates | +*ResourceV1Api* | [**delete_collection_resource_slice**](docs/ResourceV1Api.md#delete_collection_resource_slice) | **DELETE** /apis/resource.k8s.io/v1/resourceslices | +*ResourceV1Api* | [**delete_device_class**](docs/ResourceV1Api.md#delete_device_class) | **DELETE** /apis/resource.k8s.io/v1/deviceclasses/{name} | +*ResourceV1Api* | [**delete_namespaced_resource_claim**](docs/ResourceV1Api.md#delete_namespaced_resource_claim) | **DELETE** /apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaims/{name} | +*ResourceV1Api* | [**delete_namespaced_resource_claim_template**](docs/ResourceV1Api.md#delete_namespaced_resource_claim_template) | **DELETE** /apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaimtemplates/{name} | +*ResourceV1Api* | [**delete_resource_slice**](docs/ResourceV1Api.md#delete_resource_slice) | **DELETE** /apis/resource.k8s.io/v1/resourceslices/{name} | +*ResourceV1Api* | [**get_api_resources**](docs/ResourceV1Api.md#get_api_resources) | **GET** /apis/resource.k8s.io/v1/ | +*ResourceV1Api* | [**list_device_class**](docs/ResourceV1Api.md#list_device_class) | **GET** /apis/resource.k8s.io/v1/deviceclasses | +*ResourceV1Api* | [**list_namespaced_resource_claim**](docs/ResourceV1Api.md#list_namespaced_resource_claim) | **GET** /apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaims | +*ResourceV1Api* | [**list_namespaced_resource_claim_template**](docs/ResourceV1Api.md#list_namespaced_resource_claim_template) | **GET** /apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaimtemplates | +*ResourceV1Api* | [**list_resource_claim_for_all_namespaces**](docs/ResourceV1Api.md#list_resource_claim_for_all_namespaces) | **GET** /apis/resource.k8s.io/v1/resourceclaims | +*ResourceV1Api* | [**list_resource_claim_template_for_all_namespaces**](docs/ResourceV1Api.md#list_resource_claim_template_for_all_namespaces) | **GET** /apis/resource.k8s.io/v1/resourceclaimtemplates | +*ResourceV1Api* | [**list_resource_slice**](docs/ResourceV1Api.md#list_resource_slice) | **GET** /apis/resource.k8s.io/v1/resourceslices | +*ResourceV1Api* | [**patch_device_class**](docs/ResourceV1Api.md#patch_device_class) | **PATCH** /apis/resource.k8s.io/v1/deviceclasses/{name} | +*ResourceV1Api* | [**patch_namespaced_resource_claim**](docs/ResourceV1Api.md#patch_namespaced_resource_claim) | **PATCH** /apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaims/{name} | +*ResourceV1Api* | [**patch_namespaced_resource_claim_status**](docs/ResourceV1Api.md#patch_namespaced_resource_claim_status) | **PATCH** /apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaims/{name}/status | +*ResourceV1Api* | [**patch_namespaced_resource_claim_template**](docs/ResourceV1Api.md#patch_namespaced_resource_claim_template) | **PATCH** /apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaimtemplates/{name} | +*ResourceV1Api* | [**patch_resource_slice**](docs/ResourceV1Api.md#patch_resource_slice) | **PATCH** /apis/resource.k8s.io/v1/resourceslices/{name} | +*ResourceV1Api* | [**read_device_class**](docs/ResourceV1Api.md#read_device_class) | **GET** /apis/resource.k8s.io/v1/deviceclasses/{name} | +*ResourceV1Api* | [**read_namespaced_resource_claim**](docs/ResourceV1Api.md#read_namespaced_resource_claim) | **GET** /apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaims/{name} | +*ResourceV1Api* | [**read_namespaced_resource_claim_status**](docs/ResourceV1Api.md#read_namespaced_resource_claim_status) | **GET** /apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaims/{name}/status | +*ResourceV1Api* | [**read_namespaced_resource_claim_template**](docs/ResourceV1Api.md#read_namespaced_resource_claim_template) | **GET** /apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaimtemplates/{name} | +*ResourceV1Api* | [**read_resource_slice**](docs/ResourceV1Api.md#read_resource_slice) | **GET** /apis/resource.k8s.io/v1/resourceslices/{name} | +*ResourceV1Api* | [**replace_device_class**](docs/ResourceV1Api.md#replace_device_class) | **PUT** /apis/resource.k8s.io/v1/deviceclasses/{name} | +*ResourceV1Api* | [**replace_namespaced_resource_claim**](docs/ResourceV1Api.md#replace_namespaced_resource_claim) | **PUT** /apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaims/{name} | +*ResourceV1Api* | [**replace_namespaced_resource_claim_status**](docs/ResourceV1Api.md#replace_namespaced_resource_claim_status) | **PUT** /apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaims/{name}/status | +*ResourceV1Api* | [**replace_namespaced_resource_claim_template**](docs/ResourceV1Api.md#replace_namespaced_resource_claim_template) | **PUT** /apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaimtemplates/{name} | +*ResourceV1Api* | [**replace_resource_slice**](docs/ResourceV1Api.md#replace_resource_slice) | **PUT** /apis/resource.k8s.io/v1/resourceslices/{name} | +*ResourceV1alpha3Api* | [**create_device_taint_rule**](docs/ResourceV1alpha3Api.md#create_device_taint_rule) | **POST** /apis/resource.k8s.io/v1alpha3/devicetaintrules | +*ResourceV1alpha3Api* | [**delete_collection_device_taint_rule**](docs/ResourceV1alpha3Api.md#delete_collection_device_taint_rule) | **DELETE** /apis/resource.k8s.io/v1alpha3/devicetaintrules | +*ResourceV1alpha3Api* | [**delete_device_taint_rule**](docs/ResourceV1alpha3Api.md#delete_device_taint_rule) | **DELETE** /apis/resource.k8s.io/v1alpha3/devicetaintrules/{name} | +*ResourceV1alpha3Api* | [**get_api_resources**](docs/ResourceV1alpha3Api.md#get_api_resources) | **GET** /apis/resource.k8s.io/v1alpha3/ | +*ResourceV1alpha3Api* | [**list_device_taint_rule**](docs/ResourceV1alpha3Api.md#list_device_taint_rule) | **GET** /apis/resource.k8s.io/v1alpha3/devicetaintrules | +*ResourceV1alpha3Api* | [**patch_device_taint_rule**](docs/ResourceV1alpha3Api.md#patch_device_taint_rule) | **PATCH** /apis/resource.k8s.io/v1alpha3/devicetaintrules/{name} | +*ResourceV1alpha3Api* | [**patch_device_taint_rule_status**](docs/ResourceV1alpha3Api.md#patch_device_taint_rule_status) | **PATCH** /apis/resource.k8s.io/v1alpha3/devicetaintrules/{name}/status | +*ResourceV1alpha3Api* | [**read_device_taint_rule**](docs/ResourceV1alpha3Api.md#read_device_taint_rule) | **GET** /apis/resource.k8s.io/v1alpha3/devicetaintrules/{name} | +*ResourceV1alpha3Api* | [**read_device_taint_rule_status**](docs/ResourceV1alpha3Api.md#read_device_taint_rule_status) | **GET** /apis/resource.k8s.io/v1alpha3/devicetaintrules/{name}/status | +*ResourceV1alpha3Api* | [**replace_device_taint_rule**](docs/ResourceV1alpha3Api.md#replace_device_taint_rule) | **PUT** /apis/resource.k8s.io/v1alpha3/devicetaintrules/{name} | +*ResourceV1alpha3Api* | [**replace_device_taint_rule_status**](docs/ResourceV1alpha3Api.md#replace_device_taint_rule_status) | **PUT** /apis/resource.k8s.io/v1alpha3/devicetaintrules/{name}/status | +*ResourceV1beta1Api* | [**create_device_class**](docs/ResourceV1beta1Api.md#create_device_class) | **POST** /apis/resource.k8s.io/v1beta1/deviceclasses | +*ResourceV1beta1Api* | [**create_namespaced_resource_claim**](docs/ResourceV1beta1Api.md#create_namespaced_resource_claim) | **POST** /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaims | +*ResourceV1beta1Api* | [**create_namespaced_resource_claim_template**](docs/ResourceV1beta1Api.md#create_namespaced_resource_claim_template) | **POST** /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaimtemplates | +*ResourceV1beta1Api* | [**create_resource_slice**](docs/ResourceV1beta1Api.md#create_resource_slice) | **POST** /apis/resource.k8s.io/v1beta1/resourceslices | +*ResourceV1beta1Api* | [**delete_collection_device_class**](docs/ResourceV1beta1Api.md#delete_collection_device_class) | **DELETE** /apis/resource.k8s.io/v1beta1/deviceclasses | +*ResourceV1beta1Api* | [**delete_collection_namespaced_resource_claim**](docs/ResourceV1beta1Api.md#delete_collection_namespaced_resource_claim) | **DELETE** /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaims | +*ResourceV1beta1Api* | [**delete_collection_namespaced_resource_claim_template**](docs/ResourceV1beta1Api.md#delete_collection_namespaced_resource_claim_template) | **DELETE** /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaimtemplates | +*ResourceV1beta1Api* | [**delete_collection_resource_slice**](docs/ResourceV1beta1Api.md#delete_collection_resource_slice) | **DELETE** /apis/resource.k8s.io/v1beta1/resourceslices | +*ResourceV1beta1Api* | [**delete_device_class**](docs/ResourceV1beta1Api.md#delete_device_class) | **DELETE** /apis/resource.k8s.io/v1beta1/deviceclasses/{name} | +*ResourceV1beta1Api* | [**delete_namespaced_resource_claim**](docs/ResourceV1beta1Api.md#delete_namespaced_resource_claim) | **DELETE** /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaims/{name} | +*ResourceV1beta1Api* | [**delete_namespaced_resource_claim_template**](docs/ResourceV1beta1Api.md#delete_namespaced_resource_claim_template) | **DELETE** /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaimtemplates/{name} | +*ResourceV1beta1Api* | [**delete_resource_slice**](docs/ResourceV1beta1Api.md#delete_resource_slice) | **DELETE** /apis/resource.k8s.io/v1beta1/resourceslices/{name} | +*ResourceV1beta1Api* | [**get_api_resources**](docs/ResourceV1beta1Api.md#get_api_resources) | **GET** /apis/resource.k8s.io/v1beta1/ | +*ResourceV1beta1Api* | [**list_device_class**](docs/ResourceV1beta1Api.md#list_device_class) | **GET** /apis/resource.k8s.io/v1beta1/deviceclasses | +*ResourceV1beta1Api* | [**list_namespaced_resource_claim**](docs/ResourceV1beta1Api.md#list_namespaced_resource_claim) | **GET** /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaims | +*ResourceV1beta1Api* | [**list_namespaced_resource_claim_template**](docs/ResourceV1beta1Api.md#list_namespaced_resource_claim_template) | **GET** /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaimtemplates | +*ResourceV1beta1Api* | [**list_resource_claim_for_all_namespaces**](docs/ResourceV1beta1Api.md#list_resource_claim_for_all_namespaces) | **GET** /apis/resource.k8s.io/v1beta1/resourceclaims | +*ResourceV1beta1Api* | [**list_resource_claim_template_for_all_namespaces**](docs/ResourceV1beta1Api.md#list_resource_claim_template_for_all_namespaces) | **GET** /apis/resource.k8s.io/v1beta1/resourceclaimtemplates | +*ResourceV1beta1Api* | [**list_resource_slice**](docs/ResourceV1beta1Api.md#list_resource_slice) | **GET** /apis/resource.k8s.io/v1beta1/resourceslices | +*ResourceV1beta1Api* | [**patch_device_class**](docs/ResourceV1beta1Api.md#patch_device_class) | **PATCH** /apis/resource.k8s.io/v1beta1/deviceclasses/{name} | +*ResourceV1beta1Api* | [**patch_namespaced_resource_claim**](docs/ResourceV1beta1Api.md#patch_namespaced_resource_claim) | **PATCH** /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaims/{name} | +*ResourceV1beta1Api* | [**patch_namespaced_resource_claim_status**](docs/ResourceV1beta1Api.md#patch_namespaced_resource_claim_status) | **PATCH** /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaims/{name}/status | +*ResourceV1beta1Api* | [**patch_namespaced_resource_claim_template**](docs/ResourceV1beta1Api.md#patch_namespaced_resource_claim_template) | **PATCH** /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaimtemplates/{name} | +*ResourceV1beta1Api* | [**patch_resource_slice**](docs/ResourceV1beta1Api.md#patch_resource_slice) | **PATCH** /apis/resource.k8s.io/v1beta1/resourceslices/{name} | +*ResourceV1beta1Api* | [**read_device_class**](docs/ResourceV1beta1Api.md#read_device_class) | **GET** /apis/resource.k8s.io/v1beta1/deviceclasses/{name} | +*ResourceV1beta1Api* | [**read_namespaced_resource_claim**](docs/ResourceV1beta1Api.md#read_namespaced_resource_claim) | **GET** /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaims/{name} | +*ResourceV1beta1Api* | [**read_namespaced_resource_claim_status**](docs/ResourceV1beta1Api.md#read_namespaced_resource_claim_status) | **GET** /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaims/{name}/status | +*ResourceV1beta1Api* | [**read_namespaced_resource_claim_template**](docs/ResourceV1beta1Api.md#read_namespaced_resource_claim_template) | **GET** /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaimtemplates/{name} | +*ResourceV1beta1Api* | [**read_resource_slice**](docs/ResourceV1beta1Api.md#read_resource_slice) | **GET** /apis/resource.k8s.io/v1beta1/resourceslices/{name} | +*ResourceV1beta1Api* | [**replace_device_class**](docs/ResourceV1beta1Api.md#replace_device_class) | **PUT** /apis/resource.k8s.io/v1beta1/deviceclasses/{name} | +*ResourceV1beta1Api* | [**replace_namespaced_resource_claim**](docs/ResourceV1beta1Api.md#replace_namespaced_resource_claim) | **PUT** /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaims/{name} | +*ResourceV1beta1Api* | [**replace_namespaced_resource_claim_status**](docs/ResourceV1beta1Api.md#replace_namespaced_resource_claim_status) | **PUT** /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaims/{name}/status | +*ResourceV1beta1Api* | [**replace_namespaced_resource_claim_template**](docs/ResourceV1beta1Api.md#replace_namespaced_resource_claim_template) | **PUT** /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaimtemplates/{name} | +*ResourceV1beta1Api* | [**replace_resource_slice**](docs/ResourceV1beta1Api.md#replace_resource_slice) | **PUT** /apis/resource.k8s.io/v1beta1/resourceslices/{name} | +*ResourceV1beta2Api* | [**create_device_class**](docs/ResourceV1beta2Api.md#create_device_class) | **POST** /apis/resource.k8s.io/v1beta2/deviceclasses | +*ResourceV1beta2Api* | [**create_namespaced_resource_claim**](docs/ResourceV1beta2Api.md#create_namespaced_resource_claim) | **POST** /apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaims | +*ResourceV1beta2Api* | [**create_namespaced_resource_claim_template**](docs/ResourceV1beta2Api.md#create_namespaced_resource_claim_template) | **POST** /apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaimtemplates | +*ResourceV1beta2Api* | [**create_resource_slice**](docs/ResourceV1beta2Api.md#create_resource_slice) | **POST** /apis/resource.k8s.io/v1beta2/resourceslices | +*ResourceV1beta2Api* | [**delete_collection_device_class**](docs/ResourceV1beta2Api.md#delete_collection_device_class) | **DELETE** /apis/resource.k8s.io/v1beta2/deviceclasses | +*ResourceV1beta2Api* | [**delete_collection_namespaced_resource_claim**](docs/ResourceV1beta2Api.md#delete_collection_namespaced_resource_claim) | **DELETE** /apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaims | +*ResourceV1beta2Api* | [**delete_collection_namespaced_resource_claim_template**](docs/ResourceV1beta2Api.md#delete_collection_namespaced_resource_claim_template) | **DELETE** /apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaimtemplates | +*ResourceV1beta2Api* | [**delete_collection_resource_slice**](docs/ResourceV1beta2Api.md#delete_collection_resource_slice) | **DELETE** /apis/resource.k8s.io/v1beta2/resourceslices | +*ResourceV1beta2Api* | [**delete_device_class**](docs/ResourceV1beta2Api.md#delete_device_class) | **DELETE** /apis/resource.k8s.io/v1beta2/deviceclasses/{name} | +*ResourceV1beta2Api* | [**delete_namespaced_resource_claim**](docs/ResourceV1beta2Api.md#delete_namespaced_resource_claim) | **DELETE** /apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaims/{name} | +*ResourceV1beta2Api* | [**delete_namespaced_resource_claim_template**](docs/ResourceV1beta2Api.md#delete_namespaced_resource_claim_template) | **DELETE** /apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaimtemplates/{name} | +*ResourceV1beta2Api* | [**delete_resource_slice**](docs/ResourceV1beta2Api.md#delete_resource_slice) | **DELETE** /apis/resource.k8s.io/v1beta2/resourceslices/{name} | +*ResourceV1beta2Api* | [**get_api_resources**](docs/ResourceV1beta2Api.md#get_api_resources) | **GET** /apis/resource.k8s.io/v1beta2/ | +*ResourceV1beta2Api* | [**list_device_class**](docs/ResourceV1beta2Api.md#list_device_class) | **GET** /apis/resource.k8s.io/v1beta2/deviceclasses | +*ResourceV1beta2Api* | [**list_namespaced_resource_claim**](docs/ResourceV1beta2Api.md#list_namespaced_resource_claim) | **GET** /apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaims | +*ResourceV1beta2Api* | [**list_namespaced_resource_claim_template**](docs/ResourceV1beta2Api.md#list_namespaced_resource_claim_template) | **GET** /apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaimtemplates | +*ResourceV1beta2Api* | [**list_resource_claim_for_all_namespaces**](docs/ResourceV1beta2Api.md#list_resource_claim_for_all_namespaces) | **GET** /apis/resource.k8s.io/v1beta2/resourceclaims | +*ResourceV1beta2Api* | [**list_resource_claim_template_for_all_namespaces**](docs/ResourceV1beta2Api.md#list_resource_claim_template_for_all_namespaces) | **GET** /apis/resource.k8s.io/v1beta2/resourceclaimtemplates | +*ResourceV1beta2Api* | [**list_resource_slice**](docs/ResourceV1beta2Api.md#list_resource_slice) | **GET** /apis/resource.k8s.io/v1beta2/resourceslices | +*ResourceV1beta2Api* | [**patch_device_class**](docs/ResourceV1beta2Api.md#patch_device_class) | **PATCH** /apis/resource.k8s.io/v1beta2/deviceclasses/{name} | +*ResourceV1beta2Api* | [**patch_namespaced_resource_claim**](docs/ResourceV1beta2Api.md#patch_namespaced_resource_claim) | **PATCH** /apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaims/{name} | +*ResourceV1beta2Api* | [**patch_namespaced_resource_claim_status**](docs/ResourceV1beta2Api.md#patch_namespaced_resource_claim_status) | **PATCH** /apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaims/{name}/status | +*ResourceV1beta2Api* | [**patch_namespaced_resource_claim_template**](docs/ResourceV1beta2Api.md#patch_namespaced_resource_claim_template) | **PATCH** /apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaimtemplates/{name} | +*ResourceV1beta2Api* | [**patch_resource_slice**](docs/ResourceV1beta2Api.md#patch_resource_slice) | **PATCH** /apis/resource.k8s.io/v1beta2/resourceslices/{name} | +*ResourceV1beta2Api* | [**read_device_class**](docs/ResourceV1beta2Api.md#read_device_class) | **GET** /apis/resource.k8s.io/v1beta2/deviceclasses/{name} | +*ResourceV1beta2Api* | [**read_namespaced_resource_claim**](docs/ResourceV1beta2Api.md#read_namespaced_resource_claim) | **GET** /apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaims/{name} | +*ResourceV1beta2Api* | [**read_namespaced_resource_claim_status**](docs/ResourceV1beta2Api.md#read_namespaced_resource_claim_status) | **GET** /apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaims/{name}/status | +*ResourceV1beta2Api* | [**read_namespaced_resource_claim_template**](docs/ResourceV1beta2Api.md#read_namespaced_resource_claim_template) | **GET** /apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaimtemplates/{name} | +*ResourceV1beta2Api* | [**read_resource_slice**](docs/ResourceV1beta2Api.md#read_resource_slice) | **GET** /apis/resource.k8s.io/v1beta2/resourceslices/{name} | +*ResourceV1beta2Api* | [**replace_device_class**](docs/ResourceV1beta2Api.md#replace_device_class) | **PUT** /apis/resource.k8s.io/v1beta2/deviceclasses/{name} | +*ResourceV1beta2Api* | [**replace_namespaced_resource_claim**](docs/ResourceV1beta2Api.md#replace_namespaced_resource_claim) | **PUT** /apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaims/{name} | +*ResourceV1beta2Api* | [**replace_namespaced_resource_claim_status**](docs/ResourceV1beta2Api.md#replace_namespaced_resource_claim_status) | **PUT** /apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaims/{name}/status | +*ResourceV1beta2Api* | [**replace_namespaced_resource_claim_template**](docs/ResourceV1beta2Api.md#replace_namespaced_resource_claim_template) | **PUT** /apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaimtemplates/{name} | +*ResourceV1beta2Api* | [**replace_resource_slice**](docs/ResourceV1beta2Api.md#replace_resource_slice) | **PUT** /apis/resource.k8s.io/v1beta2/resourceslices/{name} | *SchedulingApi* | [**get_api_group**](docs/SchedulingApi.md#get_api_group) | **GET** /apis/scheduling.k8s.io/ | *SchedulingV1Api* | [**create_priority_class**](docs/SchedulingV1Api.md#create_priority_class) | **POST** /apis/scheduling.k8s.io/v1/priorityclasses | *SchedulingV1Api* | [**delete_collection_priority_class**](docs/SchedulingV1Api.md#delete_collection_priority_class) | **DELETE** /apis/scheduling.k8s.io/v1/priorityclasses | @@ -815,22 +902,34 @@ Class | Method | HTTP request | Description *SchedulingV1Api* | [**patch_priority_class**](docs/SchedulingV1Api.md#patch_priority_class) | **PATCH** /apis/scheduling.k8s.io/v1/priorityclasses/{name} | *SchedulingV1Api* | [**read_priority_class**](docs/SchedulingV1Api.md#read_priority_class) | **GET** /apis/scheduling.k8s.io/v1/priorityclasses/{name} | *SchedulingV1Api* | [**replace_priority_class**](docs/SchedulingV1Api.md#replace_priority_class) | **PUT** /apis/scheduling.k8s.io/v1/priorityclasses/{name} | +*SchedulingV1alpha1Api* | [**create_namespaced_workload**](docs/SchedulingV1alpha1Api.md#create_namespaced_workload) | **POST** /apis/scheduling.k8s.io/v1alpha1/namespaces/{namespace}/workloads | +*SchedulingV1alpha1Api* | [**delete_collection_namespaced_workload**](docs/SchedulingV1alpha1Api.md#delete_collection_namespaced_workload) | **DELETE** /apis/scheduling.k8s.io/v1alpha1/namespaces/{namespace}/workloads | +*SchedulingV1alpha1Api* | [**delete_namespaced_workload**](docs/SchedulingV1alpha1Api.md#delete_namespaced_workload) | **DELETE** /apis/scheduling.k8s.io/v1alpha1/namespaces/{namespace}/workloads/{name} | +*SchedulingV1alpha1Api* | [**get_api_resources**](docs/SchedulingV1alpha1Api.md#get_api_resources) | **GET** /apis/scheduling.k8s.io/v1alpha1/ | +*SchedulingV1alpha1Api* | [**list_namespaced_workload**](docs/SchedulingV1alpha1Api.md#list_namespaced_workload) | **GET** /apis/scheduling.k8s.io/v1alpha1/namespaces/{namespace}/workloads | +*SchedulingV1alpha1Api* | [**list_workload_for_all_namespaces**](docs/SchedulingV1alpha1Api.md#list_workload_for_all_namespaces) | **GET** /apis/scheduling.k8s.io/v1alpha1/workloads | +*SchedulingV1alpha1Api* | [**patch_namespaced_workload**](docs/SchedulingV1alpha1Api.md#patch_namespaced_workload) | **PATCH** /apis/scheduling.k8s.io/v1alpha1/namespaces/{namespace}/workloads/{name} | +*SchedulingV1alpha1Api* | [**read_namespaced_workload**](docs/SchedulingV1alpha1Api.md#read_namespaced_workload) | **GET** /apis/scheduling.k8s.io/v1alpha1/namespaces/{namespace}/workloads/{name} | +*SchedulingV1alpha1Api* | [**replace_namespaced_workload**](docs/SchedulingV1alpha1Api.md#replace_namespaced_workload) | **PUT** /apis/scheduling.k8s.io/v1alpha1/namespaces/{namespace}/workloads/{name} | *StorageApi* | [**get_api_group**](docs/StorageApi.md#get_api_group) | **GET** /apis/storage.k8s.io/ | *StorageV1Api* | [**create_csi_driver**](docs/StorageV1Api.md#create_csi_driver) | **POST** /apis/storage.k8s.io/v1/csidrivers | *StorageV1Api* | [**create_csi_node**](docs/StorageV1Api.md#create_csi_node) | **POST** /apis/storage.k8s.io/v1/csinodes | *StorageV1Api* | [**create_namespaced_csi_storage_capacity**](docs/StorageV1Api.md#create_namespaced_csi_storage_capacity) | **POST** /apis/storage.k8s.io/v1/namespaces/{namespace}/csistoragecapacities | *StorageV1Api* | [**create_storage_class**](docs/StorageV1Api.md#create_storage_class) | **POST** /apis/storage.k8s.io/v1/storageclasses | *StorageV1Api* | [**create_volume_attachment**](docs/StorageV1Api.md#create_volume_attachment) | **POST** /apis/storage.k8s.io/v1/volumeattachments | +*StorageV1Api* | [**create_volume_attributes_class**](docs/StorageV1Api.md#create_volume_attributes_class) | **POST** /apis/storage.k8s.io/v1/volumeattributesclasses | *StorageV1Api* | [**delete_collection_csi_driver**](docs/StorageV1Api.md#delete_collection_csi_driver) | **DELETE** /apis/storage.k8s.io/v1/csidrivers | *StorageV1Api* | [**delete_collection_csi_node**](docs/StorageV1Api.md#delete_collection_csi_node) | **DELETE** /apis/storage.k8s.io/v1/csinodes | *StorageV1Api* | [**delete_collection_namespaced_csi_storage_capacity**](docs/StorageV1Api.md#delete_collection_namespaced_csi_storage_capacity) | **DELETE** /apis/storage.k8s.io/v1/namespaces/{namespace}/csistoragecapacities | *StorageV1Api* | [**delete_collection_storage_class**](docs/StorageV1Api.md#delete_collection_storage_class) | **DELETE** /apis/storage.k8s.io/v1/storageclasses | *StorageV1Api* | [**delete_collection_volume_attachment**](docs/StorageV1Api.md#delete_collection_volume_attachment) | **DELETE** /apis/storage.k8s.io/v1/volumeattachments | +*StorageV1Api* | [**delete_collection_volume_attributes_class**](docs/StorageV1Api.md#delete_collection_volume_attributes_class) | **DELETE** /apis/storage.k8s.io/v1/volumeattributesclasses | *StorageV1Api* | [**delete_csi_driver**](docs/StorageV1Api.md#delete_csi_driver) | **DELETE** /apis/storage.k8s.io/v1/csidrivers/{name} | *StorageV1Api* | [**delete_csi_node**](docs/StorageV1Api.md#delete_csi_node) | **DELETE** /apis/storage.k8s.io/v1/csinodes/{name} | *StorageV1Api* | [**delete_namespaced_csi_storage_capacity**](docs/StorageV1Api.md#delete_namespaced_csi_storage_capacity) | **DELETE** /apis/storage.k8s.io/v1/namespaces/{namespace}/csistoragecapacities/{name} | *StorageV1Api* | [**delete_storage_class**](docs/StorageV1Api.md#delete_storage_class) | **DELETE** /apis/storage.k8s.io/v1/storageclasses/{name} | *StorageV1Api* | [**delete_volume_attachment**](docs/StorageV1Api.md#delete_volume_attachment) | **DELETE** /apis/storage.k8s.io/v1/volumeattachments/{name} | +*StorageV1Api* | [**delete_volume_attributes_class**](docs/StorageV1Api.md#delete_volume_attributes_class) | **DELETE** /apis/storage.k8s.io/v1/volumeattributesclasses/{name} | *StorageV1Api* | [**get_api_resources**](docs/StorageV1Api.md#get_api_resources) | **GET** /apis/storage.k8s.io/v1/ | *StorageV1Api* | [**list_csi_driver**](docs/StorageV1Api.md#list_csi_driver) | **GET** /apis/storage.k8s.io/v1/csidrivers | *StorageV1Api* | [**list_csi_node**](docs/StorageV1Api.md#list_csi_node) | **GET** /apis/storage.k8s.io/v1/csinodes | @@ -838,44 +937,48 @@ Class | Method | HTTP request | Description *StorageV1Api* | [**list_namespaced_csi_storage_capacity**](docs/StorageV1Api.md#list_namespaced_csi_storage_capacity) | **GET** /apis/storage.k8s.io/v1/namespaces/{namespace}/csistoragecapacities | *StorageV1Api* | [**list_storage_class**](docs/StorageV1Api.md#list_storage_class) | **GET** /apis/storage.k8s.io/v1/storageclasses | *StorageV1Api* | [**list_volume_attachment**](docs/StorageV1Api.md#list_volume_attachment) | **GET** /apis/storage.k8s.io/v1/volumeattachments | +*StorageV1Api* | [**list_volume_attributes_class**](docs/StorageV1Api.md#list_volume_attributes_class) | **GET** /apis/storage.k8s.io/v1/volumeattributesclasses | *StorageV1Api* | [**patch_csi_driver**](docs/StorageV1Api.md#patch_csi_driver) | **PATCH** /apis/storage.k8s.io/v1/csidrivers/{name} | *StorageV1Api* | [**patch_csi_node**](docs/StorageV1Api.md#patch_csi_node) | **PATCH** /apis/storage.k8s.io/v1/csinodes/{name} | *StorageV1Api* | [**patch_namespaced_csi_storage_capacity**](docs/StorageV1Api.md#patch_namespaced_csi_storage_capacity) | **PATCH** /apis/storage.k8s.io/v1/namespaces/{namespace}/csistoragecapacities/{name} | *StorageV1Api* | [**patch_storage_class**](docs/StorageV1Api.md#patch_storage_class) | **PATCH** /apis/storage.k8s.io/v1/storageclasses/{name} | *StorageV1Api* | [**patch_volume_attachment**](docs/StorageV1Api.md#patch_volume_attachment) | **PATCH** /apis/storage.k8s.io/v1/volumeattachments/{name} | *StorageV1Api* | [**patch_volume_attachment_status**](docs/StorageV1Api.md#patch_volume_attachment_status) | **PATCH** /apis/storage.k8s.io/v1/volumeattachments/{name}/status | +*StorageV1Api* | [**patch_volume_attributes_class**](docs/StorageV1Api.md#patch_volume_attributes_class) | **PATCH** /apis/storage.k8s.io/v1/volumeattributesclasses/{name} | *StorageV1Api* | [**read_csi_driver**](docs/StorageV1Api.md#read_csi_driver) | **GET** /apis/storage.k8s.io/v1/csidrivers/{name} | *StorageV1Api* | [**read_csi_node**](docs/StorageV1Api.md#read_csi_node) | **GET** /apis/storage.k8s.io/v1/csinodes/{name} | *StorageV1Api* | [**read_namespaced_csi_storage_capacity**](docs/StorageV1Api.md#read_namespaced_csi_storage_capacity) | **GET** /apis/storage.k8s.io/v1/namespaces/{namespace}/csistoragecapacities/{name} | *StorageV1Api* | [**read_storage_class**](docs/StorageV1Api.md#read_storage_class) | **GET** /apis/storage.k8s.io/v1/storageclasses/{name} | *StorageV1Api* | [**read_volume_attachment**](docs/StorageV1Api.md#read_volume_attachment) | **GET** /apis/storage.k8s.io/v1/volumeattachments/{name} | *StorageV1Api* | [**read_volume_attachment_status**](docs/StorageV1Api.md#read_volume_attachment_status) | **GET** /apis/storage.k8s.io/v1/volumeattachments/{name}/status | +*StorageV1Api* | [**read_volume_attributes_class**](docs/StorageV1Api.md#read_volume_attributes_class) | **GET** /apis/storage.k8s.io/v1/volumeattributesclasses/{name} | *StorageV1Api* | [**replace_csi_driver**](docs/StorageV1Api.md#replace_csi_driver) | **PUT** /apis/storage.k8s.io/v1/csidrivers/{name} | *StorageV1Api* | [**replace_csi_node**](docs/StorageV1Api.md#replace_csi_node) | **PUT** /apis/storage.k8s.io/v1/csinodes/{name} | *StorageV1Api* | [**replace_namespaced_csi_storage_capacity**](docs/StorageV1Api.md#replace_namespaced_csi_storage_capacity) | **PUT** /apis/storage.k8s.io/v1/namespaces/{namespace}/csistoragecapacities/{name} | *StorageV1Api* | [**replace_storage_class**](docs/StorageV1Api.md#replace_storage_class) | **PUT** /apis/storage.k8s.io/v1/storageclasses/{name} | *StorageV1Api* | [**replace_volume_attachment**](docs/StorageV1Api.md#replace_volume_attachment) | **PUT** /apis/storage.k8s.io/v1/volumeattachments/{name} | *StorageV1Api* | [**replace_volume_attachment_status**](docs/StorageV1Api.md#replace_volume_attachment_status) | **PUT** /apis/storage.k8s.io/v1/volumeattachments/{name}/status | -*StorageV1alpha1Api* | [**create_volume_attributes_class**](docs/StorageV1alpha1Api.md#create_volume_attributes_class) | **POST** /apis/storage.k8s.io/v1alpha1/volumeattributesclasses | -*StorageV1alpha1Api* | [**delete_collection_volume_attributes_class**](docs/StorageV1alpha1Api.md#delete_collection_volume_attributes_class) | **DELETE** /apis/storage.k8s.io/v1alpha1/volumeattributesclasses | -*StorageV1alpha1Api* | [**delete_volume_attributes_class**](docs/StorageV1alpha1Api.md#delete_volume_attributes_class) | **DELETE** /apis/storage.k8s.io/v1alpha1/volumeattributesclasses/{name} | -*StorageV1alpha1Api* | [**get_api_resources**](docs/StorageV1alpha1Api.md#get_api_resources) | **GET** /apis/storage.k8s.io/v1alpha1/ | -*StorageV1alpha1Api* | [**list_volume_attributes_class**](docs/StorageV1alpha1Api.md#list_volume_attributes_class) | **GET** /apis/storage.k8s.io/v1alpha1/volumeattributesclasses | -*StorageV1alpha1Api* | [**patch_volume_attributes_class**](docs/StorageV1alpha1Api.md#patch_volume_attributes_class) | **PATCH** /apis/storage.k8s.io/v1alpha1/volumeattributesclasses/{name} | -*StorageV1alpha1Api* | [**read_volume_attributes_class**](docs/StorageV1alpha1Api.md#read_volume_attributes_class) | **GET** /apis/storage.k8s.io/v1alpha1/volumeattributesclasses/{name} | -*StorageV1alpha1Api* | [**replace_volume_attributes_class**](docs/StorageV1alpha1Api.md#replace_volume_attributes_class) | **PUT** /apis/storage.k8s.io/v1alpha1/volumeattributesclasses/{name} | +*StorageV1Api* | [**replace_volume_attributes_class**](docs/StorageV1Api.md#replace_volume_attributes_class) | **PUT** /apis/storage.k8s.io/v1/volumeattributesclasses/{name} | +*StorageV1beta1Api* | [**create_volume_attributes_class**](docs/StorageV1beta1Api.md#create_volume_attributes_class) | **POST** /apis/storage.k8s.io/v1beta1/volumeattributesclasses | +*StorageV1beta1Api* | [**delete_collection_volume_attributes_class**](docs/StorageV1beta1Api.md#delete_collection_volume_attributes_class) | **DELETE** /apis/storage.k8s.io/v1beta1/volumeattributesclasses | +*StorageV1beta1Api* | [**delete_volume_attributes_class**](docs/StorageV1beta1Api.md#delete_volume_attributes_class) | **DELETE** /apis/storage.k8s.io/v1beta1/volumeattributesclasses/{name} | +*StorageV1beta1Api* | [**get_api_resources**](docs/StorageV1beta1Api.md#get_api_resources) | **GET** /apis/storage.k8s.io/v1beta1/ | +*StorageV1beta1Api* | [**list_volume_attributes_class**](docs/StorageV1beta1Api.md#list_volume_attributes_class) | **GET** /apis/storage.k8s.io/v1beta1/volumeattributesclasses | +*StorageV1beta1Api* | [**patch_volume_attributes_class**](docs/StorageV1beta1Api.md#patch_volume_attributes_class) | **PATCH** /apis/storage.k8s.io/v1beta1/volumeattributesclasses/{name} | +*StorageV1beta1Api* | [**read_volume_attributes_class**](docs/StorageV1beta1Api.md#read_volume_attributes_class) | **GET** /apis/storage.k8s.io/v1beta1/volumeattributesclasses/{name} | +*StorageV1beta1Api* | [**replace_volume_attributes_class**](docs/StorageV1beta1Api.md#replace_volume_attributes_class) | **PUT** /apis/storage.k8s.io/v1beta1/volumeattributesclasses/{name} | *StoragemigrationApi* | [**get_api_group**](docs/StoragemigrationApi.md#get_api_group) | **GET** /apis/storagemigration.k8s.io/ | -*StoragemigrationV1alpha1Api* | [**create_storage_version_migration**](docs/StoragemigrationV1alpha1Api.md#create_storage_version_migration) | **POST** /apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations | -*StoragemigrationV1alpha1Api* | [**delete_collection_storage_version_migration**](docs/StoragemigrationV1alpha1Api.md#delete_collection_storage_version_migration) | **DELETE** /apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations | -*StoragemigrationV1alpha1Api* | [**delete_storage_version_migration**](docs/StoragemigrationV1alpha1Api.md#delete_storage_version_migration) | **DELETE** /apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations/{name} | -*StoragemigrationV1alpha1Api* | [**get_api_resources**](docs/StoragemigrationV1alpha1Api.md#get_api_resources) | **GET** /apis/storagemigration.k8s.io/v1alpha1/ | -*StoragemigrationV1alpha1Api* | [**list_storage_version_migration**](docs/StoragemigrationV1alpha1Api.md#list_storage_version_migration) | **GET** /apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations | -*StoragemigrationV1alpha1Api* | [**patch_storage_version_migration**](docs/StoragemigrationV1alpha1Api.md#patch_storage_version_migration) | **PATCH** /apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations/{name} | -*StoragemigrationV1alpha1Api* | [**patch_storage_version_migration_status**](docs/StoragemigrationV1alpha1Api.md#patch_storage_version_migration_status) | **PATCH** /apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations/{name}/status | -*StoragemigrationV1alpha1Api* | [**read_storage_version_migration**](docs/StoragemigrationV1alpha1Api.md#read_storage_version_migration) | **GET** /apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations/{name} | -*StoragemigrationV1alpha1Api* | [**read_storage_version_migration_status**](docs/StoragemigrationV1alpha1Api.md#read_storage_version_migration_status) | **GET** /apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations/{name}/status | -*StoragemigrationV1alpha1Api* | [**replace_storage_version_migration**](docs/StoragemigrationV1alpha1Api.md#replace_storage_version_migration) | **PUT** /apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations/{name} | -*StoragemigrationV1alpha1Api* | [**replace_storage_version_migration_status**](docs/StoragemigrationV1alpha1Api.md#replace_storage_version_migration_status) | **PUT** /apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations/{name}/status | +*StoragemigrationV1beta1Api* | [**create_storage_version_migration**](docs/StoragemigrationV1beta1Api.md#create_storage_version_migration) | **POST** /apis/storagemigration.k8s.io/v1beta1/storageversionmigrations | +*StoragemigrationV1beta1Api* | [**delete_collection_storage_version_migration**](docs/StoragemigrationV1beta1Api.md#delete_collection_storage_version_migration) | **DELETE** /apis/storagemigration.k8s.io/v1beta1/storageversionmigrations | +*StoragemigrationV1beta1Api* | [**delete_storage_version_migration**](docs/StoragemigrationV1beta1Api.md#delete_storage_version_migration) | **DELETE** /apis/storagemigration.k8s.io/v1beta1/storageversionmigrations/{name} | +*StoragemigrationV1beta1Api* | [**get_api_resources**](docs/StoragemigrationV1beta1Api.md#get_api_resources) | **GET** /apis/storagemigration.k8s.io/v1beta1/ | +*StoragemigrationV1beta1Api* | [**list_storage_version_migration**](docs/StoragemigrationV1beta1Api.md#list_storage_version_migration) | **GET** /apis/storagemigration.k8s.io/v1beta1/storageversionmigrations | +*StoragemigrationV1beta1Api* | [**patch_storage_version_migration**](docs/StoragemigrationV1beta1Api.md#patch_storage_version_migration) | **PATCH** /apis/storagemigration.k8s.io/v1beta1/storageversionmigrations/{name} | +*StoragemigrationV1beta1Api* | [**patch_storage_version_migration_status**](docs/StoragemigrationV1beta1Api.md#patch_storage_version_migration_status) | **PATCH** /apis/storagemigration.k8s.io/v1beta1/storageversionmigrations/{name}/status | +*StoragemigrationV1beta1Api* | [**read_storage_version_migration**](docs/StoragemigrationV1beta1Api.md#read_storage_version_migration) | **GET** /apis/storagemigration.k8s.io/v1beta1/storageversionmigrations/{name} | +*StoragemigrationV1beta1Api* | [**read_storage_version_migration_status**](docs/StoragemigrationV1beta1Api.md#read_storage_version_migration_status) | **GET** /apis/storagemigration.k8s.io/v1beta1/storageversionmigrations/{name}/status | +*StoragemigrationV1beta1Api* | [**replace_storage_version_migration**](docs/StoragemigrationV1beta1Api.md#replace_storage_version_migration) | **PUT** /apis/storagemigration.k8s.io/v1beta1/storageversionmigrations/{name} | +*StoragemigrationV1beta1Api* | [**replace_storage_version_migration_status**](docs/StoragemigrationV1beta1Api.md#replace_storage_version_migration_status) | **PUT** /apis/storagemigration.k8s.io/v1beta1/storageversionmigrations/{name}/status | *VersionApi* | [**get_code**](docs/VersionApi.md#get_code) | **GET** /version/ | @@ -891,12 +994,14 @@ Class | Method | HTTP request | Description - [CoreV1Event](docs/CoreV1Event.md) - [CoreV1EventList](docs/CoreV1EventList.md) - [CoreV1EventSeries](docs/CoreV1EventSeries.md) + - [CoreV1ResourceClaim](docs/CoreV1ResourceClaim.md) - [DiscoveryV1EndpointPort](docs/DiscoveryV1EndpointPort.md) - [EventsV1Event](docs/EventsV1Event.md) - [EventsV1EventList](docs/EventsV1EventList.md) - [EventsV1EventSeries](docs/EventsV1EventSeries.md) - [FlowcontrolV1Subject](docs/FlowcontrolV1Subject.md) - [RbacV1Subject](docs/RbacV1Subject.md) + - [ResourceV1ResourceClaim](docs/ResourceV1ResourceClaim.md) - [StorageV1TokenRequest](docs/StorageV1TokenRequest.md) - [V1APIGroup](docs/V1APIGroup.md) - [V1APIGroupList](docs/V1APIGroupList.md) @@ -911,6 +1016,8 @@ Class | Method | HTTP request | Description - [V1AWSElasticBlockStoreVolumeSource](docs/V1AWSElasticBlockStoreVolumeSource.md) - [V1Affinity](docs/V1Affinity.md) - [V1AggregationRule](docs/V1AggregationRule.md) + - [V1AllocatedDeviceStatus](docs/V1AllocatedDeviceStatus.md) + - [V1AllocationResult](docs/V1AllocationResult.md) - [V1AppArmorProfile](docs/V1AppArmorProfile.md) - [V1AttachedVolume](docs/V1AttachedVolume.md) - [V1AuditAnnotation](docs/V1AuditAnnotation.md) @@ -919,6 +1026,7 @@ Class | Method | HTTP request | Description - [V1AzureFileVolumeSource](docs/V1AzureFileVolumeSource.md) - [V1Binding](docs/V1Binding.md) - [V1BoundObjectReference](docs/V1BoundObjectReference.md) + - [V1CELDeviceSelector](docs/V1CELDeviceSelector.md) - [V1CSIDriver](docs/V1CSIDriver.md) - [V1CSIDriverList](docs/V1CSIDriverList.md) - [V1CSIDriverSpec](docs/V1CSIDriverSpec.md) @@ -931,6 +1039,9 @@ Class | Method | HTTP request | Description - [V1CSIStorageCapacityList](docs/V1CSIStorageCapacityList.md) - [V1CSIVolumeSource](docs/V1CSIVolumeSource.md) - [V1Capabilities](docs/V1Capabilities.md) + - [V1CapacityRequestPolicy](docs/V1CapacityRequestPolicy.md) + - [V1CapacityRequestPolicyRange](docs/V1CapacityRequestPolicyRange.md) + - [V1CapacityRequirements](docs/V1CapacityRequirements.md) - [V1CephFSPersistentVolumeSource](docs/V1CephFSPersistentVolumeSource.md) - [V1CephFSVolumeSource](docs/V1CephFSVolumeSource.md) - [V1CertificateSigningRequest](docs/V1CertificateSigningRequest.md) @@ -940,7 +1051,6 @@ Class | Method | HTTP request | Description - [V1CertificateSigningRequestStatus](docs/V1CertificateSigningRequestStatus.md) - [V1CinderPersistentVolumeSource](docs/V1CinderPersistentVolumeSource.md) - [V1CinderVolumeSource](docs/V1CinderVolumeSource.md) - - [V1ClaimSource](docs/V1ClaimSource.md) - [V1ClientIPConfig](docs/V1ClientIPConfig.md) - [V1ClusterRole](docs/V1ClusterRole.md) - [V1ClusterRoleBinding](docs/V1ClusterRoleBinding.md) @@ -959,16 +1069,22 @@ Class | Method | HTTP request | Description - [V1ConfigMapProjection](docs/V1ConfigMapProjection.md) - [V1ConfigMapVolumeSource](docs/V1ConfigMapVolumeSource.md) - [V1Container](docs/V1Container.md) + - [V1ContainerExtendedResourceRequest](docs/V1ContainerExtendedResourceRequest.md) - [V1ContainerImage](docs/V1ContainerImage.md) - [V1ContainerPort](docs/V1ContainerPort.md) - [V1ContainerResizePolicy](docs/V1ContainerResizePolicy.md) + - [V1ContainerRestartRule](docs/V1ContainerRestartRule.md) + - [V1ContainerRestartRuleOnExitCodes](docs/V1ContainerRestartRuleOnExitCodes.md) - [V1ContainerState](docs/V1ContainerState.md) - [V1ContainerStateRunning](docs/V1ContainerStateRunning.md) - [V1ContainerStateTerminated](docs/V1ContainerStateTerminated.md) - [V1ContainerStateWaiting](docs/V1ContainerStateWaiting.md) - [V1ContainerStatus](docs/V1ContainerStatus.md) + - [V1ContainerUser](docs/V1ContainerUser.md) - [V1ControllerRevision](docs/V1ControllerRevision.md) - [V1ControllerRevisionList](docs/V1ControllerRevisionList.md) + - [V1Counter](docs/V1Counter.md) + - [V1CounterSet](docs/V1CounterSet.md) - [V1CronJob](docs/V1CronJob.md) - [V1CronJobList](docs/V1CronJobList.md) - [V1CronJobSpec](docs/V1CronJobSpec.md) @@ -1000,6 +1116,25 @@ Class | Method | HTTP request | Description - [V1DeploymentSpec](docs/V1DeploymentSpec.md) - [V1DeploymentStatus](docs/V1DeploymentStatus.md) - [V1DeploymentStrategy](docs/V1DeploymentStrategy.md) + - [V1Device](docs/V1Device.md) + - [V1DeviceAllocationConfiguration](docs/V1DeviceAllocationConfiguration.md) + - [V1DeviceAllocationResult](docs/V1DeviceAllocationResult.md) + - [V1DeviceAttribute](docs/V1DeviceAttribute.md) + - [V1DeviceCapacity](docs/V1DeviceCapacity.md) + - [V1DeviceClaim](docs/V1DeviceClaim.md) + - [V1DeviceClaimConfiguration](docs/V1DeviceClaimConfiguration.md) + - [V1DeviceClass](docs/V1DeviceClass.md) + - [V1DeviceClassConfiguration](docs/V1DeviceClassConfiguration.md) + - [V1DeviceClassList](docs/V1DeviceClassList.md) + - [V1DeviceClassSpec](docs/V1DeviceClassSpec.md) + - [V1DeviceConstraint](docs/V1DeviceConstraint.md) + - [V1DeviceCounterConsumption](docs/V1DeviceCounterConsumption.md) + - [V1DeviceRequest](docs/V1DeviceRequest.md) + - [V1DeviceRequestAllocationResult](docs/V1DeviceRequestAllocationResult.md) + - [V1DeviceSelector](docs/V1DeviceSelector.md) + - [V1DeviceSubRequest](docs/V1DeviceSubRequest.md) + - [V1DeviceTaint](docs/V1DeviceTaint.md) + - [V1DeviceToleration](docs/V1DeviceToleration.md) - [V1DownwardAPIProjection](docs/V1DownwardAPIProjection.md) - [V1DownwardAPIVolumeFile](docs/V1DownwardAPIVolumeFile.md) - [V1DownwardAPIVolumeSource](docs/V1DownwardAPIVolumeSource.md) @@ -1020,11 +1155,15 @@ Class | Method | HTTP request | Description - [V1EphemeralVolumeSource](docs/V1EphemeralVolumeSource.md) - [V1EventSource](docs/V1EventSource.md) - [V1Eviction](docs/V1Eviction.md) + - [V1ExactDeviceRequest](docs/V1ExactDeviceRequest.md) - [V1ExecAction](docs/V1ExecAction.md) - [V1ExemptPriorityLevelConfiguration](docs/V1ExemptPriorityLevelConfiguration.md) - [V1ExpressionWarning](docs/V1ExpressionWarning.md) - [V1ExternalDocumentation](docs/V1ExternalDocumentation.md) - [V1FCVolumeSource](docs/V1FCVolumeSource.md) + - [V1FieldSelectorAttributes](docs/V1FieldSelectorAttributes.md) + - [V1FieldSelectorRequirement](docs/V1FieldSelectorRequirement.md) + - [V1FileKeySelector](docs/V1FileKeySelector.md) - [V1FlexPersistentVolumeSource](docs/V1FlexPersistentVolumeSource.md) - [V1FlexVolumeSource](docs/V1FlexVolumeSource.md) - [V1FlockerVolumeSource](docs/V1FlockerVolumeSource.md) @@ -1034,12 +1173,14 @@ Class | Method | HTTP request | Description - [V1FlowSchemaList](docs/V1FlowSchemaList.md) - [V1FlowSchemaSpec](docs/V1FlowSchemaSpec.md) - [V1FlowSchemaStatus](docs/V1FlowSchemaStatus.md) + - [V1ForNode](docs/V1ForNode.md) - [V1ForZone](docs/V1ForZone.md) - [V1GCEPersistentDiskVolumeSource](docs/V1GCEPersistentDiskVolumeSource.md) - [V1GRPCAction](docs/V1GRPCAction.md) - [V1GitRepoVolumeSource](docs/V1GitRepoVolumeSource.md) - [V1GlusterfsPersistentVolumeSource](docs/V1GlusterfsPersistentVolumeSource.md) - [V1GlusterfsVolumeSource](docs/V1GlusterfsVolumeSource.md) + - [V1GroupResource](docs/V1GroupResource.md) - [V1GroupSubject](docs/V1GroupSubject.md) - [V1GroupVersionForDiscovery](docs/V1GroupVersionForDiscovery.md) - [V1HTTPGetAction](docs/V1HTTPGetAction.md) @@ -1053,9 +1194,13 @@ Class | Method | HTTP request | Description - [V1HostAlias](docs/V1HostAlias.md) - [V1HostIP](docs/V1HostIP.md) - [V1HostPathVolumeSource](docs/V1HostPathVolumeSource.md) + - [V1IPAddress](docs/V1IPAddress.md) + - [V1IPAddressList](docs/V1IPAddressList.md) + - [V1IPAddressSpec](docs/V1IPAddressSpec.md) - [V1IPBlock](docs/V1IPBlock.md) - [V1ISCSIPersistentVolumeSource](docs/V1ISCSIPersistentVolumeSource.md) - [V1ISCSIVolumeSource](docs/V1ISCSIVolumeSource.md) + - [V1ImageVolumeSource](docs/V1ImageVolumeSource.md) - [V1Ingress](docs/V1Ingress.md) - [V1IngressBackend](docs/V1IngressBackend.md) - [V1IngressClass](docs/V1IngressClass.md) @@ -1080,6 +1225,7 @@ Class | Method | HTTP request | Description - [V1JobTemplateSpec](docs/V1JobTemplateSpec.md) - [V1KeyToPath](docs/V1KeyToPath.md) - [V1LabelSelector](docs/V1LabelSelector.md) + - [V1LabelSelectorAttributes](docs/V1LabelSelectorAttributes.md) - [V1LabelSelectorRequirement](docs/V1LabelSelectorRequirement.md) - [V1Lease](docs/V1Lease.md) - [V1LeaseList](docs/V1LeaseList.md) @@ -1092,6 +1238,7 @@ Class | Method | HTTP request | Description - [V1LimitRangeSpec](docs/V1LimitRangeSpec.md) - [V1LimitResponse](docs/V1LimitResponse.md) - [V1LimitedPriorityLevelConfiguration](docs/V1LimitedPriorityLevelConfiguration.md) + - [V1LinuxContainerUser](docs/V1LinuxContainerUser.md) - [V1ListMeta](docs/V1ListMeta.md) - [V1LoadBalancerIngress](docs/V1LoadBalancerIngress.md) - [V1LoadBalancerStatus](docs/V1LoadBalancerStatus.md) @@ -1112,6 +1259,7 @@ Class | Method | HTTP request | Description - [V1NamespaceList](docs/V1NamespaceList.md) - [V1NamespaceSpec](docs/V1NamespaceSpec.md) - [V1NamespaceStatus](docs/V1NamespaceStatus.md) + - [V1NetworkDeviceData](docs/V1NetworkDeviceData.md) - [V1NetworkPolicy](docs/V1NetworkPolicy.md) - [V1NetworkPolicyEgressRule](docs/V1NetworkPolicyEgressRule.md) - [V1NetworkPolicyIngressRule](docs/V1NetworkPolicyIngressRule.md) @@ -1126,6 +1274,7 @@ Class | Method | HTTP request | Description - [V1NodeConfigSource](docs/V1NodeConfigSource.md) - [V1NodeConfigStatus](docs/V1NodeConfigStatus.md) - [V1NodeDaemonEndpoints](docs/V1NodeDaemonEndpoints.md) + - [V1NodeFeatures](docs/V1NodeFeatures.md) - [V1NodeList](docs/V1NodeList.md) - [V1NodeRuntimeHandler](docs/V1NodeRuntimeHandler.md) - [V1NodeRuntimeHandlerFeatures](docs/V1NodeRuntimeHandlerFeatures.md) @@ -1134,6 +1283,7 @@ Class | Method | HTTP request | Description - [V1NodeSelectorTerm](docs/V1NodeSelectorTerm.md) - [V1NodeSpec](docs/V1NodeSpec.md) - [V1NodeStatus](docs/V1NodeStatus.md) + - [V1NodeSwapStatus](docs/V1NodeSwapStatus.md) - [V1NodeSystemInfo](docs/V1NodeSystemInfo.md) - [V1NonResourceAttributes](docs/V1NonResourceAttributes.md) - [V1NonResourcePolicyRule](docs/V1NonResourcePolicyRule.md) @@ -1141,10 +1291,12 @@ Class | Method | HTTP request | Description - [V1ObjectFieldSelector](docs/V1ObjectFieldSelector.md) - [V1ObjectMeta](docs/V1ObjectMeta.md) - [V1ObjectReference](docs/V1ObjectReference.md) + - [V1OpaqueDeviceConfiguration](docs/V1OpaqueDeviceConfiguration.md) - [V1Overhead](docs/V1Overhead.md) - [V1OwnerReference](docs/V1OwnerReference.md) - [V1ParamKind](docs/V1ParamKind.md) - [V1ParamRef](docs/V1ParamRef.md) + - [V1ParentReference](docs/V1ParentReference.md) - [V1PersistentVolume](docs/V1PersistentVolume.md) - [V1PersistentVolumeClaim](docs/V1PersistentVolumeClaim.md) - [V1PersistentVolumeClaimCondition](docs/V1PersistentVolumeClaimCondition.md) @@ -1161,6 +1313,7 @@ Class | Method | HTTP request | Description - [V1PodAffinity](docs/V1PodAffinity.md) - [V1PodAffinityTerm](docs/V1PodAffinityTerm.md) - [V1PodAntiAffinity](docs/V1PodAntiAffinity.md) + - [V1PodCertificateProjection](docs/V1PodCertificateProjection.md) - [V1PodCondition](docs/V1PodCondition.md) - [V1PodDNSConfig](docs/V1PodDNSConfig.md) - [V1PodDNSConfigOption](docs/V1PodDNSConfigOption.md) @@ -1168,6 +1321,7 @@ Class | Method | HTTP request | Description - [V1PodDisruptionBudgetList](docs/V1PodDisruptionBudgetList.md) - [V1PodDisruptionBudgetSpec](docs/V1PodDisruptionBudgetSpec.md) - [V1PodDisruptionBudgetStatus](docs/V1PodDisruptionBudgetStatus.md) + - [V1PodExtendedResourceClaimStatus](docs/V1PodExtendedResourceClaimStatus.md) - [V1PodFailurePolicy](docs/V1PodFailurePolicy.md) - [V1PodFailurePolicyOnExitCodesRequirement](docs/V1PodFailurePolicyOnExitCodesRequirement.md) - [V1PodFailurePolicyOnPodConditionsPattern](docs/V1PodFailurePolicyOnPodConditionsPattern.md) @@ -1216,15 +1370,27 @@ Class | Method | HTTP request | Description - [V1ReplicationControllerSpec](docs/V1ReplicationControllerSpec.md) - [V1ReplicationControllerStatus](docs/V1ReplicationControllerStatus.md) - [V1ResourceAttributes](docs/V1ResourceAttributes.md) - - [V1ResourceClaim](docs/V1ResourceClaim.md) + - [V1ResourceClaimConsumerReference](docs/V1ResourceClaimConsumerReference.md) + - [V1ResourceClaimList](docs/V1ResourceClaimList.md) + - [V1ResourceClaimSpec](docs/V1ResourceClaimSpec.md) + - [V1ResourceClaimStatus](docs/V1ResourceClaimStatus.md) + - [V1ResourceClaimTemplate](docs/V1ResourceClaimTemplate.md) + - [V1ResourceClaimTemplateList](docs/V1ResourceClaimTemplateList.md) + - [V1ResourceClaimTemplateSpec](docs/V1ResourceClaimTemplateSpec.md) - [V1ResourceFieldSelector](docs/V1ResourceFieldSelector.md) + - [V1ResourceHealth](docs/V1ResourceHealth.md) - [V1ResourcePolicyRule](docs/V1ResourcePolicyRule.md) + - [V1ResourcePool](docs/V1ResourcePool.md) - [V1ResourceQuota](docs/V1ResourceQuota.md) - [V1ResourceQuotaList](docs/V1ResourceQuotaList.md) - [V1ResourceQuotaSpec](docs/V1ResourceQuotaSpec.md) - [V1ResourceQuotaStatus](docs/V1ResourceQuotaStatus.md) - [V1ResourceRequirements](docs/V1ResourceRequirements.md) - [V1ResourceRule](docs/V1ResourceRule.md) + - [V1ResourceSlice](docs/V1ResourceSlice.md) + - [V1ResourceSliceList](docs/V1ResourceSliceList.md) + - [V1ResourceSliceSpec](docs/V1ResourceSliceSpec.md) + - [V1ResourceStatus](docs/V1ResourceStatus.md) - [V1Role](docs/V1Role.md) - [V1RoleBinding](docs/V1RoleBinding.md) - [V1RoleBindingList](docs/V1RoleBindingList.md) @@ -1268,6 +1434,10 @@ Class | Method | HTTP request | Description - [V1ServiceAccountSubject](docs/V1ServiceAccountSubject.md) - [V1ServiceAccountTokenProjection](docs/V1ServiceAccountTokenProjection.md) - [V1ServiceBackendPort](docs/V1ServiceBackendPort.md) + - [V1ServiceCIDR](docs/V1ServiceCIDR.md) + - [V1ServiceCIDRList](docs/V1ServiceCIDRList.md) + - [V1ServiceCIDRSpec](docs/V1ServiceCIDRSpec.md) + - [V1ServiceCIDRStatus](docs/V1ServiceCIDRStatus.md) - [V1ServiceList](docs/V1ServiceList.md) - [V1ServicePort](docs/V1ServicePort.md) - [V1ServiceSpec](docs/V1ServiceSpec.md) @@ -1332,6 +1502,8 @@ Class | Method | HTTP request | Description - [V1VolumeAttachmentSource](docs/V1VolumeAttachmentSource.md) - [V1VolumeAttachmentSpec](docs/V1VolumeAttachmentSpec.md) - [V1VolumeAttachmentStatus](docs/V1VolumeAttachmentStatus.md) + - [V1VolumeAttributesClass](docs/V1VolumeAttributesClass.md) + - [V1VolumeAttributesClassList](docs/V1VolumeAttributesClassList.md) - [V1VolumeDevice](docs/V1VolumeDevice.md) - [V1VolumeError](docs/V1VolumeError.md) - [V1VolumeMount](docs/V1VolumeMount.md) @@ -1345,130 +1517,174 @@ Class | Method | HTTP request | Description - [V1WebhookConversion](docs/V1WebhookConversion.md) - [V1WeightedPodAffinityTerm](docs/V1WeightedPodAffinityTerm.md) - [V1WindowsSecurityContextOptions](docs/V1WindowsSecurityContextOptions.md) - - [V1alpha1AuditAnnotation](docs/V1alpha1AuditAnnotation.md) + - [V1WorkloadReference](docs/V1WorkloadReference.md) + - [V1alpha1ApplyConfiguration](docs/V1alpha1ApplyConfiguration.md) - [V1alpha1ClusterTrustBundle](docs/V1alpha1ClusterTrustBundle.md) - [V1alpha1ClusterTrustBundleList](docs/V1alpha1ClusterTrustBundleList.md) - [V1alpha1ClusterTrustBundleSpec](docs/V1alpha1ClusterTrustBundleSpec.md) - - [V1alpha1ExpressionWarning](docs/V1alpha1ExpressionWarning.md) - - [V1alpha1GroupVersionResource](docs/V1alpha1GroupVersionResource.md) - - [V1alpha1IPAddress](docs/V1alpha1IPAddress.md) - - [V1alpha1IPAddressList](docs/V1alpha1IPAddressList.md) - - [V1alpha1IPAddressSpec](docs/V1alpha1IPAddressSpec.md) + - [V1alpha1GangSchedulingPolicy](docs/V1alpha1GangSchedulingPolicy.md) + - [V1alpha1JSONPatch](docs/V1alpha1JSONPatch.md) - [V1alpha1MatchCondition](docs/V1alpha1MatchCondition.md) - [V1alpha1MatchResources](docs/V1alpha1MatchResources.md) - - [V1alpha1MigrationCondition](docs/V1alpha1MigrationCondition.md) + - [V1alpha1MutatingAdmissionPolicy](docs/V1alpha1MutatingAdmissionPolicy.md) + - [V1alpha1MutatingAdmissionPolicyBinding](docs/V1alpha1MutatingAdmissionPolicyBinding.md) + - [V1alpha1MutatingAdmissionPolicyBindingList](docs/V1alpha1MutatingAdmissionPolicyBindingList.md) + - [V1alpha1MutatingAdmissionPolicyBindingSpec](docs/V1alpha1MutatingAdmissionPolicyBindingSpec.md) + - [V1alpha1MutatingAdmissionPolicyList](docs/V1alpha1MutatingAdmissionPolicyList.md) + - [V1alpha1MutatingAdmissionPolicySpec](docs/V1alpha1MutatingAdmissionPolicySpec.md) + - [V1alpha1Mutation](docs/V1alpha1Mutation.md) - [V1alpha1NamedRuleWithOperations](docs/V1alpha1NamedRuleWithOperations.md) - [V1alpha1ParamKind](docs/V1alpha1ParamKind.md) - [V1alpha1ParamRef](docs/V1alpha1ParamRef.md) - - [V1alpha1ParentReference](docs/V1alpha1ParentReference.md) - - [V1alpha1SelfSubjectReview](docs/V1alpha1SelfSubjectReview.md) - - [V1alpha1SelfSubjectReviewStatus](docs/V1alpha1SelfSubjectReviewStatus.md) + - [V1alpha1PodGroup](docs/V1alpha1PodGroup.md) + - [V1alpha1PodGroupPolicy](docs/V1alpha1PodGroupPolicy.md) - [V1alpha1ServerStorageVersion](docs/V1alpha1ServerStorageVersion.md) - - [V1alpha1ServiceCIDR](docs/V1alpha1ServiceCIDR.md) - - [V1alpha1ServiceCIDRList](docs/V1alpha1ServiceCIDRList.md) - - [V1alpha1ServiceCIDRSpec](docs/V1alpha1ServiceCIDRSpec.md) - - [V1alpha1ServiceCIDRStatus](docs/V1alpha1ServiceCIDRStatus.md) - [V1alpha1StorageVersion](docs/V1alpha1StorageVersion.md) - [V1alpha1StorageVersionCondition](docs/V1alpha1StorageVersionCondition.md) - [V1alpha1StorageVersionList](docs/V1alpha1StorageVersionList.md) - - [V1alpha1StorageVersionMigration](docs/V1alpha1StorageVersionMigration.md) - - [V1alpha1StorageVersionMigrationList](docs/V1alpha1StorageVersionMigrationList.md) - - [V1alpha1StorageVersionMigrationSpec](docs/V1alpha1StorageVersionMigrationSpec.md) - - [V1alpha1StorageVersionMigrationStatus](docs/V1alpha1StorageVersionMigrationStatus.md) - [V1alpha1StorageVersionStatus](docs/V1alpha1StorageVersionStatus.md) - - [V1alpha1TypeChecking](docs/V1alpha1TypeChecking.md) - - [V1alpha1ValidatingAdmissionPolicy](docs/V1alpha1ValidatingAdmissionPolicy.md) - - [V1alpha1ValidatingAdmissionPolicyBinding](docs/V1alpha1ValidatingAdmissionPolicyBinding.md) - - [V1alpha1ValidatingAdmissionPolicyBindingList](docs/V1alpha1ValidatingAdmissionPolicyBindingList.md) - - [V1alpha1ValidatingAdmissionPolicyBindingSpec](docs/V1alpha1ValidatingAdmissionPolicyBindingSpec.md) - - [V1alpha1ValidatingAdmissionPolicyList](docs/V1alpha1ValidatingAdmissionPolicyList.md) - - [V1alpha1ValidatingAdmissionPolicySpec](docs/V1alpha1ValidatingAdmissionPolicySpec.md) - - [V1alpha1ValidatingAdmissionPolicyStatus](docs/V1alpha1ValidatingAdmissionPolicyStatus.md) - - [V1alpha1Validation](docs/V1alpha1Validation.md) + - [V1alpha1TypedLocalObjectReference](docs/V1alpha1TypedLocalObjectReference.md) - [V1alpha1Variable](docs/V1alpha1Variable.md) - - [V1alpha1VolumeAttributesClass](docs/V1alpha1VolumeAttributesClass.md) - - [V1alpha1VolumeAttributesClassList](docs/V1alpha1VolumeAttributesClassList.md) - - [V1alpha2AllocationResult](docs/V1alpha2AllocationResult.md) - - [V1alpha2DriverAllocationResult](docs/V1alpha2DriverAllocationResult.md) - - [V1alpha2DriverRequests](docs/V1alpha2DriverRequests.md) - - [V1alpha2NamedResourcesAllocationResult](docs/V1alpha2NamedResourcesAllocationResult.md) - - [V1alpha2NamedResourcesAttribute](docs/V1alpha2NamedResourcesAttribute.md) - - [V1alpha2NamedResourcesFilter](docs/V1alpha2NamedResourcesFilter.md) - - [V1alpha2NamedResourcesInstance](docs/V1alpha2NamedResourcesInstance.md) - - [V1alpha2NamedResourcesIntSlice](docs/V1alpha2NamedResourcesIntSlice.md) - - [V1alpha2NamedResourcesRequest](docs/V1alpha2NamedResourcesRequest.md) - - [V1alpha2NamedResourcesResources](docs/V1alpha2NamedResourcesResources.md) - - [V1alpha2NamedResourcesStringSlice](docs/V1alpha2NamedResourcesStringSlice.md) - - [V1alpha2PodSchedulingContext](docs/V1alpha2PodSchedulingContext.md) - - [V1alpha2PodSchedulingContextList](docs/V1alpha2PodSchedulingContextList.md) - - [V1alpha2PodSchedulingContextSpec](docs/V1alpha2PodSchedulingContextSpec.md) - - [V1alpha2PodSchedulingContextStatus](docs/V1alpha2PodSchedulingContextStatus.md) - - [V1alpha2ResourceClaim](docs/V1alpha2ResourceClaim.md) - - [V1alpha2ResourceClaimConsumerReference](docs/V1alpha2ResourceClaimConsumerReference.md) - - [V1alpha2ResourceClaimList](docs/V1alpha2ResourceClaimList.md) - - [V1alpha2ResourceClaimParameters](docs/V1alpha2ResourceClaimParameters.md) - - [V1alpha2ResourceClaimParametersList](docs/V1alpha2ResourceClaimParametersList.md) - - [V1alpha2ResourceClaimParametersReference](docs/V1alpha2ResourceClaimParametersReference.md) - - [V1alpha2ResourceClaimSchedulingStatus](docs/V1alpha2ResourceClaimSchedulingStatus.md) - - [V1alpha2ResourceClaimSpec](docs/V1alpha2ResourceClaimSpec.md) - - [V1alpha2ResourceClaimStatus](docs/V1alpha2ResourceClaimStatus.md) - - [V1alpha2ResourceClaimTemplate](docs/V1alpha2ResourceClaimTemplate.md) - - [V1alpha2ResourceClaimTemplateList](docs/V1alpha2ResourceClaimTemplateList.md) - - [V1alpha2ResourceClaimTemplateSpec](docs/V1alpha2ResourceClaimTemplateSpec.md) - - [V1alpha2ResourceClass](docs/V1alpha2ResourceClass.md) - - [V1alpha2ResourceClassList](docs/V1alpha2ResourceClassList.md) - - [V1alpha2ResourceClassParameters](docs/V1alpha2ResourceClassParameters.md) - - [V1alpha2ResourceClassParametersList](docs/V1alpha2ResourceClassParametersList.md) - - [V1alpha2ResourceClassParametersReference](docs/V1alpha2ResourceClassParametersReference.md) - - [V1alpha2ResourceFilter](docs/V1alpha2ResourceFilter.md) - - [V1alpha2ResourceHandle](docs/V1alpha2ResourceHandle.md) - - [V1alpha2ResourceRequest](docs/V1alpha2ResourceRequest.md) - - [V1alpha2ResourceSlice](docs/V1alpha2ResourceSlice.md) - - [V1alpha2ResourceSliceList](docs/V1alpha2ResourceSliceList.md) - - [V1alpha2StructuredResourceHandle](docs/V1alpha2StructuredResourceHandle.md) - - [V1alpha2VendorParameters](docs/V1alpha2VendorParameters.md) - - [V1beta1AuditAnnotation](docs/V1beta1AuditAnnotation.md) - - [V1beta1ExpressionWarning](docs/V1beta1ExpressionWarning.md) + - [V1alpha1Workload](docs/V1alpha1Workload.md) + - [V1alpha1WorkloadList](docs/V1alpha1WorkloadList.md) + - [V1alpha1WorkloadSpec](docs/V1alpha1WorkloadSpec.md) + - [V1alpha2LeaseCandidate](docs/V1alpha2LeaseCandidate.md) + - [V1alpha2LeaseCandidateList](docs/V1alpha2LeaseCandidateList.md) + - [V1alpha2LeaseCandidateSpec](docs/V1alpha2LeaseCandidateSpec.md) + - [V1alpha3DeviceTaint](docs/V1alpha3DeviceTaint.md) + - [V1alpha3DeviceTaintRule](docs/V1alpha3DeviceTaintRule.md) + - [V1alpha3DeviceTaintRuleList](docs/V1alpha3DeviceTaintRuleList.md) + - [V1alpha3DeviceTaintRuleSpec](docs/V1alpha3DeviceTaintRuleSpec.md) + - [V1alpha3DeviceTaintRuleStatus](docs/V1alpha3DeviceTaintRuleStatus.md) + - [V1alpha3DeviceTaintSelector](docs/V1alpha3DeviceTaintSelector.md) + - [V1beta1AllocatedDeviceStatus](docs/V1beta1AllocatedDeviceStatus.md) + - [V1beta1AllocationResult](docs/V1beta1AllocationResult.md) + - [V1beta1ApplyConfiguration](docs/V1beta1ApplyConfiguration.md) + - [V1beta1BasicDevice](docs/V1beta1BasicDevice.md) + - [V1beta1CELDeviceSelector](docs/V1beta1CELDeviceSelector.md) + - [V1beta1CapacityRequestPolicy](docs/V1beta1CapacityRequestPolicy.md) + - [V1beta1CapacityRequestPolicyRange](docs/V1beta1CapacityRequestPolicyRange.md) + - [V1beta1CapacityRequirements](docs/V1beta1CapacityRequirements.md) + - [V1beta1ClusterTrustBundle](docs/V1beta1ClusterTrustBundle.md) + - [V1beta1ClusterTrustBundleList](docs/V1beta1ClusterTrustBundleList.md) + - [V1beta1ClusterTrustBundleSpec](docs/V1beta1ClusterTrustBundleSpec.md) + - [V1beta1Counter](docs/V1beta1Counter.md) + - [V1beta1CounterSet](docs/V1beta1CounterSet.md) + - [V1beta1Device](docs/V1beta1Device.md) + - [V1beta1DeviceAllocationConfiguration](docs/V1beta1DeviceAllocationConfiguration.md) + - [V1beta1DeviceAllocationResult](docs/V1beta1DeviceAllocationResult.md) + - [V1beta1DeviceAttribute](docs/V1beta1DeviceAttribute.md) + - [V1beta1DeviceCapacity](docs/V1beta1DeviceCapacity.md) + - [V1beta1DeviceClaim](docs/V1beta1DeviceClaim.md) + - [V1beta1DeviceClaimConfiguration](docs/V1beta1DeviceClaimConfiguration.md) + - [V1beta1DeviceClass](docs/V1beta1DeviceClass.md) + - [V1beta1DeviceClassConfiguration](docs/V1beta1DeviceClassConfiguration.md) + - [V1beta1DeviceClassList](docs/V1beta1DeviceClassList.md) + - [V1beta1DeviceClassSpec](docs/V1beta1DeviceClassSpec.md) + - [V1beta1DeviceConstraint](docs/V1beta1DeviceConstraint.md) + - [V1beta1DeviceCounterConsumption](docs/V1beta1DeviceCounterConsumption.md) + - [V1beta1DeviceRequest](docs/V1beta1DeviceRequest.md) + - [V1beta1DeviceRequestAllocationResult](docs/V1beta1DeviceRequestAllocationResult.md) + - [V1beta1DeviceSelector](docs/V1beta1DeviceSelector.md) + - [V1beta1DeviceSubRequest](docs/V1beta1DeviceSubRequest.md) + - [V1beta1DeviceTaint](docs/V1beta1DeviceTaint.md) + - [V1beta1DeviceToleration](docs/V1beta1DeviceToleration.md) + - [V1beta1IPAddress](docs/V1beta1IPAddress.md) + - [V1beta1IPAddressList](docs/V1beta1IPAddressList.md) + - [V1beta1IPAddressSpec](docs/V1beta1IPAddressSpec.md) + - [V1beta1JSONPatch](docs/V1beta1JSONPatch.md) + - [V1beta1LeaseCandidate](docs/V1beta1LeaseCandidate.md) + - [V1beta1LeaseCandidateList](docs/V1beta1LeaseCandidateList.md) + - [V1beta1LeaseCandidateSpec](docs/V1beta1LeaseCandidateSpec.md) - [V1beta1MatchCondition](docs/V1beta1MatchCondition.md) - [V1beta1MatchResources](docs/V1beta1MatchResources.md) + - [V1beta1MutatingAdmissionPolicy](docs/V1beta1MutatingAdmissionPolicy.md) + - [V1beta1MutatingAdmissionPolicyBinding](docs/V1beta1MutatingAdmissionPolicyBinding.md) + - [V1beta1MutatingAdmissionPolicyBindingList](docs/V1beta1MutatingAdmissionPolicyBindingList.md) + - [V1beta1MutatingAdmissionPolicyBindingSpec](docs/V1beta1MutatingAdmissionPolicyBindingSpec.md) + - [V1beta1MutatingAdmissionPolicyList](docs/V1beta1MutatingAdmissionPolicyList.md) + - [V1beta1MutatingAdmissionPolicySpec](docs/V1beta1MutatingAdmissionPolicySpec.md) + - [V1beta1Mutation](docs/V1beta1Mutation.md) - [V1beta1NamedRuleWithOperations](docs/V1beta1NamedRuleWithOperations.md) + - [V1beta1NetworkDeviceData](docs/V1beta1NetworkDeviceData.md) + - [V1beta1OpaqueDeviceConfiguration](docs/V1beta1OpaqueDeviceConfiguration.md) - [V1beta1ParamKind](docs/V1beta1ParamKind.md) - [V1beta1ParamRef](docs/V1beta1ParamRef.md) - - [V1beta1SelfSubjectReview](docs/V1beta1SelfSubjectReview.md) - - [V1beta1SelfSubjectReviewStatus](docs/V1beta1SelfSubjectReviewStatus.md) - - [V1beta1TypeChecking](docs/V1beta1TypeChecking.md) - - [V1beta1ValidatingAdmissionPolicy](docs/V1beta1ValidatingAdmissionPolicy.md) - - [V1beta1ValidatingAdmissionPolicyBinding](docs/V1beta1ValidatingAdmissionPolicyBinding.md) - - [V1beta1ValidatingAdmissionPolicyBindingList](docs/V1beta1ValidatingAdmissionPolicyBindingList.md) - - [V1beta1ValidatingAdmissionPolicyBindingSpec](docs/V1beta1ValidatingAdmissionPolicyBindingSpec.md) - - [V1beta1ValidatingAdmissionPolicyList](docs/V1beta1ValidatingAdmissionPolicyList.md) - - [V1beta1ValidatingAdmissionPolicySpec](docs/V1beta1ValidatingAdmissionPolicySpec.md) - - [V1beta1ValidatingAdmissionPolicyStatus](docs/V1beta1ValidatingAdmissionPolicyStatus.md) - - [V1beta1Validation](docs/V1beta1Validation.md) + - [V1beta1ParentReference](docs/V1beta1ParentReference.md) + - [V1beta1PodCertificateRequest](docs/V1beta1PodCertificateRequest.md) + - [V1beta1PodCertificateRequestList](docs/V1beta1PodCertificateRequestList.md) + - [V1beta1PodCertificateRequestSpec](docs/V1beta1PodCertificateRequestSpec.md) + - [V1beta1PodCertificateRequestStatus](docs/V1beta1PodCertificateRequestStatus.md) + - [V1beta1ResourceClaim](docs/V1beta1ResourceClaim.md) + - [V1beta1ResourceClaimConsumerReference](docs/V1beta1ResourceClaimConsumerReference.md) + - [V1beta1ResourceClaimList](docs/V1beta1ResourceClaimList.md) + - [V1beta1ResourceClaimSpec](docs/V1beta1ResourceClaimSpec.md) + - [V1beta1ResourceClaimStatus](docs/V1beta1ResourceClaimStatus.md) + - [V1beta1ResourceClaimTemplate](docs/V1beta1ResourceClaimTemplate.md) + - [V1beta1ResourceClaimTemplateList](docs/V1beta1ResourceClaimTemplateList.md) + - [V1beta1ResourceClaimTemplateSpec](docs/V1beta1ResourceClaimTemplateSpec.md) + - [V1beta1ResourcePool](docs/V1beta1ResourcePool.md) + - [V1beta1ResourceSlice](docs/V1beta1ResourceSlice.md) + - [V1beta1ResourceSliceList](docs/V1beta1ResourceSliceList.md) + - [V1beta1ResourceSliceSpec](docs/V1beta1ResourceSliceSpec.md) + - [V1beta1ServiceCIDR](docs/V1beta1ServiceCIDR.md) + - [V1beta1ServiceCIDRList](docs/V1beta1ServiceCIDRList.md) + - [V1beta1ServiceCIDRSpec](docs/V1beta1ServiceCIDRSpec.md) + - [V1beta1ServiceCIDRStatus](docs/V1beta1ServiceCIDRStatus.md) + - [V1beta1StorageVersionMigration](docs/V1beta1StorageVersionMigration.md) + - [V1beta1StorageVersionMigrationList](docs/V1beta1StorageVersionMigrationList.md) + - [V1beta1StorageVersionMigrationSpec](docs/V1beta1StorageVersionMigrationSpec.md) + - [V1beta1StorageVersionMigrationStatus](docs/V1beta1StorageVersionMigrationStatus.md) - [V1beta1Variable](docs/V1beta1Variable.md) - - [V1beta3ExemptPriorityLevelConfiguration](docs/V1beta3ExemptPriorityLevelConfiguration.md) - - [V1beta3FlowDistinguisherMethod](docs/V1beta3FlowDistinguisherMethod.md) - - [V1beta3FlowSchema](docs/V1beta3FlowSchema.md) - - [V1beta3FlowSchemaCondition](docs/V1beta3FlowSchemaCondition.md) - - [V1beta3FlowSchemaList](docs/V1beta3FlowSchemaList.md) - - [V1beta3FlowSchemaSpec](docs/V1beta3FlowSchemaSpec.md) - - [V1beta3FlowSchemaStatus](docs/V1beta3FlowSchemaStatus.md) - - [V1beta3GroupSubject](docs/V1beta3GroupSubject.md) - - [V1beta3LimitResponse](docs/V1beta3LimitResponse.md) - - [V1beta3LimitedPriorityLevelConfiguration](docs/V1beta3LimitedPriorityLevelConfiguration.md) - - [V1beta3NonResourcePolicyRule](docs/V1beta3NonResourcePolicyRule.md) - - [V1beta3PolicyRulesWithSubjects](docs/V1beta3PolicyRulesWithSubjects.md) - - [V1beta3PriorityLevelConfiguration](docs/V1beta3PriorityLevelConfiguration.md) - - [V1beta3PriorityLevelConfigurationCondition](docs/V1beta3PriorityLevelConfigurationCondition.md) - - [V1beta3PriorityLevelConfigurationList](docs/V1beta3PriorityLevelConfigurationList.md) - - [V1beta3PriorityLevelConfigurationReference](docs/V1beta3PriorityLevelConfigurationReference.md) - - [V1beta3PriorityLevelConfigurationSpec](docs/V1beta3PriorityLevelConfigurationSpec.md) - - [V1beta3PriorityLevelConfigurationStatus](docs/V1beta3PriorityLevelConfigurationStatus.md) - - [V1beta3QueuingConfiguration](docs/V1beta3QueuingConfiguration.md) - - [V1beta3ResourcePolicyRule](docs/V1beta3ResourcePolicyRule.md) - - [V1beta3ServiceAccountSubject](docs/V1beta3ServiceAccountSubject.md) - - [V1beta3Subject](docs/V1beta3Subject.md) - - [V1beta3UserSubject](docs/V1beta3UserSubject.md) + - [V1beta1VolumeAttributesClass](docs/V1beta1VolumeAttributesClass.md) + - [V1beta1VolumeAttributesClassList](docs/V1beta1VolumeAttributesClassList.md) + - [V1beta2AllocatedDeviceStatus](docs/V1beta2AllocatedDeviceStatus.md) + - [V1beta2AllocationResult](docs/V1beta2AllocationResult.md) + - [V1beta2CELDeviceSelector](docs/V1beta2CELDeviceSelector.md) + - [V1beta2CapacityRequestPolicy](docs/V1beta2CapacityRequestPolicy.md) + - [V1beta2CapacityRequestPolicyRange](docs/V1beta2CapacityRequestPolicyRange.md) + - [V1beta2CapacityRequirements](docs/V1beta2CapacityRequirements.md) + - [V1beta2Counter](docs/V1beta2Counter.md) + - [V1beta2CounterSet](docs/V1beta2CounterSet.md) + - [V1beta2Device](docs/V1beta2Device.md) + - [V1beta2DeviceAllocationConfiguration](docs/V1beta2DeviceAllocationConfiguration.md) + - [V1beta2DeviceAllocationResult](docs/V1beta2DeviceAllocationResult.md) + - [V1beta2DeviceAttribute](docs/V1beta2DeviceAttribute.md) + - [V1beta2DeviceCapacity](docs/V1beta2DeviceCapacity.md) + - [V1beta2DeviceClaim](docs/V1beta2DeviceClaim.md) + - [V1beta2DeviceClaimConfiguration](docs/V1beta2DeviceClaimConfiguration.md) + - [V1beta2DeviceClass](docs/V1beta2DeviceClass.md) + - [V1beta2DeviceClassConfiguration](docs/V1beta2DeviceClassConfiguration.md) + - [V1beta2DeviceClassList](docs/V1beta2DeviceClassList.md) + - [V1beta2DeviceClassSpec](docs/V1beta2DeviceClassSpec.md) + - [V1beta2DeviceConstraint](docs/V1beta2DeviceConstraint.md) + - [V1beta2DeviceCounterConsumption](docs/V1beta2DeviceCounterConsumption.md) + - [V1beta2DeviceRequest](docs/V1beta2DeviceRequest.md) + - [V1beta2DeviceRequestAllocationResult](docs/V1beta2DeviceRequestAllocationResult.md) + - [V1beta2DeviceSelector](docs/V1beta2DeviceSelector.md) + - [V1beta2DeviceSubRequest](docs/V1beta2DeviceSubRequest.md) + - [V1beta2DeviceTaint](docs/V1beta2DeviceTaint.md) + - [V1beta2DeviceToleration](docs/V1beta2DeviceToleration.md) + - [V1beta2ExactDeviceRequest](docs/V1beta2ExactDeviceRequest.md) + - [V1beta2NetworkDeviceData](docs/V1beta2NetworkDeviceData.md) + - [V1beta2OpaqueDeviceConfiguration](docs/V1beta2OpaqueDeviceConfiguration.md) + - [V1beta2ResourceClaim](docs/V1beta2ResourceClaim.md) + - [V1beta2ResourceClaimConsumerReference](docs/V1beta2ResourceClaimConsumerReference.md) + - [V1beta2ResourceClaimList](docs/V1beta2ResourceClaimList.md) + - [V1beta2ResourceClaimSpec](docs/V1beta2ResourceClaimSpec.md) + - [V1beta2ResourceClaimStatus](docs/V1beta2ResourceClaimStatus.md) + - [V1beta2ResourceClaimTemplate](docs/V1beta2ResourceClaimTemplate.md) + - [V1beta2ResourceClaimTemplateList](docs/V1beta2ResourceClaimTemplateList.md) + - [V1beta2ResourceClaimTemplateSpec](docs/V1beta2ResourceClaimTemplateSpec.md) + - [V1beta2ResourcePool](docs/V1beta2ResourcePool.md) + - [V1beta2ResourceSlice](docs/V1beta2ResourceSlice.md) + - [V1beta2ResourceSliceList](docs/V1beta2ResourceSliceList.md) + - [V1beta2ResourceSliceSpec](docs/V1beta2ResourceSliceSpec.md) + - [V2APIGroupDiscovery](docs/V2APIGroupDiscovery.md) + - [V2APIGroupDiscoveryList](docs/V2APIGroupDiscoveryList.md) + - [V2APIResourceDiscovery](docs/V2APIResourceDiscovery.md) + - [V2APISubresourceDiscovery](docs/V2APISubresourceDiscovery.md) + - [V2APIVersionDiscovery](docs/V2APIVersionDiscovery.md) - [V2ContainerResourceMetricSource](docs/V2ContainerResourceMetricSource.md) - [V2ContainerResourceMetricStatus](docs/V2ContainerResourceMetricStatus.md) - [V2CrossVersionObjectReference](docs/V2CrossVersionObjectReference.md) @@ -1493,13 +1709,21 @@ Class | Method | HTTP request | Description - [V2PodsMetricStatus](docs/V2PodsMetricStatus.md) - [V2ResourceMetricSource](docs/V2ResourceMetricSource.md) - [V2ResourceMetricStatus](docs/V2ResourceMetricStatus.md) + - [V2beta1APIGroupDiscovery](docs/V2beta1APIGroupDiscovery.md) + - [V2beta1APIGroupDiscoveryList](docs/V2beta1APIGroupDiscoveryList.md) + - [V2beta1APIResourceDiscovery](docs/V2beta1APIResourceDiscovery.md) + - [V2beta1APISubresourceDiscovery](docs/V2beta1APISubresourceDiscovery.md) + - [V2beta1APIVersionDiscovery](docs/V2beta1APIVersionDiscovery.md) - [VersionInfo](docs/VersionInfo.md) + ## Documentation For Authorization -## BearerToken +Authentication schemes defined for the API: + +### BearerToken - **Type**: API key - **API key parameter name**: authorization diff --git a/kubernetes/__init__.py b/kubernetes/__init__.py index 68c0260040..3281e1fdf7 100644 --- a/kubernetes/__init__.py +++ b/kubernetes/__init__.py @@ -14,7 +14,7 @@ __project__ = 'kubernetes' # The version is auto-updated. Please do not edit. -__version__ = "30.0.0+snapshot" +__version__ = "35.0.0+snapshot" from . import client from . import config @@ -23,3 +23,4 @@ from . import stream from . import utils from . import leaderelection +from . import informer diff --git a/kubernetes/base/config/dateutil.py b/kubernetes/base/config/dateutil.py index 972e003eba..02e94bda2d 100644 --- a/kubernetes/base/config/dateutil.py +++ b/kubernetes/base/config/dateutil.py @@ -49,21 +49,37 @@ def dst(self, dt): def parse_rfc3339(s): if isinstance(s, datetime.datetime): - # no need to parse it, just make sure it has a timezone. if not s.tzinfo: return s.replace(tzinfo=UTC) return s - groups = _re_rfc3339.search(s).groups() + + m = _re_rfc3339.fullmatch(s.strip()) + if m is None: + raise ValueError( + f"Invalid RFC3339 datetime: {s!r} " + "(expected YYYY-MM-DDTHH:MM:SS[.frac][Z|±HH:MM])" + ) + + groups = m.groups() dt = [0] * 7 for x in range(6): dt[x] = int(groups[x]) + us = 0 if groups[6] is not None: partial_sec = float(groups[6].replace(",", ".")) us = int(MICROSEC_PER_SEC * partial_sec) + tz = UTC - if groups[7] is not None and groups[7] != 'Z' and groups[7] != 'z': - tz_groups = _re_timezone.search(groups[7]).groups() + if groups[7] is not None and groups[7] not in ('Z', 'z', ' '): + tz_match = _re_timezone.search(groups[7]) + if tz_match is None: + raise ValueError( + f"Invalid timezone format in RFC3339 string {s!r}: " + f"timezone part {groups[7]!r} does not match expected " + f"format (±HH:MM)" + ) + tz_groups = tz_match.groups() hour = int(tz_groups[1]) minute = 0 if tz_groups[0] == "-": @@ -71,10 +87,17 @@ def parse_rfc3339(s): if tz_groups[2]: minute = int(tz_groups[2]) tz = TimezoneInfo(hour, minute) - return datetime.datetime( - year=dt[0], month=dt[1], day=dt[2], - hour=dt[3], minute=dt[4], second=dt[5], - microsecond=us, tzinfo=tz) + + try: + return datetime.datetime( + year=dt[0], month=dt[1], day=dt[2], + hour=dt[3], minute=dt[4], second=dt[5], + microsecond=us, tzinfo=tz) + except ValueError as e: + raise ValueError( + f"Invalid date/time values in RFC3339 string {s!r}: {e}" + ) from e + def format_rfc3339(date_time): diff --git a/kubernetes/base/config/dateutil_test.py b/kubernetes/base/config/dateutil_test.py index 933360d9fb..6f5d8af80c 100644 --- a/kubernetes/base/config/dateutil_test.py +++ b/kubernetes/base/config/dateutil_test.py @@ -66,3 +66,60 @@ def test_format_rfc3339(self): format_rfc3339(datetime(2017, 7, 25, 4, 44, 21, 0, TimezoneInfo(-2, 30))), "2017-07-25T07:14:21Z") + + def test_parse_rfc3339_invalid_formats(self): + """Test that invalid RFC3339 formats raise ValueError""" + invalid_inputs = [ + "2025-13-02T13:37:00Z", # Invalid month + "2025-12-32T13:37:00Z", # Invalid day + "2025-12-02T25:00:00Z", # Invalid hour + "2025-12-02T13:60:00Z", # Invalid minute + "2025-12-02T13:37:60Z", # Invalid second + "not-a-valid-date", # Completely invalid + "", # Empty string + "2025-12-02Z13:37:00", # Timezone before time + ] + + for invalid_input in invalid_inputs: + with self.assertRaises(ValueError): + parse_rfc3339(invalid_input) + + + + def test_parse_rfc3339_with_whitespace(self): + """Test that leading/trailing whitespace is handled""" + actual = parse_rfc3339(" 2017-07-25T04:44:21Z ") + expected = datetime(2017, 7, 25, 4, 44, 21, 0, UTC) + self.assertEqual(expected, actual) + + def test_parse_rfc3339_error_message_clarity(self): + """Test that error messages are clear and helpful""" + try: + parse_rfc3339("invalid-date-format") + except ValueError as e: + error_msg = str(e) + # Verify error message contains helpful information + self.assertIn("Invalid RFC3339", error_msg) + self.assertIn("YYYY-MM-DD", error_msg) + self.assertIn("expected", error_msg) + + def test_parse_rfc3339_handles_none_from_timezone_regex(self): + """Test parse_rfc3339 handles timezone regex returning None. + + This test addresses the GitHub issue where parse_rfc3339 was + calling .groups() on None when the timezone regex failed to match, + causing: 'NoneType' object has no attribute 'groups' + + The fix adds a check to ensure _re_timezone.search() result is + not None before calling .groups(), and provides a clear error + message. + """ + # The main RFC3339 regex allows space in timezone position: [zZ ] + # If a space ends up in groups[7], it should be handled gracefully + # Since the current code uses strip(), trailing spaces are removed, + # but the fix ensures robustness for any edge case + + # Test that space in timezone is treated as UTC (like Z/z) + actual = parse_rfc3339("2017-07-25 04:44:21") + expected = datetime(2017, 7, 25, 4, 44, 21, 0, UTC) + self.assertEqual(expected, actual) diff --git a/kubernetes/base/config/exec_provider.py b/kubernetes/base/config/exec_provider.py index 9dd3827609..95168f7f6e 100644 --- a/kubernetes/base/config/exec_provider.py +++ b/kubernetes/base/config/exec_provider.py @@ -31,7 +31,7 @@ class ExecProvider(object): * caching """ - def __init__(self, exec_config, cwd): + def __init__(self, exec_config, cwd, cluster=None): """ exec_config must be of type ConfigNode because we depend on safe_get(self, key) to correctly handle optional exec provider @@ -53,8 +53,20 @@ def __init__(self, exec_config, cwd): value = item['value'] additional_vars[name] = value self.env.update(additional_vars) - + if exec_config.safe_get('provideClusterInfo'): + self.cluster = cluster + else: + self.cluster = None self.cwd = cwd or None + + @property + def shell(self): + # for windows systems `shell` should be `True` + # for other systems like linux or darwin `shell` should be `False` + # referenes: + # https://github.com/kubernetes-client/python/pull/2289 + # https://docs.python.org/3/library/sys.html#sys.platform + return sys.platform in ("win32", "cygwin") def run(self, previous_response=None): is_interactive = hasattr(sys.stdout, 'isatty') and sys.stdout.isatty() @@ -67,6 +79,14 @@ def run(self, previous_response=None): } if previous_response: kubernetes_exec_info['spec']['response'] = previous_response + if self.cluster: + kubernetes_exec_info['spec']['cluster'] = self.cluster.value + if self.cluster.value.get("extensions"): + for extension in self.cluster.value["extensions"]: + if extension["name"] == "client.authentication.k8s.io/exec": + kubernetes_exec_info["spec"]["cluster"]["config"] = extension["extension"] + break + self.env['KUBERNETES_EXEC_INFO'] = json.dumps(kubernetes_exec_info) process = subprocess.Popen( self.args, @@ -75,7 +95,8 @@ def run(self, previous_response=None): stdin=sys.stdin if is_interactive else None, cwd=self.cwd, env=self.env, - universal_newlines=True) + universal_newlines=True, + shell=self.shell) (stdout, stderr) = process.communicate() exit_code = process.wait() if exit_code != 0: diff --git a/kubernetes/base/config/exec_provider_test.py b/kubernetes/base/config/exec_provider_test.py index de8109499f..0318627c60 100644 --- a/kubernetes/base/config/exec_provider_test.py +++ b/kubernetes/base/config/exec_provider_test.py @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +import json import os import unittest @@ -31,6 +32,13 @@ def setUp(self): 'apiVersion': 'client.authentication.k8s.io/v1beta1', 'env': None }) + self.input_with_cluster = ConfigNode('test', { + 'command': 'aws-iam-authenticator', + 'args': ['token', '-i', 'dummy'], + 'apiVersion': 'client.authentication.k8s.io/v1beta1', + 'provideClusterInfo': True, + 'env': None + }) self.output_ok = """ { "apiVersion": "client.authentication.k8s.io/v1beta1", @@ -162,6 +170,51 @@ def test_ok_no_console_attached(self, mock): self.assertTrue(isinstance(result, dict)) self.assertTrue('token' in result) + @mock.patch('subprocess.Popen') + def test_with_cluster_info(self, mock): + instance = mock.return_value + instance.wait.return_value = 0 + instance.communicate.return_value = (self.output_ok, '') + ep = ExecProvider(self.input_with_cluster, None, ConfigNode("cluster", {'server': 'name.company.com'})) + result = ep.run() + self.assertTrue(isinstance(result, dict)) + self.assertTrue('token' in result) + + obj = json.loads(mock.call_args.kwargs['env']['KUBERNETES_EXEC_INFO']) + self.assertEqual(obj['spec']['cluster']['server'], 'name.company.com') + + @mock.patch("subprocess.Popen") + def test_with_cluster_info_from_exec_extension(self, mock): + instance = mock.return_value + instance.wait.return_value = 0 + instance.communicate.return_value = (self.output_ok, "") + ep = ExecProvider( + self.input_with_cluster, + None, + ConfigNode( + "cluster", + { + "server": "name.company.com", + "extensions": [ + { + "name": "client.authentication.k8s.io/exec", + "extension": { + "namespace": "myproject", + "name": "mycluster", + }, + }, + ], + }, + ), + ) + result = ep.run() + self.assertTrue(isinstance(result, dict)) + self.assertTrue("token" in result) + + obj = json.loads(mock.call_args.kwargs["env"]["KUBERNETES_EXEC_INFO"]) + self.assertEqual(obj["spec"]["cluster"]["server"], "name.company.com") + self.assertEqual(obj["spec"]["cluster"]["config"]["namespace"], "myproject") + self.assertEqual(obj["spec"]["cluster"]["config"]["name"], "mycluster") if __name__ == '__main__': unittest.main() diff --git a/kubernetes/base/config/kube_config.py b/kubernetes/base/config/kube_config.py index 09cda8bda0..fc88f7f1fa 100644 --- a/kubernetes/base/config/kube_config.py +++ b/kubernetes/base/config/kube_config.py @@ -25,8 +25,6 @@ import time from collections import namedtuple -import google.auth -import google.auth.transport.requests import oauthlib.oauth2 import urllib3 import yaml @@ -40,9 +38,13 @@ from .dateutil import UTC, format_rfc3339, parse_rfc3339 try: - import adal + import google.auth + import google.auth.transport.requests + google_auth_available = True except ImportError: - pass + google_auth_available = False + + EXPIRY_SKEW_PREVENTION_DELAY = datetime.timedelta(minutes=5) KUBE_CONFIG_DEFAULT_LOCATION = os.environ.get('KUBECONFIG', '~/.kube/config') @@ -60,13 +62,13 @@ def _cleanup_temp_files(): _temp_files = {} -def _create_temp_file_with_content(content, temp_file_path=None): +def _create_temp_file_with_content(content, temp_file_path=None, force_recreate=False): if len(_temp_files) == 0: atexit.register(_cleanup_temp_files) # Because we may change context several times, try to remember files we # created and reuse them at a small memory cost. content_key = str(content) - if content_key in _temp_files: + if not force_recreate and content_key in _temp_files: return _temp_files[content_key] if temp_file_path and not os.path.isdir(temp_file_path): os.makedirs(name=temp_file_path) @@ -115,16 +117,10 @@ def as_file(self): decoded obj[%data_key_name] content otherwise obj[%file_key_name].""" use_data_if_no_file = not self._file and self._data if use_data_if_no_file: - if self._base64_file_content: - if isinstance(self._data, str): - content = self._data.encode() - else: - content = self._data - self._file = _create_temp_file_with_content( - base64.standard_b64decode(content), self._temp_file_path) - else: - self._file = _create_temp_file_with_content( - self._data, self._temp_file_path) + self._write_file() + + if self._file and not os.path.isfile(self._file): + self._write_file(force_rewrite=True) if self._file and not os.path.isfile(self._file): raise ConfigException("File does not exist: %s" % self._file) return self._file @@ -142,6 +138,18 @@ def as_data(self): self._data = f.read() return self._data + def _write_file(self, force_rewrite=False): + if self._base64_file_content: + if isinstance(self._data, str): + content = self._data.encode() + else: + content = self._data + self._file = _create_temp_file_with_content( + base64.standard_b64decode(content), self._temp_file_path, force_recreate=force_rewrite) + else: + self._file = _create_temp_file_with_content( + self._data, self._temp_file_path, force_recreate=force_rewrite) + class CommandTokenSource(object): def __init__(self, cmd, args, tokenKey, expiryKey): @@ -239,15 +247,19 @@ def _refresh_credentials(): 'config' in self._user['auth-provider'] and 'cmd-path' in self._user['auth-provider']['config']): return _refresh_credentials_with_cmd_path() - - credentials, project_id = google.auth.default(scopes=[ - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/userinfo.email' - ]) - request = google.auth.transport.requests.Request() - credentials.refresh(request) - return credentials - + + # Make the Google auth block optional. + if google_auth_available: + credentials, project_id = google.auth.default(scopes=[ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/userinfo.email' + ]) + request = google.auth.transport.requests.Request() + credentials.refresh(request) + return credentials + else: + return None + if get_google_credentials: self._get_google_credentials = get_google_credentials else: @@ -301,55 +313,10 @@ def _load_auth_provider_token(self): return if provider['name'] == 'gcp': return self._load_gcp_token(provider) - if provider['name'] == 'azure': - return self._load_azure_token(provider) if provider['name'] == 'oidc': return self._load_oid_token(provider) - def _azure_is_expired(self, provider): - expires_on = provider['config']['expires-on'] - if expires_on.isdigit(): - return int(expires_on) < time.time() - else: - exp_time = time.strptime(expires_on, '%Y-%m-%d %H:%M:%S.%f') - return exp_time < time.gmtime() - - def _load_azure_token(self, provider): - if 'config' not in provider: - return - if 'access-token' not in provider['config']: - return - if 'expires-on' in provider['config']: - if self._azure_is_expired(provider): - self._refresh_azure_token(provider['config']) - self.token = 'Bearer %s' % provider['config']['access-token'] - return self.token - - def _refresh_azure_token(self, config): - if 'adal' not in globals(): - raise ImportError('refresh token error, adal library not imported') - tenant = config['tenant-id'] - authority = 'https://login.microsoftonline.com/{}'.format(tenant) - context = adal.AuthenticationContext( - authority, validate_authority=True, api_version='1.0' - ) - refresh_token = config['refresh-token'] - client_id = config['client-id'] - apiserver_id = '00000002-0000-0000-c000-000000000000' - try: - apiserver_id = config['apiserver-id'] - except ConfigException: - # We've already set a default above - pass - token_response = context.acquire_token_with_refresh_token( - refresh_token, client_id, apiserver_id) - - provider = self._user['auth-provider']['config'] - provider.value['access-token'] = token_response['accessToken'] - provider.value['expires-on'] = token_response['expiresOn'] - if self._config_persister: - self._config_persister() def _load_gcp_token(self, provider): if (('config' not in provider) or @@ -487,7 +454,7 @@ def _load_from_exec_plugin(self): return try: base_path = self._get_base_path(self._cluster.path) - status = ExecProvider(self._user['exec'], base_path).run() + status = ExecProvider(self._user['exec'], base_path, self._cluster).run() if 'token' in status: self.token = "Bearer %s" % status['token'] elif 'clientCertificateData' in status: diff --git a/kubernetes/base/config/kube_config_test.py b/kubernetes/base/config/kube_config_test.py index f5ea181d09..b8063009eb 100644 --- a/kubernetes/base/config/kube_config_test.py +++ b/kubernetes/base/config/kube_config_test.py @@ -135,10 +135,6 @@ def _raise_exception(st): TEST_OIDC_CA = _base64(TEST_CERTIFICATE_AUTH) -TEST_AZURE_LOGIN = TEST_OIDC_LOGIN -TEST_AZURE_TOKEN = "test-azure-token" -TEST_AZURE_TOKEN_FULL = "Bearer " + TEST_AZURE_TOKEN - class BaseTestCase(unittest.TestCase): @@ -267,6 +263,26 @@ def test_file_given_no_object_data(self): data_key_name=TEST_DATA_KEY) self.assertEqual(t.as_data(), None) + def test_file_recreation(self): + obj = {TEST_DATA_KEY: TEST_DATA_BASE64} + t1 = FileOrData( + obj=obj, + file_key_name=TEST_FILE_KEY, + data_key_name=TEST_DATA_KEY, + ) + first_file_path = t1.as_file() + # We manually remove the file from the disk leaving it in the cache + os.remove(first_file_path) + + t2 = FileOrData( + obj=obj, + file_key_name=TEST_FILE_KEY, + data_key_name=TEST_DATA_KEY, + ) + + second_file_path = t2.as_file() + self.assertEqual(TEST_DATA, self.get_file_content(second_file_path)) + class TestConfigNode(BaseTestCase): @@ -444,41 +460,6 @@ class TestKubeConfigLoader(BaseTestCase): "user": "oidc" } }, - { - "name": "azure", - "context": { - "cluster": "default", - "user": "azure" - } - }, - { - "name": "azure_num", - "context": { - "cluster": "default", - "user": "azure_num" - } - }, - { - "name": "azure_str", - "context": { - "cluster": "default", - "user": "azure_str" - } - }, - { - "name": "azure_num_error", - "context": { - "cluster": "default", - "user": "azure_str_error" - } - }, - { - "name": "azure_str_error", - "context": { - "cluster": "default", - "user": "azure_str_error" - } - }, { "name": "expired_oidc", "context": { @@ -719,94 +700,6 @@ class TestKubeConfigLoader(BaseTestCase): } } }, - { - "name": "azure", - "user": { - "auth-provider": { - "config": { - "access-token": TEST_AZURE_TOKEN, - "apiserver-id": "00000002-0000-0000-c000-" - "000000000000", - "environment": "AzurePublicCloud", - "refresh-token": "refreshToken", - "tenant-id": "9d2ac018-e843-4e14-9e2b-4e0ddac75433" - }, - "name": "azure" - } - } - }, - { - "name": "azure_num", - "user": { - "auth-provider": { - "config": { - "access-token": TEST_AZURE_TOKEN, - "apiserver-id": "00000002-0000-0000-c000-" - "000000000000", - "environment": "AzurePublicCloud", - "expires-in": "0", - "expires-on": "156207275", - "refresh-token": "refreshToken", - "tenant-id": "9d2ac018-e843-4e14-9e2b-4e0ddac75433" - }, - "name": "azure" - } - } - }, - { - "name": "azure_str", - "user": { - "auth-provider": { - "config": { - "access-token": TEST_AZURE_TOKEN, - "apiserver-id": "00000002-0000-0000-c000-" - "000000000000", - "environment": "AzurePublicCloud", - "expires-in": "0", - "expires-on": "2018-10-18 00:52:29.044727", - "refresh-token": "refreshToken", - "tenant-id": "9d2ac018-e843-4e14-9e2b-4e0ddac75433" - }, - "name": "azure" - } - } - }, - { - "name": "azure_str_error", - "user": { - "auth-provider": { - "config": { - "access-token": TEST_AZURE_TOKEN, - "apiserver-id": "00000002-0000-0000-c000-" - "000000000000", - "environment": "AzurePublicCloud", - "expires-in": "0", - "expires-on": "2018-10-18 00:52", - "refresh-token": "refreshToken", - "tenant-id": "9d2ac018-e843-4e14-9e2b-4e0ddac75433" - }, - "name": "azure" - } - } - }, - { - "name": "azure_num_error", - "user": { - "auth-provider": { - "config": { - "access-token": TEST_AZURE_TOKEN, - "apiserver-id": "00000002-0000-0000-c000-" - "000000000000", - "environment": "AzurePublicCloud", - "expires-in": "0", - "expires-on": "-1", - "refresh-token": "refreshToken", - "tenant-id": "9d2ac018-e843-4e14-9e2b-4e0ddac75433" - }, - "name": "azure" - } - } - }, { "name": "expired_oidc", "user": { @@ -1173,45 +1066,6 @@ def test_oidc_fails_if_invalid_padding_length(self): None, ) - def test_azure_no_refresh(self): - loader = KubeConfigLoader( - config_dict=self.TEST_KUBE_CONFIG, - active_context="azure", - ) - self.assertTrue(loader._load_auth_provider_token()) - self.assertEqual(TEST_AZURE_TOKEN_FULL, loader.token) - - def test_azure_with_expired_num(self): - loader = KubeConfigLoader( - config_dict=self.TEST_KUBE_CONFIG, - active_context="azure_num", - ) - provider = loader._user['auth-provider'] - self.assertTrue(loader._azure_is_expired(provider)) - - def test_azure_with_expired_str(self): - loader = KubeConfigLoader( - config_dict=self.TEST_KUBE_CONFIG, - active_context="azure_str", - ) - provider = loader._user['auth-provider'] - self.assertTrue(loader._azure_is_expired(provider)) - - def test_azure_with_expired_str_error(self): - loader = KubeConfigLoader( - config_dict=self.TEST_KUBE_CONFIG, - active_context="azure_str_error", - ) - provider = loader._user['auth-provider'] - self.assertRaises(ValueError, loader._azure_is_expired, provider) - - def test_azure_with_expired_int_error(self): - loader = KubeConfigLoader( - config_dict=self.TEST_KUBE_CONFIG, - active_context="azure_num_error", - ) - provider = loader._user['auth-provider'] - self.assertRaises(ValueError, loader._azure_is_expired, provider) def test_user_pass(self): expected = FakeConfig(host=TEST_HOST, token=TEST_BASIC_TOKEN) @@ -1396,7 +1250,7 @@ def test_load_kube_config_from_dict_with_temp_file_path(self): temp_file_path=tmp_path) self.assertFalse(True if not os.listdir(tmp_path) else False) self.assertEqual(expected, actual) - _cleanup_temp_files + _cleanup_temp_files() def test_load_kube_config_from_empty_file_like_object(self): config_file_like_object = io.StringIO() diff --git a/kubernetes/base/dynamic/client.py b/kubernetes/base/dynamic/client.py index 352e11a809..64163d7b5c 100644 --- a/kubernetes/base/dynamic/client.py +++ b/kubernetes/base/dynamic/client.py @@ -163,7 +163,7 @@ def server_side_apply(self, resource, body=None, name=None, namespace=None, forc return self.request('patch', path, body=body, force_conflicts=force_conflicts, **kwargs) - def watch(self, resource, namespace=None, name=None, label_selector=None, field_selector=None, resource_version=None, timeout=None, watcher=None): + def watch(self, resource, namespace=None, name=None, label_selector=None, field_selector=None, resource_version=None, timeout=None, watcher=None, allow_watch_bookmarks=None): """ Stream events for a resource from the Kubernetes API @@ -176,6 +176,7 @@ def watch(self, resource, namespace=None, name=None, label_selector=None, field_ a resource_version greater than this value will be returned :param timeout: The amount of time in seconds to wait before terminating the stream :param watcher: The Watcher object that will be used to stream the resource + :param allow_watch_bookmarks: Ask the API server to send BOOKMARK events :return: Event object with these keys: 'type': The type of event such as "ADDED", "DELETED", etc. @@ -206,7 +207,8 @@ def watch(self, resource, namespace=None, name=None, label_selector=None, field_ label_selector=label_selector, resource_version=resource_version, serialize=False, - timeout_seconds=timeout + timeout_seconds=timeout, + allow_watch_bookmarks=allow_watch_bookmarks, ): event['object'] = ResourceInstance(resource, event['object']) yield event @@ -248,6 +250,8 @@ def request(self, method, path, body=None, **params): query_params.append(('fieldManager', params['field_manager'])) if params.get('force_conflicts') is not None: query_params.append(('force', params['force_conflicts'])) + if params.get('allow_watch_bookmarks') is not None: + query_params.append(('allowWatchBookmarks', params['allow_watch_bookmarks'])) header_params = params.get('header_params', {}) form_params = [] diff --git a/kubernetes/base/dynamic/discovery.py b/kubernetes/base/dynamic/discovery.py index c00dfa3ef8..3dd28af268 100644 --- a/kubernetes/base/dynamic/discovery.py +++ b/kubernetes/base/dynamic/discovery.py @@ -22,6 +22,7 @@ from collections import defaultdict from abc import abstractmethod, abstractproperty +from json.decoder import JSONDecodeError from urllib3.exceptions import ProtocolError, MaxRetryError from kubernetes import __version__ @@ -164,7 +165,8 @@ def get_resources_for_api_version(self, prefix, group, version, preferred): path = '/'.join(filter(None, [prefix, group, version])) try: resources_response = self.client.request('GET', path).resources or [] - except ServiceUnavailableError: + except (ServiceUnavailableError, JSONDecodeError): + # Handle both service unavailable errors and JSON decode errors resources_response = [] resources_raw = list(filter(lambda resource: '/' not in resource['name'], resources_response)) diff --git a/kubernetes/base/leaderelection/electionconfig.py b/kubernetes/base/leaderelection/electionconfig.py index 7b0db639b4..8ae8847e13 100644 --- a/kubernetes/base/leaderelection/electionconfig.py +++ b/kubernetes/base/leaderelection/electionconfig.py @@ -14,7 +14,7 @@ import sys import logging -logging.basicConfig(level=logging.INFO) +logger = logging.getLogger("leaderelection") class Config: @@ -56,4 +56,4 @@ def __init__(self, lock, lease_duration, renew_deadline, retry_period, onstarted # Default callback for when the current candidate if a leader, stops leading def on_stoppedleading_callback(self): - logging.info("stopped leading".format(self.lock.identity)) + logger.info("stopped leading".format(self.lock.identity)) diff --git a/kubernetes/base/leaderelection/leaderelection.py b/kubernetes/base/leaderelection/leaderelection.py index a707fbaccd..bbeb813505 100644 --- a/kubernetes/base/leaderelection/leaderelection.py +++ b/kubernetes/base/leaderelection/leaderelection.py @@ -24,7 +24,7 @@ from http import HTTPStatus else: import httplib -logging.basicConfig(level=logging.INFO) +logger = logging.getLogger("leaderelection") """ This package implements leader election using an annotation in a Kubernetes object. @@ -55,7 +55,7 @@ def __init__(self, election_config): def run(self): # Try to create/ acquire a lock if self.acquire(): - logging.info("{} successfully acquired lease".format(self.election_config.lock.identity)) + logger.info("{} successfully acquired lease".format(self.election_config.lock.identity)) # Start leading and call OnStartedLeading() threading.daemon = True @@ -68,7 +68,7 @@ def run(self): def acquire(self): # Follower - logging.info("{} is a follower".format(self.election_config.lock.identity)) + logger.info("{} is a follower".format(self.election_config.lock.identity)) retry_period = self.election_config.retry_period while True: @@ -81,7 +81,7 @@ def acquire(self): def renew_loop(self): # Leader - logging.info("Leader has entered renew loop and will try to update lease continuously") + logger.info("Leader has entered renew loop and will try to update lease continuously") retry_period = self.election_config.retry_period renew_deadline = self.election_config.renew_deadline * 1000 @@ -121,22 +121,22 @@ def try_acquire_or_renew(self): # To be removed when support for python2 will be removed if sys.version_info > (3, 0): if json.loads(old_election_record.body)['code'] != HTTPStatus.NOT_FOUND: - logging.info("Error retrieving resource lock {} as {}".format(self.election_config.lock.name, + logger.info("Error retrieving resource lock {} as {}".format(self.election_config.lock.name, old_election_record.reason)) return False else: if json.loads(old_election_record.body)['code'] != httplib.NOT_FOUND: - logging.info("Error retrieving resource lock {} as {}".format(self.election_config.lock.name, + logger.info("Error retrieving resource lock {} as {}".format(self.election_config.lock.name, old_election_record.reason)) return False - logging.info("{} is trying to create a lock".format(leader_election_record.holder_identity)) + logger.info("{} is trying to create a lock".format(leader_election_record.holder_identity)) create_status = self.election_config.lock.create(name=self.election_config.lock.name, namespace=self.election_config.lock.namespace, election_record=leader_election_record) if create_status is False: - logging.info("{} Failed to create lock".format(leader_election_record.holder_identity)) + logger.info("{} Failed to create lock".format(leader_election_record.holder_identity)) return False self.observed_record = leader_election_record @@ -156,7 +156,7 @@ def try_acquire_or_renew(self): # Report transitions if self.observed_record and self.observed_record.holder_identity != old_election_record.holder_identity: - logging.info("Leader has switched to {}".format(old_election_record.holder_identity)) + logger.info("Leader has switched to {}".format(old_election_record.holder_identity)) if self.observed_record is None or old_election_record.__dict__ != self.observed_record.__dict__: self.observed_record = old_election_record @@ -165,7 +165,7 @@ def try_acquire_or_renew(self): # If This candidate is not the leader and lease duration is yet to finish if (self.election_config.lock.identity != self.observed_record.holder_identity and self.observed_time_milliseconds + self.election_config.lease_duration * 1000 > int(now_timestamp * 1000)): - logging.info("yet to finish lease_duration, lease held by {} and has not expired".format(old_election_record.holder_identity)) + logger.info("yet to finish lease_duration, lease held by {} and has not expired".format(old_election_record.holder_identity)) return False # If this candidate is the Leader @@ -182,10 +182,10 @@ def update_lock(self, leader_election_record): leader_election_record) if update_status is False: - logging.info("{} failed to acquire lease".format(leader_election_record.holder_identity)) + logger.info("{} failed to acquire lease".format(leader_election_record.holder_identity)) return False self.observed_record = leader_election_record self.observed_time_milliseconds = int(time.time() * 1000) - logging.info("leader {} has successfully acquired lease".format(leader_election_record.holder_identity)) + logger.info("leader {} has successfully acquired lease".format(leader_election_record.holder_identity)) return True diff --git a/kubernetes/base/leaderelection/resourcelock/configmaplock.py b/kubernetes/base/leaderelection/resourcelock/configmaplock.py index a4ccf49d27..719152edea 100644 --- a/kubernetes/base/leaderelection/resourcelock/configmaplock.py +++ b/kubernetes/base/leaderelection/resourcelock/configmaplock.py @@ -18,7 +18,7 @@ from ..leaderelectionrecord import LeaderElectionRecord import json import logging -logging.basicConfig(level=logging.INFO) +logger = logging.getLogger("leaderelection") class ConfigMapLock: @@ -86,7 +86,7 @@ def create(self, name, namespace, election_record): api_response = self.api_instance.create_namespaced_config_map(namespace, body, pretty=True) return True except ApiException as e: - logging.info("Failed to create lock as {}".format(e)) + logger.info("Failed to create lock as {}".format(e)) return False def update(self, name, namespace, updated_record): @@ -103,7 +103,7 @@ def update(self, name, namespace, updated_record): body=self.configmap_reference) return True except ApiException as e: - logging.info("Failed to update lock as {}".format(e)) + logger.info("Failed to update lock as {}".format(e)) return False def get_lock_object(self, lock_record): diff --git a/kubernetes/base/stream/ws_client.py b/kubernetes/base/stream/ws_client.py index 3c854ea741..44b6123325 100644 --- a/kubernetes/base/stream/ws_client.py +++ b/kubernetes/base/stream/ws_client.py @@ -30,7 +30,7 @@ from six.moves.urllib.parse import urlencode, urlparse, urlunparse from six import StringIO, BytesIO -from websocket import WebSocket, ABNF, enableTrace +from websocket import WebSocket, ABNF, enableTrace, WebSocketConnectionClosedException from base64 import urlsafe_b64decode from requests.utils import should_bypass_proxies @@ -254,8 +254,15 @@ def close(self, **kwargs): self.sock.close(**kwargs) -WSResponse = collections.namedtuple('WSResponse', ['data']) +class WSResponse: + def __init__(self, data, status): + self.status = status + self.data = data + + def getheader(self, name, default=None): + """Returns a given response header.""" + return None class PortForward: def __init__(self, websocket, ports): @@ -379,7 +386,12 @@ def _proxy(self): if sock == self.websocket: pending = True while pending: - opcode, frame = self.websocket.recv_data_frame(True) + try: + opcode, frame = self.websocket.recv_data_frame(True) + except WebSocketConnectionClosedException: + for port in self.local_ports.values(): + port.python.close() + return if opcode == ABNF.OPCODE_BINARY: if not frame.data: raise RuntimeError("Unexpected frame data size") @@ -531,9 +543,9 @@ def websocket_call(configuration, _method, url, **kwargs): client.run_forever(timeout=_request_timeout) all = client.read_all() if binary: - return WSResponse(all) + return WSResponse(data=all, status=200) else: - return WSResponse('%s' % ''.join(all)) + return WSResponse(data='%s' % ''.join(all), status=200) except (Exception, KeyboardInterrupt, SystemExit) as e: raise ApiException(status=0, reason=str(e)) diff --git a/kubernetes/base/stream/ws_client_test.py b/kubernetes/base/stream/ws_client_test.py index a7a11f5c91..3f8c022874 100644 --- a/kubernetes/base/stream/ws_client_test.py +++ b/kubernetes/base/stream/ws_client_test.py @@ -17,19 +17,70 @@ from .ws_client import get_websocket_url from .ws_client import websocket_proxycare from kubernetes.client.configuration import Configuration +import os +import socket +import threading +import pytest +from kubernetes import stream, client, config try: import urllib3 urllib3.disable_warnings() except ImportError: pass +@pytest.fixture(autouse=True) +def dummy_kubeconfig(tmp_path, monkeypatch): + # Creating a kubeconfig + content = """ + apiVersion: v1 + kind: Config + clusters: + - name: default + cluster: + server: http://127.0.0.1:8888 + contexts: + - name: default + context: + cluster: default + user: default + users: + - name: default + user: {} + current-context: default + """ + cfg_file = tmp_path / "kubeconfig" + cfg_file.write_text(content) + monkeypatch.setenv("KUBECONFIG", str(cfg_file)) -def dictval(dict, key, default=None): - try: - val = dict[key] - except KeyError: - val = default - return val + +def dictval(dict_obj, key, default=None): + + return dict_obj.get(key, default) + +class DummyProxy(threading.Thread): + """ + A minimal HTTP proxy that flags any CONNECT request and returns 200 OK. + Listens on 127.0.0.1:8888 by default. + """ + def __init__(self, host='127.0.0.1', port=8888): + super().__init__(daemon=True) + self.host = host + self.port = port + self.received_connect = False + self._server_sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + self._server_sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) + self._server_sock.bind((self.host, 0)) + self._server_sock.listen(1) + + def run(self): + conn, _ = self._server_sock.accept() + try: + data = conn.recv(1024).decode('utf-8', errors='ignore') + if data.startswith('CONNECT '): + self.received_connect = True + conn.sendall(b"HTTP/1.1 200 Connection established\r\n\r\n") + finally: + conn.close() class WSClientTest(unittest.TestCase): @@ -56,21 +107,68 @@ def test_websocket_proxycare(self): ( 'http://proxy.example.com:8080/', 'user:pass', '.example.com', 'proxy.example.com', 8080, ('user','pass'), ['.example.com']), ( 'http://proxy.example.com:8080/', 'user:pass', 'localhost,.local,.example.com', 'proxy.example.com', 8080, ('user','pass'), ['localhost','.local','.example.com']), ]: - # setup input - config = Configuration() - if proxy is not None: - setattr(config, 'proxy', proxy) - if idpass is not None: - setattr(config, 'proxy_headers', urllib3.util.make_headers(proxy_basic_auth=idpass)) + # input setup + cfg = Configuration() + if proxy: + cfg.proxy = proxy + if idpass: + cfg.proxy_headers = urllib3.util.make_headers(proxy_basic_auth=idpass) if no_proxy is not None: - setattr(config, 'no_proxy', no_proxy) - # setup done - # test starts - connect_opt = websocket_proxycare( {}, config, None, None) - self.assertEqual( dictval(connect_opt,'http_proxy_host'), expect_host) - self.assertEqual( dictval(connect_opt,'http_proxy_port'), expect_port) - self.assertEqual( dictval(connect_opt,'http_proxy_auth'), expect_auth) - self.assertEqual( dictval(connect_opt,'http_no_proxy'), expect_noproxy) + cfg.no_proxy = no_proxy + + + connect_opts = websocket_proxycare({}, cfg, None, None) + assert dictval(connect_opts, 'http_proxy_host') == expect_host + assert dictval(connect_opts, 'http_proxy_port') == expect_port + assert dictval(connect_opts, 'http_proxy_auth') == expect_auth + assert dictval(connect_opts, 'http_no_proxy') == expect_noproxy + +@pytest.fixture(scope="module") +def dummy_proxy(): + #Dummy Proxy + proxy = DummyProxy(port=8888) + proxy.start() + yield proxy + +@pytest.fixture(autouse=True) +def clear_proxy_env(monkeypatch): + for var in ("HTTP_PROXY", "http_proxy", "HTTPS_PROXY", "https_proxy", "NO_PROXY", "no_proxy"): + monkeypatch.delenv(var, raising=False) + +def apply_proxy_to_conf(): + #apply HTTPS_PROXY env var and set it as global. + cfg = client.Configuration.get_default_copy() + cfg.proxy = os.getenv("HTTPS_PROXY") + cfg.no_proxy = os.getenv("NO_PROXY", "") + client.Configuration.set_default(cfg) + +def test_rest_call_ignores_env(dummy_proxy, monkeypatch): + # HTTPS_PROXY to dummy proxy + monkeypatch.setenv("HTTPS_PROXY", "http://127.0.0.1:8888") + # Avoid real HTTP request + monkeypatch.setattr(client.CoreV1Api, "list_namespace", lambda self, *_args, **_kwargs: None) + # Load config using kubeconfig + config.load_kube_config(config_file=os.environ["KUBECONFIG"]) + apply_proxy_to_conf() + # HTTPS_PROXY to dummy proxy + monkeypatch.setenv("HTTPS_PROXY", "http://127.0.0.1:8888") + config.load_kube_config(config_file=os.environ["KUBECONFIG"]) + apply_proxy_to_conf() + v1 = client.CoreV1Api() + v1.list_namespace(_preload_content=False) + assert not dummy_proxy.received_connect, "REST path should ignore HTTPS_PROXY" + +def test_websocket_call_honors_env(dummy_proxy, monkeypatch): + # set HTTPS_PROXY again + monkeypatch.setenv("HTTPS_PROXY", "http://127.0.0.1:8888") + # Load kubeconfig + config.load_kube_config(config_file=os.environ["KUBECONFIG"]) + apply_proxy_to_conf() + opts = websocket_proxycare({}, client.Configuration.get_default_copy(), None, None) + assert opts.get('http_proxy_host') == '127.0.0.1' + assert opts.get('http_proxy_port') == 8888 + # Optionally verify no_proxy parsing + assert opts.get('http_no_proxy') is None if __name__ == '__main__': unittest.main() diff --git a/kubernetes/base/watch/watch.py b/kubernetes/base/watch/watch.py index f78ab11d6f..44fbe49141 100644 --- a/kubernetes/base/watch/watch.py +++ b/kubernetes/base/watch/watch.py @@ -18,7 +18,7 @@ from kubernetes import client -PYDOC_RETURN_LABEL = ":return:" +PYDOC_RETURN_LABEL = ":rtype:" PYDOC_FOLLOW_PARAM = ":param bool follow:" # Removing this suffix from return type name should give us event's object @@ -78,6 +78,8 @@ def iter_resp_lines(resp): buffer = buffer[next_newline+1:] if line: yield line + else: + yield '' # Only print one empty line next_newline = buffer.find(b'\n') @@ -107,24 +109,36 @@ def get_watch_argument_name(self, func): return 'watch' def unmarshal_event(self, data, return_type): - js = json.loads(data) - js['raw_object'] = js['object'] - # BOOKMARK event is treated the same as ERROR for a quick fix of - # decoding exception - # TODO: make use of the resource_version in BOOKMARK event for more - # efficient WATCH - if return_type and js['type'] != 'ERROR' and js['type'] != 'BOOKMARK': - obj = SimpleNamespace(data=json.dumps(js['raw_object'])) - js['object'] = self._api_client.deserialize(obj, return_type) - if hasattr(js['object'], 'metadata'): - self.resource_version = js['object'].metadata.resource_version - # For custom objects that we don't have model defined, json - # deserialization results in dictionary - elif (isinstance(js['object'], dict) and 'metadata' in js['object'] - and 'resourceVersion' in js['object']['metadata']): - self.resource_version = js['object']['metadata'][ - 'resourceVersion'] - return js + if not data or data.isspace(): + return None + try: + js = json.loads(data) + js['raw_object'] = js['object'] + + if not return_type: + return js + + if js['type'] == 'BOOKMARK': + # Extract and store resource_version from BOOKMARK event for + # efficiency. No deserialization as event can be incomplete. + if isinstance(js['object'], dict) and 'metadata' in js['object']: + metadata = js['object']['metadata'] + if isinstance(metadata, dict) and 'resourceVersion' in metadata: + self.resource_version = metadata['resourceVersion'] + elif js['type'] != 'ERROR': + obj = SimpleNamespace(data=json.dumps(js['raw_object'])) + js['object'] = self._api_client.deserialize(obj, return_type) + if hasattr(js['object'], 'metadata'): + self.resource_version = js['object'].metadata.resource_version + # For custom objects that we don't have model defined, json + # deserialization results in dictionary + elif (isinstance(js['object'], dict) and 'metadata' in js['object'] + and 'resourceVersion' in js['object']['metadata']): + self.resource_version = js['object']['metadata'][ + 'resourceVersion'] + return js + except json.JSONDecodeError: + return None def stream(self, func, *args, **kwargs): """Watch an API resource and stream the result back via a generator. @@ -152,8 +166,8 @@ def stream(self, func, *args, **kwargs): v1 = kubernetes.client.CoreV1Api() watch = kubernetes.watch.Watch() for e in watch.stream(v1.list_namespace, resource_version=1127): - type = e['type'] - object = e['object'] # object is one of type return_type + type_ = e['type'] + object_ = e['object'] # object is one of type return_type raw_object = e['raw_object'] # raw_object is a dict ... if should_stop: @@ -172,6 +186,7 @@ def stream(self, func, *args, **kwargs): # We want to ensure we are returning within that timeout. disable_retries = ('timeout_seconds' in kwargs) retry_after_410 = False + deserialize = kwargs.pop('deserialize', True) while True: resp = func(*args, **kwargs) try: @@ -179,7 +194,11 @@ def stream(self, func, *args, **kwargs): # unmarshal when we are receiving events from watch, # return raw string when we are streaming log if watch_arg == "watch": - event = self.unmarshal_event(line, return_type) + if deserialize: + event = self.unmarshal_event(line, return_type) + else: + # Only do basic JSON parsing, no deserialize + event = json.loads(line) if isinstance(event, dict) \ and event['type'] == 'ERROR': obj = event['raw_object'] @@ -198,7 +217,10 @@ def stream(self, func, *args, **kwargs): retry_after_410 = False yield event else: - yield line + if line: + yield line # Normal non-empty line + else: + yield '' # Only yield one empty line if self._stop: break finally: diff --git a/kubernetes/base/watch/watch_test.py b/kubernetes/base/watch/watch_test.py index c5bc5c378c..07869095b6 100644 --- a/kubernetes/base/watch/watch_test.py +++ b/kubernetes/base/watch/watch_test.py @@ -12,11 +12,13 @@ # See the License for the specific language governing permissions and # limitations under the License. +import os +import time import unittest - from unittest.mock import Mock, call -from kubernetes import client +from kubernetes import client, config +from kubernetes.client import ApiException from .watch import Watch @@ -43,7 +45,7 @@ def test_watch_with_decode(self): fake_api = Mock() fake_api.get_namespaces = Mock(return_value=fake_resp) - fake_api.get_namespaces.__doc__ = ':return: V1NamespaceList' + fake_api.get_namespaces.__doc__ = ':rtype: V1NamespaceList' w = Watch() count = 1 @@ -90,7 +92,7 @@ def test_watch_with_interspersed_newlines(self): fake_api = Mock() fake_api.get_namespaces = Mock(return_value=fake_resp) - fake_api.get_namespaces.__doc__ = ':return: V1NamespaceList' + fake_api.get_namespaces.__doc__ = ':rtype: V1NamespaceList' w = Watch() count = 0 @@ -99,6 +101,9 @@ def test_watch_with_interspersed_newlines(self): # Note that "timeout_seconds" below is not a timeout; rather, it disables retries and is # the only way to do so. Without that, the stream will re-read the test data forever. for e in w.stream(fake_api.get_namespaces, timeout_seconds=1): + # Here added a statement for exception for empty lines. + if e is None: + continue count += 1 self.assertEqual("test%d" % count, e['object'].metadata.name) self.assertEqual(3, count) @@ -124,7 +129,7 @@ def test_watch_with_multibyte_utf8(self): fake_api = Mock() fake_api.get_configmaps = Mock(return_value=fake_resp) - fake_api.get_configmaps.__doc__ = ':return: V1ConfigMapList' + fake_api.get_configmaps.__doc__ = ':rtype: V1ConfigMapList' w = Watch() count = 0 @@ -170,7 +175,7 @@ def test_watch_with_invalid_utf8(self): fake_api = Mock() fake_api.get_configmaps = Mock(return_value=fake_resp) - fake_api.get_configmaps.__doc__ = ':return: V1ConfigMapList' + fake_api.get_configmaps.__doc__ = ':rtype: V1ConfigMapList' w = Watch() count = 0 @@ -199,7 +204,7 @@ def test_watch_for_follow(self): fake_api = Mock() fake_api.read_namespaced_pod_log = Mock(return_value=fake_resp) - fake_api.read_namespaced_pod_log.__doc__ = ':param bool follow:\n:return: str' + fake_api.read_namespaced_pod_log.__doc__ = ':param bool follow:\n:rtype: str' w = Watch() count = 1 @@ -251,7 +256,7 @@ def get_values(*args, **kwargs): fake_api = Mock() fake_api.get_namespaces = Mock(return_value=fake_resp) - fake_api.get_namespaces.__doc__ = ':return: V1NamespaceList' + fake_api.get_namespaces.__doc__ = ':rtype: V1NamespaceList' w = Watch() # ensure we keep our requested resource version or the version latest @@ -298,7 +303,7 @@ def test_watch_stream_twice(self): fake_api = Mock() fake_api.get_namespaces = Mock(return_value=fake_resp) - fake_api.get_namespaces.__doc__ = ':return: V1NamespaceList' + fake_api.get_namespaces.__doc__ = ':rtype: V1NamespaceList' count = 1 for e in w.stream(fake_api.get_namespaces): @@ -325,7 +330,7 @@ def test_watch_stream_loop(self): fake_api = Mock() fake_api.get_namespaces = Mock(return_value=fake_resp) - fake_api.get_namespaces.__doc__ = ':return: V1NamespaceList' + fake_api.get_namespaces.__doc__ = ':rtype: V1NamespaceList' count = 0 @@ -383,9 +388,22 @@ def test_unmarshal_with_bookmark(self): '"metadata":{},"spec":{"containers":null}}},"status":{}}}', 'V1Job') self.assertEqual("BOOKMARK", event['type']) - # Watch.resource_version is *not* updated, as BOOKMARK is treated the - # same as ERROR for a quick fix of decoding exception, - # resource_version in BOOKMARK is *not* used at all. + self.assertEqual("1", w.resource_version) + + def test_unmarshal_with_bookmark_metadata_not_in_dict(self): + w = Watch() + event = w.unmarshal_event( + '{"type":"BOOKMARK","object":{"metadata": "not-a-dict"}}', + 'V1Job') + self.assertEqual("BOOKMARK", event['type']) + self.assertEqual(None, w.resource_version) + + def test_unmarshal_with_bookmark_metadata_without_resource_version(self): + w = Watch() + event = w.unmarshal_event( + '{"type":"BOOKMARK","object":{"metadata": {"name": "foo"}}}', + 'V1Job') + self.assertEqual("BOOKMARK", event['type']) self.assertEqual(None, w.resource_version) def test_watch_with_exception(self): @@ -488,7 +506,125 @@ def test_watch_with_error_event_and_timeout_param(self): amt=None, decode_content=False) fake_resp.close.assert_called_once() fake_resp.release_conn.assert_called_once() - + + @classmethod + def setUpClass(cls): + cls.api = Mock() + cls.namespace = "default" + + def test_pod_log_empty_lines(self): + pod_name = "demo-bug" + + try: + self.api.create_namespaced_pod = Mock() + self.api.read_namespaced_pod = Mock() + self.api.delete_namespaced_pod = Mock() + self.api.read_namespaced_pod_log = Mock() + + #pod creating step + self.api.create_namespaced_pod.return_value = None + + #Checking pod status + mock_pod = Mock() + mock_pod.status.phase = "Running" + self.api.read_namespaced_pod.return_value = mock_pod + + # Printing at pod output + self.api.read_namespaced_pod_log.return_value = iter(["Hello from Docker\n"]) + + # Wait for the pod to reach 'Running' + timeout = 60 + start_time = time.time() + while time.time() - start_time < timeout: + pod = self.api.read_namespaced_pod(name=pod_name, namespace=self.namespace) + if pod.status.phase == "Running": + break + time.sleep(2) + else: + self.fail("Pod did not reach 'Running' state within timeout") + + # Reading and streaming logs using Watch (mocked) + w = Watch() + log_output = [] + #Mock logs used for this test + w.stream = Mock(return_value=[ + "Hello from Docker", + "", + "", + "\n\n", + "Another log line", + "", + "\n", + "Final log" + ]) + for event in w.stream(self.api.read_namespaced_pod_log, name=pod_name, namespace=self.namespace, follow=True): + log_output.append(event) + print(event) + + # Print outputs + print(f"Captured logs: {log_output}") + # self.assertTrue(any("Hello from Docker" in line for line in log_output)) + # self.assertTrue(any(line.strip() == "" for line in log_output), "No empty lines found in logs") + expected_log = [ + "Hello from Docker", + "", + "", + "\n\n", + "Another log line", + "", + "\n", + "Final log" + ] + + self.assertEqual(log_output, expected_log, "Captured logs do not match expected logs") + + except ApiException as e: + self.fail(f"Kubernetes API exception: {e}") + finally: + #checking pod is calling for delete + self.api.delete_namespaced_pod(name=pod_name, namespace=self.namespace) + self.api.delete_namespaced_pod.assert_called_once_with(name=pod_name, namespace=self.namespace) + +# Comment out the test below, it does not work currently. +# def test_watch_with_deserialize_param(self): +# """test watch.stream() deserialize param""" +# # prepare test data +# test_json = '{"type": "ADDED", "object": {"metadata": {"name": "test1", "resourceVersion": "1"}, "spec": {}, "status": {}}}' +# fake_resp = Mock() +# fake_resp.close = Mock() +# fake_resp.release_conn = Mock() +# fake_resp.stream = Mock(return_value=[test_json + '\n']) +# +# fake_api = Mock() +# fake_api.get_namespaces = Mock(return_value=fake_resp) +# fake_api.get_namespaces.__doc__ = ':rtype: V1NamespaceList' +# +# # test case with deserialize=True +# w = Watch() +# for e in w.stream(fake_api.get_namespaces, deserialize=True): +# self.assertEqual("ADDED", e['type']) +# # Verify that the object is deserialized correctly +# self.assertTrue(hasattr(e['object'], 'metadata')) +# self.assertEqual("test1", e['object'].metadata.name) +# self.assertEqual("1", e['object'].metadata.resource_version) +# # Verify that the original object is saved +# self.assertEqual(json.loads(test_json)['object'], e['raw_object']) +# +# # test case with deserialize=False +# w = Watch() +# for e in w.stream(fake_api.get_namespaces, deserialize=False): +# self.assertEqual("ADDED", e['type']) +# # The validation object remains in the original dictionary format +# self.assertIsInstance(e['object'], dict) +# self.assertEqual("test1", e['object']['metadata']['name']) +# self.assertEqual("1", e['object']['metadata']['resourceVersion']) +# +# # verify the api is called twice +# fake_api.get_namespaces.assert_has_calls([ +# call(_preload_content=False, watch=True), +# call(_preload_content=False, watch=True) +# ]) + if __name__ == '__main__': unittest.main() diff --git a/kubernetes/client/__init__.py b/kubernetes/client/__init__.py index 1b6c67d098..60f55b63cb 100644 --- a/kubernetes/client/__init__.py +++ b/kubernetes/client/__init__.py @@ -7,14 +7,14 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ from __future__ import absolute_import -__version__ = "30.0.0+snapshot" +__version__ = "35.0.0+snapshot" # import apis into sdk package from kubernetes.client.api.well_known_api import WellKnownApi @@ -31,8 +31,6 @@ from kubernetes.client.api.apps_v1_api import AppsV1Api from kubernetes.client.api.authentication_api import AuthenticationApi from kubernetes.client.api.authentication_v1_api import AuthenticationV1Api -from kubernetes.client.api.authentication_v1alpha1_api import AuthenticationV1alpha1Api -from kubernetes.client.api.authentication_v1beta1_api import AuthenticationV1beta1Api from kubernetes.client.api.authorization_api import AuthorizationApi from kubernetes.client.api.authorization_v1_api import AuthorizationV1Api from kubernetes.client.api.autoscaling_api import AutoscalingApi @@ -43,8 +41,11 @@ from kubernetes.client.api.certificates_api import CertificatesApi from kubernetes.client.api.certificates_v1_api import CertificatesV1Api from kubernetes.client.api.certificates_v1alpha1_api import CertificatesV1alpha1Api +from kubernetes.client.api.certificates_v1beta1_api import CertificatesV1beta1Api from kubernetes.client.api.coordination_api import CoordinationApi from kubernetes.client.api.coordination_v1_api import CoordinationV1Api +from kubernetes.client.api.coordination_v1alpha2_api import CoordinationV1alpha2Api +from kubernetes.client.api.coordination_v1beta1_api import CoordinationV1beta1Api from kubernetes.client.api.core_api import CoreApi from kubernetes.client.api.core_v1_api import CoreV1Api from kubernetes.client.api.custom_objects_api import CustomObjectsApi @@ -54,13 +55,12 @@ from kubernetes.client.api.events_v1_api import EventsV1Api from kubernetes.client.api.flowcontrol_apiserver_api import FlowcontrolApiserverApi from kubernetes.client.api.flowcontrol_apiserver_v1_api import FlowcontrolApiserverV1Api -from kubernetes.client.api.flowcontrol_apiserver_v1beta3_api import FlowcontrolApiserverV1beta3Api from kubernetes.client.api.internal_apiserver_api import InternalApiserverApi from kubernetes.client.api.internal_apiserver_v1alpha1_api import InternalApiserverV1alpha1Api from kubernetes.client.api.logs_api import LogsApi from kubernetes.client.api.networking_api import NetworkingApi from kubernetes.client.api.networking_v1_api import NetworkingV1Api -from kubernetes.client.api.networking_v1alpha1_api import NetworkingV1alpha1Api +from kubernetes.client.api.networking_v1beta1_api import NetworkingV1beta1Api from kubernetes.client.api.node_api import NodeApi from kubernetes.client.api.node_v1_api import NodeV1Api from kubernetes.client.api.openid_api import OpenidApi @@ -69,14 +69,18 @@ from kubernetes.client.api.rbac_authorization_api import RbacAuthorizationApi from kubernetes.client.api.rbac_authorization_v1_api import RbacAuthorizationV1Api from kubernetes.client.api.resource_api import ResourceApi -from kubernetes.client.api.resource_v1alpha2_api import ResourceV1alpha2Api +from kubernetes.client.api.resource_v1_api import ResourceV1Api +from kubernetes.client.api.resource_v1alpha3_api import ResourceV1alpha3Api +from kubernetes.client.api.resource_v1beta1_api import ResourceV1beta1Api +from kubernetes.client.api.resource_v1beta2_api import ResourceV1beta2Api from kubernetes.client.api.scheduling_api import SchedulingApi from kubernetes.client.api.scheduling_v1_api import SchedulingV1Api +from kubernetes.client.api.scheduling_v1alpha1_api import SchedulingV1alpha1Api from kubernetes.client.api.storage_api import StorageApi from kubernetes.client.api.storage_v1_api import StorageV1Api -from kubernetes.client.api.storage_v1alpha1_api import StorageV1alpha1Api +from kubernetes.client.api.storage_v1beta1_api import StorageV1beta1Api from kubernetes.client.api.storagemigration_api import StoragemigrationApi -from kubernetes.client.api.storagemigration_v1alpha1_api import StoragemigrationV1alpha1Api +from kubernetes.client.api.storagemigration_v1beta1_api import StoragemigrationV1beta1Api from kubernetes.client.api.version_api import VersionApi # import ApiClient @@ -86,6 +90,7 @@ from kubernetes.client.exceptions import ApiTypeError from kubernetes.client.exceptions import ApiValueError from kubernetes.client.exceptions import ApiKeyError +from kubernetes.client.exceptions import ApiAttributeError from kubernetes.client.exceptions import ApiException # import models into sdk package from kubernetes.client.models.admissionregistration_v1_service_reference import AdmissionregistrationV1ServiceReference @@ -98,12 +103,14 @@ from kubernetes.client.models.core_v1_event import CoreV1Event from kubernetes.client.models.core_v1_event_list import CoreV1EventList from kubernetes.client.models.core_v1_event_series import CoreV1EventSeries +from kubernetes.client.models.core_v1_resource_claim import CoreV1ResourceClaim from kubernetes.client.models.discovery_v1_endpoint_port import DiscoveryV1EndpointPort from kubernetes.client.models.events_v1_event import EventsV1Event from kubernetes.client.models.events_v1_event_list import EventsV1EventList from kubernetes.client.models.events_v1_event_series import EventsV1EventSeries from kubernetes.client.models.flowcontrol_v1_subject import FlowcontrolV1Subject from kubernetes.client.models.rbac_v1_subject import RbacV1Subject +from kubernetes.client.models.resource_v1_resource_claim import ResourceV1ResourceClaim from kubernetes.client.models.storage_v1_token_request import StorageV1TokenRequest from kubernetes.client.models.v1_api_group import V1APIGroup from kubernetes.client.models.v1_api_group_list import V1APIGroupList @@ -118,6 +125,8 @@ from kubernetes.client.models.v1_aws_elastic_block_store_volume_source import V1AWSElasticBlockStoreVolumeSource from kubernetes.client.models.v1_affinity import V1Affinity from kubernetes.client.models.v1_aggregation_rule import V1AggregationRule +from kubernetes.client.models.v1_allocated_device_status import V1AllocatedDeviceStatus +from kubernetes.client.models.v1_allocation_result import V1AllocationResult from kubernetes.client.models.v1_app_armor_profile import V1AppArmorProfile from kubernetes.client.models.v1_attached_volume import V1AttachedVolume from kubernetes.client.models.v1_audit_annotation import V1AuditAnnotation @@ -126,6 +135,7 @@ from kubernetes.client.models.v1_azure_file_volume_source import V1AzureFileVolumeSource from kubernetes.client.models.v1_binding import V1Binding from kubernetes.client.models.v1_bound_object_reference import V1BoundObjectReference +from kubernetes.client.models.v1_cel_device_selector import V1CELDeviceSelector from kubernetes.client.models.v1_csi_driver import V1CSIDriver from kubernetes.client.models.v1_csi_driver_list import V1CSIDriverList from kubernetes.client.models.v1_csi_driver_spec import V1CSIDriverSpec @@ -138,6 +148,9 @@ from kubernetes.client.models.v1_csi_storage_capacity_list import V1CSIStorageCapacityList from kubernetes.client.models.v1_csi_volume_source import V1CSIVolumeSource from kubernetes.client.models.v1_capabilities import V1Capabilities +from kubernetes.client.models.v1_capacity_request_policy import V1CapacityRequestPolicy +from kubernetes.client.models.v1_capacity_request_policy_range import V1CapacityRequestPolicyRange +from kubernetes.client.models.v1_capacity_requirements import V1CapacityRequirements from kubernetes.client.models.v1_ceph_fs_persistent_volume_source import V1CephFSPersistentVolumeSource from kubernetes.client.models.v1_ceph_fs_volume_source import V1CephFSVolumeSource from kubernetes.client.models.v1_certificate_signing_request import V1CertificateSigningRequest @@ -147,7 +160,6 @@ from kubernetes.client.models.v1_certificate_signing_request_status import V1CertificateSigningRequestStatus from kubernetes.client.models.v1_cinder_persistent_volume_source import V1CinderPersistentVolumeSource from kubernetes.client.models.v1_cinder_volume_source import V1CinderVolumeSource -from kubernetes.client.models.v1_claim_source import V1ClaimSource from kubernetes.client.models.v1_client_ip_config import V1ClientIPConfig from kubernetes.client.models.v1_cluster_role import V1ClusterRole from kubernetes.client.models.v1_cluster_role_binding import V1ClusterRoleBinding @@ -166,16 +178,22 @@ from kubernetes.client.models.v1_config_map_projection import V1ConfigMapProjection from kubernetes.client.models.v1_config_map_volume_source import V1ConfigMapVolumeSource from kubernetes.client.models.v1_container import V1Container +from kubernetes.client.models.v1_container_extended_resource_request import V1ContainerExtendedResourceRequest from kubernetes.client.models.v1_container_image import V1ContainerImage from kubernetes.client.models.v1_container_port import V1ContainerPort from kubernetes.client.models.v1_container_resize_policy import V1ContainerResizePolicy +from kubernetes.client.models.v1_container_restart_rule import V1ContainerRestartRule +from kubernetes.client.models.v1_container_restart_rule_on_exit_codes import V1ContainerRestartRuleOnExitCodes from kubernetes.client.models.v1_container_state import V1ContainerState from kubernetes.client.models.v1_container_state_running import V1ContainerStateRunning from kubernetes.client.models.v1_container_state_terminated import V1ContainerStateTerminated from kubernetes.client.models.v1_container_state_waiting import V1ContainerStateWaiting from kubernetes.client.models.v1_container_status import V1ContainerStatus +from kubernetes.client.models.v1_container_user import V1ContainerUser from kubernetes.client.models.v1_controller_revision import V1ControllerRevision from kubernetes.client.models.v1_controller_revision_list import V1ControllerRevisionList +from kubernetes.client.models.v1_counter import V1Counter +from kubernetes.client.models.v1_counter_set import V1CounterSet from kubernetes.client.models.v1_cron_job import V1CronJob from kubernetes.client.models.v1_cron_job_list import V1CronJobList from kubernetes.client.models.v1_cron_job_spec import V1CronJobSpec @@ -207,6 +225,25 @@ from kubernetes.client.models.v1_deployment_spec import V1DeploymentSpec from kubernetes.client.models.v1_deployment_status import V1DeploymentStatus from kubernetes.client.models.v1_deployment_strategy import V1DeploymentStrategy +from kubernetes.client.models.v1_device import V1Device +from kubernetes.client.models.v1_device_allocation_configuration import V1DeviceAllocationConfiguration +from kubernetes.client.models.v1_device_allocation_result import V1DeviceAllocationResult +from kubernetes.client.models.v1_device_attribute import V1DeviceAttribute +from kubernetes.client.models.v1_device_capacity import V1DeviceCapacity +from kubernetes.client.models.v1_device_claim import V1DeviceClaim +from kubernetes.client.models.v1_device_claim_configuration import V1DeviceClaimConfiguration +from kubernetes.client.models.v1_device_class import V1DeviceClass +from kubernetes.client.models.v1_device_class_configuration import V1DeviceClassConfiguration +from kubernetes.client.models.v1_device_class_list import V1DeviceClassList +from kubernetes.client.models.v1_device_class_spec import V1DeviceClassSpec +from kubernetes.client.models.v1_device_constraint import V1DeviceConstraint +from kubernetes.client.models.v1_device_counter_consumption import V1DeviceCounterConsumption +from kubernetes.client.models.v1_device_request import V1DeviceRequest +from kubernetes.client.models.v1_device_request_allocation_result import V1DeviceRequestAllocationResult +from kubernetes.client.models.v1_device_selector import V1DeviceSelector +from kubernetes.client.models.v1_device_sub_request import V1DeviceSubRequest +from kubernetes.client.models.v1_device_taint import V1DeviceTaint +from kubernetes.client.models.v1_device_toleration import V1DeviceToleration from kubernetes.client.models.v1_downward_api_projection import V1DownwardAPIProjection from kubernetes.client.models.v1_downward_api_volume_file import V1DownwardAPIVolumeFile from kubernetes.client.models.v1_downward_api_volume_source import V1DownwardAPIVolumeSource @@ -227,11 +264,15 @@ from kubernetes.client.models.v1_ephemeral_volume_source import V1EphemeralVolumeSource from kubernetes.client.models.v1_event_source import V1EventSource from kubernetes.client.models.v1_eviction import V1Eviction +from kubernetes.client.models.v1_exact_device_request import V1ExactDeviceRequest from kubernetes.client.models.v1_exec_action import V1ExecAction from kubernetes.client.models.v1_exempt_priority_level_configuration import V1ExemptPriorityLevelConfiguration from kubernetes.client.models.v1_expression_warning import V1ExpressionWarning from kubernetes.client.models.v1_external_documentation import V1ExternalDocumentation from kubernetes.client.models.v1_fc_volume_source import V1FCVolumeSource +from kubernetes.client.models.v1_field_selector_attributes import V1FieldSelectorAttributes +from kubernetes.client.models.v1_field_selector_requirement import V1FieldSelectorRequirement +from kubernetes.client.models.v1_file_key_selector import V1FileKeySelector from kubernetes.client.models.v1_flex_persistent_volume_source import V1FlexPersistentVolumeSource from kubernetes.client.models.v1_flex_volume_source import V1FlexVolumeSource from kubernetes.client.models.v1_flocker_volume_source import V1FlockerVolumeSource @@ -241,12 +282,14 @@ from kubernetes.client.models.v1_flow_schema_list import V1FlowSchemaList from kubernetes.client.models.v1_flow_schema_spec import V1FlowSchemaSpec from kubernetes.client.models.v1_flow_schema_status import V1FlowSchemaStatus +from kubernetes.client.models.v1_for_node import V1ForNode from kubernetes.client.models.v1_for_zone import V1ForZone from kubernetes.client.models.v1_gce_persistent_disk_volume_source import V1GCEPersistentDiskVolumeSource from kubernetes.client.models.v1_grpc_action import V1GRPCAction from kubernetes.client.models.v1_git_repo_volume_source import V1GitRepoVolumeSource from kubernetes.client.models.v1_glusterfs_persistent_volume_source import V1GlusterfsPersistentVolumeSource from kubernetes.client.models.v1_glusterfs_volume_source import V1GlusterfsVolumeSource +from kubernetes.client.models.v1_group_resource import V1GroupResource from kubernetes.client.models.v1_group_subject import V1GroupSubject from kubernetes.client.models.v1_group_version_for_discovery import V1GroupVersionForDiscovery from kubernetes.client.models.v1_http_get_action import V1HTTPGetAction @@ -260,9 +303,13 @@ from kubernetes.client.models.v1_host_alias import V1HostAlias from kubernetes.client.models.v1_host_ip import V1HostIP from kubernetes.client.models.v1_host_path_volume_source import V1HostPathVolumeSource +from kubernetes.client.models.v1_ip_address import V1IPAddress +from kubernetes.client.models.v1_ip_address_list import V1IPAddressList +from kubernetes.client.models.v1_ip_address_spec import V1IPAddressSpec from kubernetes.client.models.v1_ip_block import V1IPBlock from kubernetes.client.models.v1_iscsi_persistent_volume_source import V1ISCSIPersistentVolumeSource from kubernetes.client.models.v1_iscsi_volume_source import V1ISCSIVolumeSource +from kubernetes.client.models.v1_image_volume_source import V1ImageVolumeSource from kubernetes.client.models.v1_ingress import V1Ingress from kubernetes.client.models.v1_ingress_backend import V1IngressBackend from kubernetes.client.models.v1_ingress_class import V1IngressClass @@ -287,6 +334,7 @@ from kubernetes.client.models.v1_job_template_spec import V1JobTemplateSpec from kubernetes.client.models.v1_key_to_path import V1KeyToPath from kubernetes.client.models.v1_label_selector import V1LabelSelector +from kubernetes.client.models.v1_label_selector_attributes import V1LabelSelectorAttributes from kubernetes.client.models.v1_label_selector_requirement import V1LabelSelectorRequirement from kubernetes.client.models.v1_lease import V1Lease from kubernetes.client.models.v1_lease_list import V1LeaseList @@ -299,6 +347,7 @@ from kubernetes.client.models.v1_limit_range_spec import V1LimitRangeSpec from kubernetes.client.models.v1_limit_response import V1LimitResponse from kubernetes.client.models.v1_limited_priority_level_configuration import V1LimitedPriorityLevelConfiguration +from kubernetes.client.models.v1_linux_container_user import V1LinuxContainerUser from kubernetes.client.models.v1_list_meta import V1ListMeta from kubernetes.client.models.v1_load_balancer_ingress import V1LoadBalancerIngress from kubernetes.client.models.v1_load_balancer_status import V1LoadBalancerStatus @@ -319,6 +368,7 @@ from kubernetes.client.models.v1_namespace_list import V1NamespaceList from kubernetes.client.models.v1_namespace_spec import V1NamespaceSpec from kubernetes.client.models.v1_namespace_status import V1NamespaceStatus +from kubernetes.client.models.v1_network_device_data import V1NetworkDeviceData from kubernetes.client.models.v1_network_policy import V1NetworkPolicy from kubernetes.client.models.v1_network_policy_egress_rule import V1NetworkPolicyEgressRule from kubernetes.client.models.v1_network_policy_ingress_rule import V1NetworkPolicyIngressRule @@ -333,6 +383,7 @@ from kubernetes.client.models.v1_node_config_source import V1NodeConfigSource from kubernetes.client.models.v1_node_config_status import V1NodeConfigStatus from kubernetes.client.models.v1_node_daemon_endpoints import V1NodeDaemonEndpoints +from kubernetes.client.models.v1_node_features import V1NodeFeatures from kubernetes.client.models.v1_node_list import V1NodeList from kubernetes.client.models.v1_node_runtime_handler import V1NodeRuntimeHandler from kubernetes.client.models.v1_node_runtime_handler_features import V1NodeRuntimeHandlerFeatures @@ -341,6 +392,7 @@ from kubernetes.client.models.v1_node_selector_term import V1NodeSelectorTerm from kubernetes.client.models.v1_node_spec import V1NodeSpec from kubernetes.client.models.v1_node_status import V1NodeStatus +from kubernetes.client.models.v1_node_swap_status import V1NodeSwapStatus from kubernetes.client.models.v1_node_system_info import V1NodeSystemInfo from kubernetes.client.models.v1_non_resource_attributes import V1NonResourceAttributes from kubernetes.client.models.v1_non_resource_policy_rule import V1NonResourcePolicyRule @@ -348,10 +400,12 @@ from kubernetes.client.models.v1_object_field_selector import V1ObjectFieldSelector from kubernetes.client.models.v1_object_meta import V1ObjectMeta from kubernetes.client.models.v1_object_reference import V1ObjectReference +from kubernetes.client.models.v1_opaque_device_configuration import V1OpaqueDeviceConfiguration from kubernetes.client.models.v1_overhead import V1Overhead from kubernetes.client.models.v1_owner_reference import V1OwnerReference from kubernetes.client.models.v1_param_kind import V1ParamKind from kubernetes.client.models.v1_param_ref import V1ParamRef +from kubernetes.client.models.v1_parent_reference import V1ParentReference from kubernetes.client.models.v1_persistent_volume import V1PersistentVolume from kubernetes.client.models.v1_persistent_volume_claim import V1PersistentVolumeClaim from kubernetes.client.models.v1_persistent_volume_claim_condition import V1PersistentVolumeClaimCondition @@ -368,6 +422,7 @@ from kubernetes.client.models.v1_pod_affinity import V1PodAffinity from kubernetes.client.models.v1_pod_affinity_term import V1PodAffinityTerm from kubernetes.client.models.v1_pod_anti_affinity import V1PodAntiAffinity +from kubernetes.client.models.v1_pod_certificate_projection import V1PodCertificateProjection from kubernetes.client.models.v1_pod_condition import V1PodCondition from kubernetes.client.models.v1_pod_dns_config import V1PodDNSConfig from kubernetes.client.models.v1_pod_dns_config_option import V1PodDNSConfigOption @@ -375,6 +430,7 @@ from kubernetes.client.models.v1_pod_disruption_budget_list import V1PodDisruptionBudgetList from kubernetes.client.models.v1_pod_disruption_budget_spec import V1PodDisruptionBudgetSpec from kubernetes.client.models.v1_pod_disruption_budget_status import V1PodDisruptionBudgetStatus +from kubernetes.client.models.v1_pod_extended_resource_claim_status import V1PodExtendedResourceClaimStatus from kubernetes.client.models.v1_pod_failure_policy import V1PodFailurePolicy from kubernetes.client.models.v1_pod_failure_policy_on_exit_codes_requirement import V1PodFailurePolicyOnExitCodesRequirement from kubernetes.client.models.v1_pod_failure_policy_on_pod_conditions_pattern import V1PodFailurePolicyOnPodConditionsPattern @@ -423,15 +479,27 @@ from kubernetes.client.models.v1_replication_controller_spec import V1ReplicationControllerSpec from kubernetes.client.models.v1_replication_controller_status import V1ReplicationControllerStatus from kubernetes.client.models.v1_resource_attributes import V1ResourceAttributes -from kubernetes.client.models.v1_resource_claim import V1ResourceClaim +from kubernetes.client.models.v1_resource_claim_consumer_reference import V1ResourceClaimConsumerReference +from kubernetes.client.models.v1_resource_claim_list import V1ResourceClaimList +from kubernetes.client.models.v1_resource_claim_spec import V1ResourceClaimSpec +from kubernetes.client.models.v1_resource_claim_status import V1ResourceClaimStatus +from kubernetes.client.models.v1_resource_claim_template import V1ResourceClaimTemplate +from kubernetes.client.models.v1_resource_claim_template_list import V1ResourceClaimTemplateList +from kubernetes.client.models.v1_resource_claim_template_spec import V1ResourceClaimTemplateSpec from kubernetes.client.models.v1_resource_field_selector import V1ResourceFieldSelector +from kubernetes.client.models.v1_resource_health import V1ResourceHealth from kubernetes.client.models.v1_resource_policy_rule import V1ResourcePolicyRule +from kubernetes.client.models.v1_resource_pool import V1ResourcePool from kubernetes.client.models.v1_resource_quota import V1ResourceQuota from kubernetes.client.models.v1_resource_quota_list import V1ResourceQuotaList from kubernetes.client.models.v1_resource_quota_spec import V1ResourceQuotaSpec from kubernetes.client.models.v1_resource_quota_status import V1ResourceQuotaStatus from kubernetes.client.models.v1_resource_requirements import V1ResourceRequirements from kubernetes.client.models.v1_resource_rule import V1ResourceRule +from kubernetes.client.models.v1_resource_slice import V1ResourceSlice +from kubernetes.client.models.v1_resource_slice_list import V1ResourceSliceList +from kubernetes.client.models.v1_resource_slice_spec import V1ResourceSliceSpec +from kubernetes.client.models.v1_resource_status import V1ResourceStatus from kubernetes.client.models.v1_role import V1Role from kubernetes.client.models.v1_role_binding import V1RoleBinding from kubernetes.client.models.v1_role_binding_list import V1RoleBindingList @@ -475,6 +543,10 @@ from kubernetes.client.models.v1_service_account_subject import V1ServiceAccountSubject from kubernetes.client.models.v1_service_account_token_projection import V1ServiceAccountTokenProjection from kubernetes.client.models.v1_service_backend_port import V1ServiceBackendPort +from kubernetes.client.models.v1_service_cidr import V1ServiceCIDR +from kubernetes.client.models.v1_service_cidr_list import V1ServiceCIDRList +from kubernetes.client.models.v1_service_cidr_spec import V1ServiceCIDRSpec +from kubernetes.client.models.v1_service_cidr_status import V1ServiceCIDRStatus from kubernetes.client.models.v1_service_list import V1ServiceList from kubernetes.client.models.v1_service_port import V1ServicePort from kubernetes.client.models.v1_service_spec import V1ServiceSpec @@ -539,6 +611,8 @@ from kubernetes.client.models.v1_volume_attachment_source import V1VolumeAttachmentSource from kubernetes.client.models.v1_volume_attachment_spec import V1VolumeAttachmentSpec from kubernetes.client.models.v1_volume_attachment_status import V1VolumeAttachmentStatus +from kubernetes.client.models.v1_volume_attributes_class import V1VolumeAttributesClass +from kubernetes.client.models.v1_volume_attributes_class_list import V1VolumeAttributesClassList from kubernetes.client.models.v1_volume_device import V1VolumeDevice from kubernetes.client.models.v1_volume_error import V1VolumeError from kubernetes.client.models.v1_volume_mount import V1VolumeMount @@ -552,130 +626,174 @@ from kubernetes.client.models.v1_webhook_conversion import V1WebhookConversion from kubernetes.client.models.v1_weighted_pod_affinity_term import V1WeightedPodAffinityTerm from kubernetes.client.models.v1_windows_security_context_options import V1WindowsSecurityContextOptions -from kubernetes.client.models.v1alpha1_audit_annotation import V1alpha1AuditAnnotation +from kubernetes.client.models.v1_workload_reference import V1WorkloadReference +from kubernetes.client.models.v1alpha1_apply_configuration import V1alpha1ApplyConfiguration from kubernetes.client.models.v1alpha1_cluster_trust_bundle import V1alpha1ClusterTrustBundle from kubernetes.client.models.v1alpha1_cluster_trust_bundle_list import V1alpha1ClusterTrustBundleList from kubernetes.client.models.v1alpha1_cluster_trust_bundle_spec import V1alpha1ClusterTrustBundleSpec -from kubernetes.client.models.v1alpha1_expression_warning import V1alpha1ExpressionWarning -from kubernetes.client.models.v1alpha1_group_version_resource import V1alpha1GroupVersionResource -from kubernetes.client.models.v1alpha1_ip_address import V1alpha1IPAddress -from kubernetes.client.models.v1alpha1_ip_address_list import V1alpha1IPAddressList -from kubernetes.client.models.v1alpha1_ip_address_spec import V1alpha1IPAddressSpec +from kubernetes.client.models.v1alpha1_gang_scheduling_policy import V1alpha1GangSchedulingPolicy +from kubernetes.client.models.v1alpha1_json_patch import V1alpha1JSONPatch from kubernetes.client.models.v1alpha1_match_condition import V1alpha1MatchCondition from kubernetes.client.models.v1alpha1_match_resources import V1alpha1MatchResources -from kubernetes.client.models.v1alpha1_migration_condition import V1alpha1MigrationCondition +from kubernetes.client.models.v1alpha1_mutating_admission_policy import V1alpha1MutatingAdmissionPolicy +from kubernetes.client.models.v1alpha1_mutating_admission_policy_binding import V1alpha1MutatingAdmissionPolicyBinding +from kubernetes.client.models.v1alpha1_mutating_admission_policy_binding_list import V1alpha1MutatingAdmissionPolicyBindingList +from kubernetes.client.models.v1alpha1_mutating_admission_policy_binding_spec import V1alpha1MutatingAdmissionPolicyBindingSpec +from kubernetes.client.models.v1alpha1_mutating_admission_policy_list import V1alpha1MutatingAdmissionPolicyList +from kubernetes.client.models.v1alpha1_mutating_admission_policy_spec import V1alpha1MutatingAdmissionPolicySpec +from kubernetes.client.models.v1alpha1_mutation import V1alpha1Mutation from kubernetes.client.models.v1alpha1_named_rule_with_operations import V1alpha1NamedRuleWithOperations from kubernetes.client.models.v1alpha1_param_kind import V1alpha1ParamKind from kubernetes.client.models.v1alpha1_param_ref import V1alpha1ParamRef -from kubernetes.client.models.v1alpha1_parent_reference import V1alpha1ParentReference -from kubernetes.client.models.v1alpha1_self_subject_review import V1alpha1SelfSubjectReview -from kubernetes.client.models.v1alpha1_self_subject_review_status import V1alpha1SelfSubjectReviewStatus +from kubernetes.client.models.v1alpha1_pod_group import V1alpha1PodGroup +from kubernetes.client.models.v1alpha1_pod_group_policy import V1alpha1PodGroupPolicy from kubernetes.client.models.v1alpha1_server_storage_version import V1alpha1ServerStorageVersion -from kubernetes.client.models.v1alpha1_service_cidr import V1alpha1ServiceCIDR -from kubernetes.client.models.v1alpha1_service_cidr_list import V1alpha1ServiceCIDRList -from kubernetes.client.models.v1alpha1_service_cidr_spec import V1alpha1ServiceCIDRSpec -from kubernetes.client.models.v1alpha1_service_cidr_status import V1alpha1ServiceCIDRStatus from kubernetes.client.models.v1alpha1_storage_version import V1alpha1StorageVersion from kubernetes.client.models.v1alpha1_storage_version_condition import V1alpha1StorageVersionCondition from kubernetes.client.models.v1alpha1_storage_version_list import V1alpha1StorageVersionList -from kubernetes.client.models.v1alpha1_storage_version_migration import V1alpha1StorageVersionMigration -from kubernetes.client.models.v1alpha1_storage_version_migration_list import V1alpha1StorageVersionMigrationList -from kubernetes.client.models.v1alpha1_storage_version_migration_spec import V1alpha1StorageVersionMigrationSpec -from kubernetes.client.models.v1alpha1_storage_version_migration_status import V1alpha1StorageVersionMigrationStatus from kubernetes.client.models.v1alpha1_storage_version_status import V1alpha1StorageVersionStatus -from kubernetes.client.models.v1alpha1_type_checking import V1alpha1TypeChecking -from kubernetes.client.models.v1alpha1_validating_admission_policy import V1alpha1ValidatingAdmissionPolicy -from kubernetes.client.models.v1alpha1_validating_admission_policy_binding import V1alpha1ValidatingAdmissionPolicyBinding -from kubernetes.client.models.v1alpha1_validating_admission_policy_binding_list import V1alpha1ValidatingAdmissionPolicyBindingList -from kubernetes.client.models.v1alpha1_validating_admission_policy_binding_spec import V1alpha1ValidatingAdmissionPolicyBindingSpec -from kubernetes.client.models.v1alpha1_validating_admission_policy_list import V1alpha1ValidatingAdmissionPolicyList -from kubernetes.client.models.v1alpha1_validating_admission_policy_spec import V1alpha1ValidatingAdmissionPolicySpec -from kubernetes.client.models.v1alpha1_validating_admission_policy_status import V1alpha1ValidatingAdmissionPolicyStatus -from kubernetes.client.models.v1alpha1_validation import V1alpha1Validation +from kubernetes.client.models.v1alpha1_typed_local_object_reference import V1alpha1TypedLocalObjectReference from kubernetes.client.models.v1alpha1_variable import V1alpha1Variable -from kubernetes.client.models.v1alpha1_volume_attributes_class import V1alpha1VolumeAttributesClass -from kubernetes.client.models.v1alpha1_volume_attributes_class_list import V1alpha1VolumeAttributesClassList -from kubernetes.client.models.v1alpha2_allocation_result import V1alpha2AllocationResult -from kubernetes.client.models.v1alpha2_driver_allocation_result import V1alpha2DriverAllocationResult -from kubernetes.client.models.v1alpha2_driver_requests import V1alpha2DriverRequests -from kubernetes.client.models.v1alpha2_named_resources_allocation_result import V1alpha2NamedResourcesAllocationResult -from kubernetes.client.models.v1alpha2_named_resources_attribute import V1alpha2NamedResourcesAttribute -from kubernetes.client.models.v1alpha2_named_resources_filter import V1alpha2NamedResourcesFilter -from kubernetes.client.models.v1alpha2_named_resources_instance import V1alpha2NamedResourcesInstance -from kubernetes.client.models.v1alpha2_named_resources_int_slice import V1alpha2NamedResourcesIntSlice -from kubernetes.client.models.v1alpha2_named_resources_request import V1alpha2NamedResourcesRequest -from kubernetes.client.models.v1alpha2_named_resources_resources import V1alpha2NamedResourcesResources -from kubernetes.client.models.v1alpha2_named_resources_string_slice import V1alpha2NamedResourcesStringSlice -from kubernetes.client.models.v1alpha2_pod_scheduling_context import V1alpha2PodSchedulingContext -from kubernetes.client.models.v1alpha2_pod_scheduling_context_list import V1alpha2PodSchedulingContextList -from kubernetes.client.models.v1alpha2_pod_scheduling_context_spec import V1alpha2PodSchedulingContextSpec -from kubernetes.client.models.v1alpha2_pod_scheduling_context_status import V1alpha2PodSchedulingContextStatus -from kubernetes.client.models.v1alpha2_resource_claim import V1alpha2ResourceClaim -from kubernetes.client.models.v1alpha2_resource_claim_consumer_reference import V1alpha2ResourceClaimConsumerReference -from kubernetes.client.models.v1alpha2_resource_claim_list import V1alpha2ResourceClaimList -from kubernetes.client.models.v1alpha2_resource_claim_parameters import V1alpha2ResourceClaimParameters -from kubernetes.client.models.v1alpha2_resource_claim_parameters_list import V1alpha2ResourceClaimParametersList -from kubernetes.client.models.v1alpha2_resource_claim_parameters_reference import V1alpha2ResourceClaimParametersReference -from kubernetes.client.models.v1alpha2_resource_claim_scheduling_status import V1alpha2ResourceClaimSchedulingStatus -from kubernetes.client.models.v1alpha2_resource_claim_spec import V1alpha2ResourceClaimSpec -from kubernetes.client.models.v1alpha2_resource_claim_status import V1alpha2ResourceClaimStatus -from kubernetes.client.models.v1alpha2_resource_claim_template import V1alpha2ResourceClaimTemplate -from kubernetes.client.models.v1alpha2_resource_claim_template_list import V1alpha2ResourceClaimTemplateList -from kubernetes.client.models.v1alpha2_resource_claim_template_spec import V1alpha2ResourceClaimTemplateSpec -from kubernetes.client.models.v1alpha2_resource_class import V1alpha2ResourceClass -from kubernetes.client.models.v1alpha2_resource_class_list import V1alpha2ResourceClassList -from kubernetes.client.models.v1alpha2_resource_class_parameters import V1alpha2ResourceClassParameters -from kubernetes.client.models.v1alpha2_resource_class_parameters_list import V1alpha2ResourceClassParametersList -from kubernetes.client.models.v1alpha2_resource_class_parameters_reference import V1alpha2ResourceClassParametersReference -from kubernetes.client.models.v1alpha2_resource_filter import V1alpha2ResourceFilter -from kubernetes.client.models.v1alpha2_resource_handle import V1alpha2ResourceHandle -from kubernetes.client.models.v1alpha2_resource_request import V1alpha2ResourceRequest -from kubernetes.client.models.v1alpha2_resource_slice import V1alpha2ResourceSlice -from kubernetes.client.models.v1alpha2_resource_slice_list import V1alpha2ResourceSliceList -from kubernetes.client.models.v1alpha2_structured_resource_handle import V1alpha2StructuredResourceHandle -from kubernetes.client.models.v1alpha2_vendor_parameters import V1alpha2VendorParameters -from kubernetes.client.models.v1beta1_audit_annotation import V1beta1AuditAnnotation -from kubernetes.client.models.v1beta1_expression_warning import V1beta1ExpressionWarning +from kubernetes.client.models.v1alpha1_workload import V1alpha1Workload +from kubernetes.client.models.v1alpha1_workload_list import V1alpha1WorkloadList +from kubernetes.client.models.v1alpha1_workload_spec import V1alpha1WorkloadSpec +from kubernetes.client.models.v1alpha2_lease_candidate import V1alpha2LeaseCandidate +from kubernetes.client.models.v1alpha2_lease_candidate_list import V1alpha2LeaseCandidateList +from kubernetes.client.models.v1alpha2_lease_candidate_spec import V1alpha2LeaseCandidateSpec +from kubernetes.client.models.v1alpha3_device_taint import V1alpha3DeviceTaint +from kubernetes.client.models.v1alpha3_device_taint_rule import V1alpha3DeviceTaintRule +from kubernetes.client.models.v1alpha3_device_taint_rule_list import V1alpha3DeviceTaintRuleList +from kubernetes.client.models.v1alpha3_device_taint_rule_spec import V1alpha3DeviceTaintRuleSpec +from kubernetes.client.models.v1alpha3_device_taint_rule_status import V1alpha3DeviceTaintRuleStatus +from kubernetes.client.models.v1alpha3_device_taint_selector import V1alpha3DeviceTaintSelector +from kubernetes.client.models.v1beta1_allocated_device_status import V1beta1AllocatedDeviceStatus +from kubernetes.client.models.v1beta1_allocation_result import V1beta1AllocationResult +from kubernetes.client.models.v1beta1_apply_configuration import V1beta1ApplyConfiguration +from kubernetes.client.models.v1beta1_basic_device import V1beta1BasicDevice +from kubernetes.client.models.v1beta1_cel_device_selector import V1beta1CELDeviceSelector +from kubernetes.client.models.v1beta1_capacity_request_policy import V1beta1CapacityRequestPolicy +from kubernetes.client.models.v1beta1_capacity_request_policy_range import V1beta1CapacityRequestPolicyRange +from kubernetes.client.models.v1beta1_capacity_requirements import V1beta1CapacityRequirements +from kubernetes.client.models.v1beta1_cluster_trust_bundle import V1beta1ClusterTrustBundle +from kubernetes.client.models.v1beta1_cluster_trust_bundle_list import V1beta1ClusterTrustBundleList +from kubernetes.client.models.v1beta1_cluster_trust_bundle_spec import V1beta1ClusterTrustBundleSpec +from kubernetes.client.models.v1beta1_counter import V1beta1Counter +from kubernetes.client.models.v1beta1_counter_set import V1beta1CounterSet +from kubernetes.client.models.v1beta1_device import V1beta1Device +from kubernetes.client.models.v1beta1_device_allocation_configuration import V1beta1DeviceAllocationConfiguration +from kubernetes.client.models.v1beta1_device_allocation_result import V1beta1DeviceAllocationResult +from kubernetes.client.models.v1beta1_device_attribute import V1beta1DeviceAttribute +from kubernetes.client.models.v1beta1_device_capacity import V1beta1DeviceCapacity +from kubernetes.client.models.v1beta1_device_claim import V1beta1DeviceClaim +from kubernetes.client.models.v1beta1_device_claim_configuration import V1beta1DeviceClaimConfiguration +from kubernetes.client.models.v1beta1_device_class import V1beta1DeviceClass +from kubernetes.client.models.v1beta1_device_class_configuration import V1beta1DeviceClassConfiguration +from kubernetes.client.models.v1beta1_device_class_list import V1beta1DeviceClassList +from kubernetes.client.models.v1beta1_device_class_spec import V1beta1DeviceClassSpec +from kubernetes.client.models.v1beta1_device_constraint import V1beta1DeviceConstraint +from kubernetes.client.models.v1beta1_device_counter_consumption import V1beta1DeviceCounterConsumption +from kubernetes.client.models.v1beta1_device_request import V1beta1DeviceRequest +from kubernetes.client.models.v1beta1_device_request_allocation_result import V1beta1DeviceRequestAllocationResult +from kubernetes.client.models.v1beta1_device_selector import V1beta1DeviceSelector +from kubernetes.client.models.v1beta1_device_sub_request import V1beta1DeviceSubRequest +from kubernetes.client.models.v1beta1_device_taint import V1beta1DeviceTaint +from kubernetes.client.models.v1beta1_device_toleration import V1beta1DeviceToleration +from kubernetes.client.models.v1beta1_ip_address import V1beta1IPAddress +from kubernetes.client.models.v1beta1_ip_address_list import V1beta1IPAddressList +from kubernetes.client.models.v1beta1_ip_address_spec import V1beta1IPAddressSpec +from kubernetes.client.models.v1beta1_json_patch import V1beta1JSONPatch +from kubernetes.client.models.v1beta1_lease_candidate import V1beta1LeaseCandidate +from kubernetes.client.models.v1beta1_lease_candidate_list import V1beta1LeaseCandidateList +from kubernetes.client.models.v1beta1_lease_candidate_spec import V1beta1LeaseCandidateSpec from kubernetes.client.models.v1beta1_match_condition import V1beta1MatchCondition from kubernetes.client.models.v1beta1_match_resources import V1beta1MatchResources +from kubernetes.client.models.v1beta1_mutating_admission_policy import V1beta1MutatingAdmissionPolicy +from kubernetes.client.models.v1beta1_mutating_admission_policy_binding import V1beta1MutatingAdmissionPolicyBinding +from kubernetes.client.models.v1beta1_mutating_admission_policy_binding_list import V1beta1MutatingAdmissionPolicyBindingList +from kubernetes.client.models.v1beta1_mutating_admission_policy_binding_spec import V1beta1MutatingAdmissionPolicyBindingSpec +from kubernetes.client.models.v1beta1_mutating_admission_policy_list import V1beta1MutatingAdmissionPolicyList +from kubernetes.client.models.v1beta1_mutating_admission_policy_spec import V1beta1MutatingAdmissionPolicySpec +from kubernetes.client.models.v1beta1_mutation import V1beta1Mutation from kubernetes.client.models.v1beta1_named_rule_with_operations import V1beta1NamedRuleWithOperations +from kubernetes.client.models.v1beta1_network_device_data import V1beta1NetworkDeviceData +from kubernetes.client.models.v1beta1_opaque_device_configuration import V1beta1OpaqueDeviceConfiguration from kubernetes.client.models.v1beta1_param_kind import V1beta1ParamKind from kubernetes.client.models.v1beta1_param_ref import V1beta1ParamRef -from kubernetes.client.models.v1beta1_self_subject_review import V1beta1SelfSubjectReview -from kubernetes.client.models.v1beta1_self_subject_review_status import V1beta1SelfSubjectReviewStatus -from kubernetes.client.models.v1beta1_type_checking import V1beta1TypeChecking -from kubernetes.client.models.v1beta1_validating_admission_policy import V1beta1ValidatingAdmissionPolicy -from kubernetes.client.models.v1beta1_validating_admission_policy_binding import V1beta1ValidatingAdmissionPolicyBinding -from kubernetes.client.models.v1beta1_validating_admission_policy_binding_list import V1beta1ValidatingAdmissionPolicyBindingList -from kubernetes.client.models.v1beta1_validating_admission_policy_binding_spec import V1beta1ValidatingAdmissionPolicyBindingSpec -from kubernetes.client.models.v1beta1_validating_admission_policy_list import V1beta1ValidatingAdmissionPolicyList -from kubernetes.client.models.v1beta1_validating_admission_policy_spec import V1beta1ValidatingAdmissionPolicySpec -from kubernetes.client.models.v1beta1_validating_admission_policy_status import V1beta1ValidatingAdmissionPolicyStatus -from kubernetes.client.models.v1beta1_validation import V1beta1Validation +from kubernetes.client.models.v1beta1_parent_reference import V1beta1ParentReference +from kubernetes.client.models.v1beta1_pod_certificate_request import V1beta1PodCertificateRequest +from kubernetes.client.models.v1beta1_pod_certificate_request_list import V1beta1PodCertificateRequestList +from kubernetes.client.models.v1beta1_pod_certificate_request_spec import V1beta1PodCertificateRequestSpec +from kubernetes.client.models.v1beta1_pod_certificate_request_status import V1beta1PodCertificateRequestStatus +from kubernetes.client.models.v1beta1_resource_claim import V1beta1ResourceClaim +from kubernetes.client.models.v1beta1_resource_claim_consumer_reference import V1beta1ResourceClaimConsumerReference +from kubernetes.client.models.v1beta1_resource_claim_list import V1beta1ResourceClaimList +from kubernetes.client.models.v1beta1_resource_claim_spec import V1beta1ResourceClaimSpec +from kubernetes.client.models.v1beta1_resource_claim_status import V1beta1ResourceClaimStatus +from kubernetes.client.models.v1beta1_resource_claim_template import V1beta1ResourceClaimTemplate +from kubernetes.client.models.v1beta1_resource_claim_template_list import V1beta1ResourceClaimTemplateList +from kubernetes.client.models.v1beta1_resource_claim_template_spec import V1beta1ResourceClaimTemplateSpec +from kubernetes.client.models.v1beta1_resource_pool import V1beta1ResourcePool +from kubernetes.client.models.v1beta1_resource_slice import V1beta1ResourceSlice +from kubernetes.client.models.v1beta1_resource_slice_list import V1beta1ResourceSliceList +from kubernetes.client.models.v1beta1_resource_slice_spec import V1beta1ResourceSliceSpec +from kubernetes.client.models.v1beta1_service_cidr import V1beta1ServiceCIDR +from kubernetes.client.models.v1beta1_service_cidr_list import V1beta1ServiceCIDRList +from kubernetes.client.models.v1beta1_service_cidr_spec import V1beta1ServiceCIDRSpec +from kubernetes.client.models.v1beta1_service_cidr_status import V1beta1ServiceCIDRStatus +from kubernetes.client.models.v1beta1_storage_version_migration import V1beta1StorageVersionMigration +from kubernetes.client.models.v1beta1_storage_version_migration_list import V1beta1StorageVersionMigrationList +from kubernetes.client.models.v1beta1_storage_version_migration_spec import V1beta1StorageVersionMigrationSpec +from kubernetes.client.models.v1beta1_storage_version_migration_status import V1beta1StorageVersionMigrationStatus from kubernetes.client.models.v1beta1_variable import V1beta1Variable -from kubernetes.client.models.v1beta3_exempt_priority_level_configuration import V1beta3ExemptPriorityLevelConfiguration -from kubernetes.client.models.v1beta3_flow_distinguisher_method import V1beta3FlowDistinguisherMethod -from kubernetes.client.models.v1beta3_flow_schema import V1beta3FlowSchema -from kubernetes.client.models.v1beta3_flow_schema_condition import V1beta3FlowSchemaCondition -from kubernetes.client.models.v1beta3_flow_schema_list import V1beta3FlowSchemaList -from kubernetes.client.models.v1beta3_flow_schema_spec import V1beta3FlowSchemaSpec -from kubernetes.client.models.v1beta3_flow_schema_status import V1beta3FlowSchemaStatus -from kubernetes.client.models.v1beta3_group_subject import V1beta3GroupSubject -from kubernetes.client.models.v1beta3_limit_response import V1beta3LimitResponse -from kubernetes.client.models.v1beta3_limited_priority_level_configuration import V1beta3LimitedPriorityLevelConfiguration -from kubernetes.client.models.v1beta3_non_resource_policy_rule import V1beta3NonResourcePolicyRule -from kubernetes.client.models.v1beta3_policy_rules_with_subjects import V1beta3PolicyRulesWithSubjects -from kubernetes.client.models.v1beta3_priority_level_configuration import V1beta3PriorityLevelConfiguration -from kubernetes.client.models.v1beta3_priority_level_configuration_condition import V1beta3PriorityLevelConfigurationCondition -from kubernetes.client.models.v1beta3_priority_level_configuration_list import V1beta3PriorityLevelConfigurationList -from kubernetes.client.models.v1beta3_priority_level_configuration_reference import V1beta3PriorityLevelConfigurationReference -from kubernetes.client.models.v1beta3_priority_level_configuration_spec import V1beta3PriorityLevelConfigurationSpec -from kubernetes.client.models.v1beta3_priority_level_configuration_status import V1beta3PriorityLevelConfigurationStatus -from kubernetes.client.models.v1beta3_queuing_configuration import V1beta3QueuingConfiguration -from kubernetes.client.models.v1beta3_resource_policy_rule import V1beta3ResourcePolicyRule -from kubernetes.client.models.v1beta3_service_account_subject import V1beta3ServiceAccountSubject -from kubernetes.client.models.v1beta3_subject import V1beta3Subject -from kubernetes.client.models.v1beta3_user_subject import V1beta3UserSubject +from kubernetes.client.models.v1beta1_volume_attributes_class import V1beta1VolumeAttributesClass +from kubernetes.client.models.v1beta1_volume_attributes_class_list import V1beta1VolumeAttributesClassList +from kubernetes.client.models.v1beta2_allocated_device_status import V1beta2AllocatedDeviceStatus +from kubernetes.client.models.v1beta2_allocation_result import V1beta2AllocationResult +from kubernetes.client.models.v1beta2_cel_device_selector import V1beta2CELDeviceSelector +from kubernetes.client.models.v1beta2_capacity_request_policy import V1beta2CapacityRequestPolicy +from kubernetes.client.models.v1beta2_capacity_request_policy_range import V1beta2CapacityRequestPolicyRange +from kubernetes.client.models.v1beta2_capacity_requirements import V1beta2CapacityRequirements +from kubernetes.client.models.v1beta2_counter import V1beta2Counter +from kubernetes.client.models.v1beta2_counter_set import V1beta2CounterSet +from kubernetes.client.models.v1beta2_device import V1beta2Device +from kubernetes.client.models.v1beta2_device_allocation_configuration import V1beta2DeviceAllocationConfiguration +from kubernetes.client.models.v1beta2_device_allocation_result import V1beta2DeviceAllocationResult +from kubernetes.client.models.v1beta2_device_attribute import V1beta2DeviceAttribute +from kubernetes.client.models.v1beta2_device_capacity import V1beta2DeviceCapacity +from kubernetes.client.models.v1beta2_device_claim import V1beta2DeviceClaim +from kubernetes.client.models.v1beta2_device_claim_configuration import V1beta2DeviceClaimConfiguration +from kubernetes.client.models.v1beta2_device_class import V1beta2DeviceClass +from kubernetes.client.models.v1beta2_device_class_configuration import V1beta2DeviceClassConfiguration +from kubernetes.client.models.v1beta2_device_class_list import V1beta2DeviceClassList +from kubernetes.client.models.v1beta2_device_class_spec import V1beta2DeviceClassSpec +from kubernetes.client.models.v1beta2_device_constraint import V1beta2DeviceConstraint +from kubernetes.client.models.v1beta2_device_counter_consumption import V1beta2DeviceCounterConsumption +from kubernetes.client.models.v1beta2_device_request import V1beta2DeviceRequest +from kubernetes.client.models.v1beta2_device_request_allocation_result import V1beta2DeviceRequestAllocationResult +from kubernetes.client.models.v1beta2_device_selector import V1beta2DeviceSelector +from kubernetes.client.models.v1beta2_device_sub_request import V1beta2DeviceSubRequest +from kubernetes.client.models.v1beta2_device_taint import V1beta2DeviceTaint +from kubernetes.client.models.v1beta2_device_toleration import V1beta2DeviceToleration +from kubernetes.client.models.v1beta2_exact_device_request import V1beta2ExactDeviceRequest +from kubernetes.client.models.v1beta2_network_device_data import V1beta2NetworkDeviceData +from kubernetes.client.models.v1beta2_opaque_device_configuration import V1beta2OpaqueDeviceConfiguration +from kubernetes.client.models.v1beta2_resource_claim import V1beta2ResourceClaim +from kubernetes.client.models.v1beta2_resource_claim_consumer_reference import V1beta2ResourceClaimConsumerReference +from kubernetes.client.models.v1beta2_resource_claim_list import V1beta2ResourceClaimList +from kubernetes.client.models.v1beta2_resource_claim_spec import V1beta2ResourceClaimSpec +from kubernetes.client.models.v1beta2_resource_claim_status import V1beta2ResourceClaimStatus +from kubernetes.client.models.v1beta2_resource_claim_template import V1beta2ResourceClaimTemplate +from kubernetes.client.models.v1beta2_resource_claim_template_list import V1beta2ResourceClaimTemplateList +from kubernetes.client.models.v1beta2_resource_claim_template_spec import V1beta2ResourceClaimTemplateSpec +from kubernetes.client.models.v1beta2_resource_pool import V1beta2ResourcePool +from kubernetes.client.models.v1beta2_resource_slice import V1beta2ResourceSlice +from kubernetes.client.models.v1beta2_resource_slice_list import V1beta2ResourceSliceList +from kubernetes.client.models.v1beta2_resource_slice_spec import V1beta2ResourceSliceSpec +from kubernetes.client.models.v2_api_group_discovery import V2APIGroupDiscovery +from kubernetes.client.models.v2_api_group_discovery_list import V2APIGroupDiscoveryList +from kubernetes.client.models.v2_api_resource_discovery import V2APIResourceDiscovery +from kubernetes.client.models.v2_api_subresource_discovery import V2APISubresourceDiscovery +from kubernetes.client.models.v2_api_version_discovery import V2APIVersionDiscovery from kubernetes.client.models.v2_container_resource_metric_source import V2ContainerResourceMetricSource from kubernetes.client.models.v2_container_resource_metric_status import V2ContainerResourceMetricStatus from kubernetes.client.models.v2_cross_version_object_reference import V2CrossVersionObjectReference @@ -700,5 +818,10 @@ from kubernetes.client.models.v2_pods_metric_status import V2PodsMetricStatus from kubernetes.client.models.v2_resource_metric_source import V2ResourceMetricSource from kubernetes.client.models.v2_resource_metric_status import V2ResourceMetricStatus +from kubernetes.client.models.v2beta1_api_group_discovery import V2beta1APIGroupDiscovery +from kubernetes.client.models.v2beta1_api_group_discovery_list import V2beta1APIGroupDiscoveryList +from kubernetes.client.models.v2beta1_api_resource_discovery import V2beta1APIResourceDiscovery +from kubernetes.client.models.v2beta1_api_subresource_discovery import V2beta1APISubresourceDiscovery +from kubernetes.client.models.v2beta1_api_version_discovery import V2beta1APIVersionDiscovery from kubernetes.client.models.version_info import VersionInfo diff --git a/kubernetes/client/api/__init__.py b/kubernetes/client/api/__init__.py index 1ff4b8308a..96fa9d53b9 100644 --- a/kubernetes/client/api/__init__.py +++ b/kubernetes/client/api/__init__.py @@ -17,8 +17,6 @@ from kubernetes.client.api.apps_v1_api import AppsV1Api from kubernetes.client.api.authentication_api import AuthenticationApi from kubernetes.client.api.authentication_v1_api import AuthenticationV1Api -from kubernetes.client.api.authentication_v1alpha1_api import AuthenticationV1alpha1Api -from kubernetes.client.api.authentication_v1beta1_api import AuthenticationV1beta1Api from kubernetes.client.api.authorization_api import AuthorizationApi from kubernetes.client.api.authorization_v1_api import AuthorizationV1Api from kubernetes.client.api.autoscaling_api import AutoscalingApi @@ -29,8 +27,11 @@ from kubernetes.client.api.certificates_api import CertificatesApi from kubernetes.client.api.certificates_v1_api import CertificatesV1Api from kubernetes.client.api.certificates_v1alpha1_api import CertificatesV1alpha1Api +from kubernetes.client.api.certificates_v1beta1_api import CertificatesV1beta1Api from kubernetes.client.api.coordination_api import CoordinationApi from kubernetes.client.api.coordination_v1_api import CoordinationV1Api +from kubernetes.client.api.coordination_v1alpha2_api import CoordinationV1alpha2Api +from kubernetes.client.api.coordination_v1beta1_api import CoordinationV1beta1Api from kubernetes.client.api.core_api import CoreApi from kubernetes.client.api.core_v1_api import CoreV1Api from kubernetes.client.api.custom_objects_api import CustomObjectsApi @@ -40,13 +41,12 @@ from kubernetes.client.api.events_v1_api import EventsV1Api from kubernetes.client.api.flowcontrol_apiserver_api import FlowcontrolApiserverApi from kubernetes.client.api.flowcontrol_apiserver_v1_api import FlowcontrolApiserverV1Api -from kubernetes.client.api.flowcontrol_apiserver_v1beta3_api import FlowcontrolApiserverV1beta3Api from kubernetes.client.api.internal_apiserver_api import InternalApiserverApi from kubernetes.client.api.internal_apiserver_v1alpha1_api import InternalApiserverV1alpha1Api from kubernetes.client.api.logs_api import LogsApi from kubernetes.client.api.networking_api import NetworkingApi from kubernetes.client.api.networking_v1_api import NetworkingV1Api -from kubernetes.client.api.networking_v1alpha1_api import NetworkingV1alpha1Api +from kubernetes.client.api.networking_v1beta1_api import NetworkingV1beta1Api from kubernetes.client.api.node_api import NodeApi from kubernetes.client.api.node_v1_api import NodeV1Api from kubernetes.client.api.openid_api import OpenidApi @@ -55,12 +55,16 @@ from kubernetes.client.api.rbac_authorization_api import RbacAuthorizationApi from kubernetes.client.api.rbac_authorization_v1_api import RbacAuthorizationV1Api from kubernetes.client.api.resource_api import ResourceApi -from kubernetes.client.api.resource_v1alpha2_api import ResourceV1alpha2Api +from kubernetes.client.api.resource_v1_api import ResourceV1Api +from kubernetes.client.api.resource_v1alpha3_api import ResourceV1alpha3Api +from kubernetes.client.api.resource_v1beta1_api import ResourceV1beta1Api +from kubernetes.client.api.resource_v1beta2_api import ResourceV1beta2Api from kubernetes.client.api.scheduling_api import SchedulingApi from kubernetes.client.api.scheduling_v1_api import SchedulingV1Api +from kubernetes.client.api.scheduling_v1alpha1_api import SchedulingV1alpha1Api from kubernetes.client.api.storage_api import StorageApi from kubernetes.client.api.storage_v1_api import StorageV1Api -from kubernetes.client.api.storage_v1alpha1_api import StorageV1alpha1Api +from kubernetes.client.api.storage_v1beta1_api import StorageV1beta1Api from kubernetes.client.api.storagemigration_api import StoragemigrationApi -from kubernetes.client.api.storagemigration_v1alpha1_api import StoragemigrationV1alpha1Api +from kubernetes.client.api.storagemigration_v1beta1_api import StoragemigrationV1beta1Api from kubernetes.client.api.version_api import VersionApi diff --git a/kubernetes/client/api/admissionregistration_api.py b/kubernetes/client/api/admissionregistration_api.py index f629b7153c..61cf3c50d8 100644 --- a/kubernetes/client/api/admissionregistration_api.py +++ b/kubernetes/client/api/admissionregistration_api.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ @@ -42,20 +42,24 @@ def get_api_group(self, **kwargs): # noqa: E501 get information of a group # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_group(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1APIGroup + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1APIGroup """ kwargs['_return_http_data_only'] = True return self.get_api_group_with_http_info(**kwargs) # noqa: E501 @@ -66,22 +70,32 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 get information of a group # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_group_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1APIGroup, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1APIGroup, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -93,7 +107,10 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -112,7 +129,7 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -125,6 +142,11 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1APIGroup", + 401: None, + } + return self.api_client.call_api( '/apis/admissionregistration.k8s.io/', 'GET', path_params, @@ -133,10 +155,11 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1APIGroup', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) diff --git a/kubernetes/client/api/admissionregistration_v1_api.py b/kubernetes/client/api/admissionregistration_v1_api.py index bf98916287..a3731e3a57 100644 --- a/kubernetes/client/api/admissionregistration_v1_api.py +++ b/kubernetes/client/api/admissionregistration_v1_api.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ @@ -42,25 +42,34 @@ def create_mutating_webhook_configuration(self, body, **kwargs): # noqa: E501 create a MutatingWebhookConfiguration # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_mutating_webhook_configuration(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param V1MutatingWebhookConfiguration body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param body: (required) + :type body: V1MutatingWebhookConfiguration + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1MutatingWebhookConfiguration + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1MutatingWebhookConfiguration """ kwargs['_return_http_data_only'] = True return self.create_mutating_webhook_configuration_with_http_info(body, **kwargs) # noqa: E501 @@ -71,27 +80,42 @@ def create_mutating_webhook_configuration_with_http_info(self, body, **kwargs): create a MutatingWebhookConfiguration # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_mutating_webhook_configuration_with_http_info(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param V1MutatingWebhookConfiguration body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param body: (required) + :type body: V1MutatingWebhookConfiguration + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1MutatingWebhookConfiguration, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1MutatingWebhookConfiguration, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -108,7 +132,10 @@ def create_mutating_webhook_configuration_with_http_info(self, body, **kwargs): 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -121,8 +148,7 @@ def create_mutating_webhook_configuration_with_http_info(self, body, **kwargs): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_mutating_webhook_configuration`") # noqa: E501 collection_formats = {} @@ -130,16 +156,16 @@ def create_mutating_webhook_configuration_with_http_info(self, body, **kwargs): path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -149,11 +175,18 @@ def create_mutating_webhook_configuration_with_http_info(self, body, **kwargs): body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1MutatingWebhookConfiguration", + 201: "V1MutatingWebhookConfiguration", + 202: "V1MutatingWebhookConfiguration", + 401: None, + } + return self.api_client.call_api( '/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations', 'POST', path_params, @@ -162,13 +195,14 @@ def create_mutating_webhook_configuration_with_http_info(self, body, **kwargs): body=body_params, post_params=form_params, files=local_var_files, - response_type='V1MutatingWebhookConfiguration', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def create_validating_admission_policy(self, body, **kwargs): # noqa: E501 """create_validating_admission_policy # noqa: E501 @@ -176,25 +210,34 @@ def create_validating_admission_policy(self, body, **kwargs): # noqa: E501 create a ValidatingAdmissionPolicy # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_validating_admission_policy(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param V1ValidatingAdmissionPolicy body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param body: (required) + :type body: V1ValidatingAdmissionPolicy + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ValidatingAdmissionPolicy + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ValidatingAdmissionPolicy """ kwargs['_return_http_data_only'] = True return self.create_validating_admission_policy_with_http_info(body, **kwargs) # noqa: E501 @@ -205,27 +248,42 @@ def create_validating_admission_policy_with_http_info(self, body, **kwargs): # create a ValidatingAdmissionPolicy # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_validating_admission_policy_with_http_info(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param V1ValidatingAdmissionPolicy body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param body: (required) + :type body: V1ValidatingAdmissionPolicy + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ValidatingAdmissionPolicy, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ValidatingAdmissionPolicy, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -242,7 +300,10 @@ def create_validating_admission_policy_with_http_info(self, body, **kwargs): # 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -255,8 +316,7 @@ def create_validating_admission_policy_with_http_info(self, body, **kwargs): # local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_validating_admission_policy`") # noqa: E501 collection_formats = {} @@ -264,16 +324,16 @@ def create_validating_admission_policy_with_http_info(self, body, **kwargs): # path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -283,11 +343,18 @@ def create_validating_admission_policy_with_http_info(self, body, **kwargs): # body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ValidatingAdmissionPolicy", + 201: "V1ValidatingAdmissionPolicy", + 202: "V1ValidatingAdmissionPolicy", + 401: None, + } + return self.api_client.call_api( '/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies', 'POST', path_params, @@ -296,13 +363,14 @@ def create_validating_admission_policy_with_http_info(self, body, **kwargs): # body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ValidatingAdmissionPolicy', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def create_validating_admission_policy_binding(self, body, **kwargs): # noqa: E501 """create_validating_admission_policy_binding # noqa: E501 @@ -310,25 +378,34 @@ def create_validating_admission_policy_binding(self, body, **kwargs): # noqa: E create a ValidatingAdmissionPolicyBinding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_validating_admission_policy_binding(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param V1ValidatingAdmissionPolicyBinding body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param body: (required) + :type body: V1ValidatingAdmissionPolicyBinding + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ValidatingAdmissionPolicyBinding + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ValidatingAdmissionPolicyBinding """ kwargs['_return_http_data_only'] = True return self.create_validating_admission_policy_binding_with_http_info(body, **kwargs) # noqa: E501 @@ -339,27 +416,42 @@ def create_validating_admission_policy_binding_with_http_info(self, body, **kwar create a ValidatingAdmissionPolicyBinding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_validating_admission_policy_binding_with_http_info(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param V1ValidatingAdmissionPolicyBinding body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param body: (required) + :type body: V1ValidatingAdmissionPolicyBinding + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ValidatingAdmissionPolicyBinding, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ValidatingAdmissionPolicyBinding, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -376,7 +468,10 @@ def create_validating_admission_policy_binding_with_http_info(self, body, **kwar 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -389,8 +484,7 @@ def create_validating_admission_policy_binding_with_http_info(self, body, **kwar local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_validating_admission_policy_binding`") # noqa: E501 collection_formats = {} @@ -398,16 +492,16 @@ def create_validating_admission_policy_binding_with_http_info(self, body, **kwar path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -417,11 +511,18 @@ def create_validating_admission_policy_binding_with_http_info(self, body, **kwar body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ValidatingAdmissionPolicyBinding", + 201: "V1ValidatingAdmissionPolicyBinding", + 202: "V1ValidatingAdmissionPolicyBinding", + 401: None, + } + return self.api_client.call_api( '/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicybindings', 'POST', path_params, @@ -430,13 +531,14 @@ def create_validating_admission_policy_binding_with_http_info(self, body, **kwar body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ValidatingAdmissionPolicyBinding', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def create_validating_webhook_configuration(self, body, **kwargs): # noqa: E501 """create_validating_webhook_configuration # noqa: E501 @@ -444,25 +546,34 @@ def create_validating_webhook_configuration(self, body, **kwargs): # noqa: E501 create a ValidatingWebhookConfiguration # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_validating_webhook_configuration(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param V1ValidatingWebhookConfiguration body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param body: (required) + :type body: V1ValidatingWebhookConfiguration + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ValidatingWebhookConfiguration + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ValidatingWebhookConfiguration """ kwargs['_return_http_data_only'] = True return self.create_validating_webhook_configuration_with_http_info(body, **kwargs) # noqa: E501 @@ -473,27 +584,42 @@ def create_validating_webhook_configuration_with_http_info(self, body, **kwargs) create a ValidatingWebhookConfiguration # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_validating_webhook_configuration_with_http_info(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param V1ValidatingWebhookConfiguration body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param body: (required) + :type body: V1ValidatingWebhookConfiguration + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ValidatingWebhookConfiguration, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ValidatingWebhookConfiguration, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -510,7 +636,10 @@ def create_validating_webhook_configuration_with_http_info(self, body, **kwargs) 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -523,8 +652,7 @@ def create_validating_webhook_configuration_with_http_info(self, body, **kwargs) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_validating_webhook_configuration`") # noqa: E501 collection_formats = {} @@ -532,16 +660,16 @@ def create_validating_webhook_configuration_with_http_info(self, body, **kwargs) path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -551,11 +679,18 @@ def create_validating_webhook_configuration_with_http_info(self, body, **kwargs) body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ValidatingWebhookConfiguration", + 201: "V1ValidatingWebhookConfiguration", + 202: "V1ValidatingWebhookConfiguration", + 401: None, + } + return self.api_client.call_api( '/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations', 'POST', path_params, @@ -564,13 +699,14 @@ def create_validating_webhook_configuration_with_http_info(self, body, **kwargs) body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ValidatingWebhookConfiguration', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_collection_mutating_webhook_configuration(self, **kwargs): # noqa: E501 """delete_collection_mutating_webhook_configuration # noqa: E501 @@ -578,34 +714,54 @@ def delete_collection_mutating_webhook_configuration(self, **kwargs): # noqa: E delete collection of MutatingWebhookConfiguration # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_mutating_webhook_configuration(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_collection_mutating_webhook_configuration_with_http_info(**kwargs) # noqa: E501 @@ -616,36 +772,62 @@ def delete_collection_mutating_webhook_configuration_with_http_info(self, **kwar delete collection of MutatingWebhookConfiguration # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_mutating_webhook_configuration_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -656,6 +838,7 @@ def delete_collection_mutating_webhook_configuration_with_http_info(self, **kwar 'dry_run', 'field_selector', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'label_selector', 'limit', 'orphan_dependents', @@ -671,7 +854,10 @@ def delete_collection_mutating_webhook_configuration_with_http_info(self, **kwar 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -689,34 +875,36 @@ def delete_collection_mutating_webhook_configuration_with_http_info(self, **kwar path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -726,11 +914,16 @@ def delete_collection_mutating_webhook_configuration_with_http_info(self, **kwar body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 401: None, + } + return self.api_client.call_api( '/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations', 'DELETE', path_params, @@ -739,13 +932,14 @@ def delete_collection_mutating_webhook_configuration_with_http_info(self, **kwar body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_collection_validating_admission_policy(self, **kwargs): # noqa: E501 """delete_collection_validating_admission_policy # noqa: E501 @@ -753,34 +947,54 @@ def delete_collection_validating_admission_policy(self, **kwargs): # noqa: E501 delete collection of ValidatingAdmissionPolicy # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_validating_admission_policy(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_collection_validating_admission_policy_with_http_info(**kwargs) # noqa: E501 @@ -791,36 +1005,62 @@ def delete_collection_validating_admission_policy_with_http_info(self, **kwargs) delete collection of ValidatingAdmissionPolicy # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_validating_admission_policy_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -831,6 +1071,7 @@ def delete_collection_validating_admission_policy_with_http_info(self, **kwargs) 'dry_run', 'field_selector', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'label_selector', 'limit', 'orphan_dependents', @@ -846,7 +1087,10 @@ def delete_collection_validating_admission_policy_with_http_info(self, **kwargs) 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -864,34 +1108,36 @@ def delete_collection_validating_admission_policy_with_http_info(self, **kwargs) path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -901,11 +1147,16 @@ def delete_collection_validating_admission_policy_with_http_info(self, **kwargs) body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 401: None, + } + return self.api_client.call_api( '/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies', 'DELETE', path_params, @@ -914,13 +1165,14 @@ def delete_collection_validating_admission_policy_with_http_info(self, **kwargs) body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_collection_validating_admission_policy_binding(self, **kwargs): # noqa: E501 """delete_collection_validating_admission_policy_binding # noqa: E501 @@ -928,34 +1180,54 @@ def delete_collection_validating_admission_policy_binding(self, **kwargs): # no delete collection of ValidatingAdmissionPolicyBinding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_validating_admission_policy_binding(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_collection_validating_admission_policy_binding_with_http_info(**kwargs) # noqa: E501 @@ -966,36 +1238,62 @@ def delete_collection_validating_admission_policy_binding_with_http_info(self, * delete collection of ValidatingAdmissionPolicyBinding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_validating_admission_policy_binding_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1006,6 +1304,7 @@ def delete_collection_validating_admission_policy_binding_with_http_info(self, * 'dry_run', 'field_selector', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'label_selector', 'limit', 'orphan_dependents', @@ -1021,7 +1320,10 @@ def delete_collection_validating_admission_policy_binding_with_http_info(self, * 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1039,34 +1341,36 @@ def delete_collection_validating_admission_policy_binding_with_http_info(self, * path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1076,11 +1380,16 @@ def delete_collection_validating_admission_policy_binding_with_http_info(self, * body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 401: None, + } + return self.api_client.call_api( '/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicybindings', 'DELETE', path_params, @@ -1089,13 +1398,14 @@ def delete_collection_validating_admission_policy_binding_with_http_info(self, * body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_collection_validating_webhook_configuration(self, **kwargs): # noqa: E501 """delete_collection_validating_webhook_configuration # noqa: E501 @@ -1103,34 +1413,54 @@ def delete_collection_validating_webhook_configuration(self, **kwargs): # noqa: delete collection of ValidatingWebhookConfiguration # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_validating_webhook_configuration(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_collection_validating_webhook_configuration_with_http_info(**kwargs) # noqa: E501 @@ -1141,36 +1471,62 @@ def delete_collection_validating_webhook_configuration_with_http_info(self, **kw delete collection of ValidatingWebhookConfiguration # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_validating_webhook_configuration_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1181,6 +1537,7 @@ def delete_collection_validating_webhook_configuration_with_http_info(self, **kw 'dry_run', 'field_selector', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'label_selector', 'limit', 'orphan_dependents', @@ -1196,7 +1553,10 @@ def delete_collection_validating_webhook_configuration_with_http_info(self, **kw 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1214,34 +1574,36 @@ def delete_collection_validating_webhook_configuration_with_http_info(self, **kw path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1251,11 +1613,16 @@ def delete_collection_validating_webhook_configuration_with_http_info(self, **kw body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 401: None, + } + return self.api_client.call_api( '/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations', 'DELETE', path_params, @@ -1264,13 +1631,14 @@ def delete_collection_validating_webhook_configuration_with_http_info(self, **kw body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_mutating_webhook_configuration(self, name, **kwargs): # noqa: E501 """delete_mutating_webhook_configuration # noqa: E501 @@ -1278,27 +1646,40 @@ def delete_mutating_webhook_configuration(self, name, **kwargs): # noqa: E501 delete a MutatingWebhookConfiguration # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_mutating_webhook_configuration(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the MutatingWebhookConfiguration (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the MutatingWebhookConfiguration (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_mutating_webhook_configuration_with_http_info(name, **kwargs) # noqa: E501 @@ -1309,29 +1690,48 @@ def delete_mutating_webhook_configuration_with_http_info(self, name, **kwargs): delete a MutatingWebhookConfiguration # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_mutating_webhook_configuration_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the MutatingWebhookConfiguration (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the MutatingWebhookConfiguration (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1341,6 +1741,7 @@ def delete_mutating_webhook_configuration_with_http_info(self, name, **kwargs): 'pretty', 'dry_run', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'orphan_dependents', 'propagation_policy', 'body' @@ -1350,7 +1751,10 @@ def delete_mutating_webhook_configuration_with_http_info(self, name, **kwargs): 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1363,8 +1767,7 @@ def delete_mutating_webhook_configuration_with_http_info(self, name, **kwargs): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `delete_mutating_webhook_configuration`") # noqa: E501 collection_formats = {} @@ -1374,18 +1777,20 @@ def delete_mutating_webhook_configuration_with_http_info(self, name, **kwargs): path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1395,11 +1800,17 @@ def delete_mutating_webhook_configuration_with_http_info(self, name, **kwargs): body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 202: "V1Status", + 401: None, + } + return self.api_client.call_api( '/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations/{name}', 'DELETE', path_params, @@ -1408,13 +1819,14 @@ def delete_mutating_webhook_configuration_with_http_info(self, name, **kwargs): body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_validating_admission_policy(self, name, **kwargs): # noqa: E501 """delete_validating_admission_policy # noqa: E501 @@ -1422,27 +1834,40 @@ def delete_validating_admission_policy(self, name, **kwargs): # noqa: E501 delete a ValidatingAdmissionPolicy # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_validating_admission_policy(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingAdmissionPolicy (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the ValidatingAdmissionPolicy (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_validating_admission_policy_with_http_info(name, **kwargs) # noqa: E501 @@ -1453,29 +1878,48 @@ def delete_validating_admission_policy_with_http_info(self, name, **kwargs): # delete a ValidatingAdmissionPolicy # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_validating_admission_policy_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingAdmissionPolicy (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the ValidatingAdmissionPolicy (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1485,6 +1929,7 @@ def delete_validating_admission_policy_with_http_info(self, name, **kwargs): # 'pretty', 'dry_run', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'orphan_dependents', 'propagation_policy', 'body' @@ -1494,7 +1939,10 @@ def delete_validating_admission_policy_with_http_info(self, name, **kwargs): # 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1507,8 +1955,7 @@ def delete_validating_admission_policy_with_http_info(self, name, **kwargs): # local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `delete_validating_admission_policy`") # noqa: E501 collection_formats = {} @@ -1518,18 +1965,20 @@ def delete_validating_admission_policy_with_http_info(self, name, **kwargs): # path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1539,11 +1988,17 @@ def delete_validating_admission_policy_with_http_info(self, name, **kwargs): # body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 202: "V1Status", + 401: None, + } + return self.api_client.call_api( '/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies/{name}', 'DELETE', path_params, @@ -1552,13 +2007,14 @@ def delete_validating_admission_policy_with_http_info(self, name, **kwargs): # body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_validating_admission_policy_binding(self, name, **kwargs): # noqa: E501 """delete_validating_admission_policy_binding # noqa: E501 @@ -1566,27 +2022,40 @@ def delete_validating_admission_policy_binding(self, name, **kwargs): # noqa: E delete a ValidatingAdmissionPolicyBinding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_validating_admission_policy_binding(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingAdmissionPolicyBinding (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the ValidatingAdmissionPolicyBinding (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_validating_admission_policy_binding_with_http_info(name, **kwargs) # noqa: E501 @@ -1597,29 +2066,48 @@ def delete_validating_admission_policy_binding_with_http_info(self, name, **kwar delete a ValidatingAdmissionPolicyBinding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_validating_admission_policy_binding_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingAdmissionPolicyBinding (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the ValidatingAdmissionPolicyBinding (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1629,6 +2117,7 @@ def delete_validating_admission_policy_binding_with_http_info(self, name, **kwar 'pretty', 'dry_run', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'orphan_dependents', 'propagation_policy', 'body' @@ -1638,7 +2127,10 @@ def delete_validating_admission_policy_binding_with_http_info(self, name, **kwar 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1651,8 +2143,7 @@ def delete_validating_admission_policy_binding_with_http_info(self, name, **kwar local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `delete_validating_admission_policy_binding`") # noqa: E501 collection_formats = {} @@ -1662,18 +2153,20 @@ def delete_validating_admission_policy_binding_with_http_info(self, name, **kwar path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1683,11 +2176,17 @@ def delete_validating_admission_policy_binding_with_http_info(self, name, **kwar body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 202: "V1Status", + 401: None, + } + return self.api_client.call_api( '/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicybindings/{name}', 'DELETE', path_params, @@ -1696,13 +2195,14 @@ def delete_validating_admission_policy_binding_with_http_info(self, name, **kwar body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_validating_webhook_configuration(self, name, **kwargs): # noqa: E501 """delete_validating_webhook_configuration # noqa: E501 @@ -1710,27 +2210,40 @@ def delete_validating_webhook_configuration(self, name, **kwargs): # noqa: E501 delete a ValidatingWebhookConfiguration # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_validating_webhook_configuration(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingWebhookConfiguration (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the ValidatingWebhookConfiguration (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_validating_webhook_configuration_with_http_info(name, **kwargs) # noqa: E501 @@ -1741,29 +2254,48 @@ def delete_validating_webhook_configuration_with_http_info(self, name, **kwargs) delete a ValidatingWebhookConfiguration # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_validating_webhook_configuration_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingWebhookConfiguration (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the ValidatingWebhookConfiguration (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1773,6 +2305,7 @@ def delete_validating_webhook_configuration_with_http_info(self, name, **kwargs) 'pretty', 'dry_run', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'orphan_dependents', 'propagation_policy', 'body' @@ -1782,7 +2315,10 @@ def delete_validating_webhook_configuration_with_http_info(self, name, **kwargs) 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1795,8 +2331,7 @@ def delete_validating_webhook_configuration_with_http_info(self, name, **kwargs) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `delete_validating_webhook_configuration`") # noqa: E501 collection_formats = {} @@ -1806,18 +2341,20 @@ def delete_validating_webhook_configuration_with_http_info(self, name, **kwargs) path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1827,11 +2364,17 @@ def delete_validating_webhook_configuration_with_http_info(self, name, **kwargs) body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 202: "V1Status", + 401: None, + } + return self.api_client.call_api( '/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name}', 'DELETE', path_params, @@ -1840,13 +2383,14 @@ def delete_validating_webhook_configuration_with_http_info(self, name, **kwargs) body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def get_api_resources(self, **kwargs): # noqa: E501 """get_api_resources # noqa: E501 @@ -1854,20 +2398,24 @@ def get_api_resources(self, **kwargs): # noqa: E501 get available resources # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_resources(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1APIResourceList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1APIResourceList """ kwargs['_return_http_data_only'] = True return self.get_api_resources_with_http_info(**kwargs) # noqa: E501 @@ -1878,22 +2426,32 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 get available resources # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_resources_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1905,7 +2463,10 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1924,7 +2485,7 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1932,11 +2493,16 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1APIResourceList", + 401: None, + } + return self.api_client.call_api( '/apis/admissionregistration.k8s.io/v1/', 'GET', path_params, @@ -1945,13 +2511,14 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1APIResourceList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_mutating_webhook_configuration(self, **kwargs): # noqa: E501 """list_mutating_webhook_configuration # noqa: E501 @@ -1959,31 +2526,46 @@ def list_mutating_webhook_configuration(self, **kwargs): # noqa: E501 list or watch objects of kind MutatingWebhookConfiguration # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_mutating_webhook_configuration(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1MutatingWebhookConfigurationList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1MutatingWebhookConfigurationList """ kwargs['_return_http_data_only'] = True return self.list_mutating_webhook_configuration_with_http_info(**kwargs) # noqa: E501 @@ -1994,33 +2576,54 @@ def list_mutating_webhook_configuration_with_http_info(self, **kwargs): # noqa: list or watch objects of kind MutatingWebhookConfiguration # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_mutating_webhook_configuration_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1MutatingWebhookConfigurationList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1MutatingWebhookConfigurationList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -2043,7 +2646,10 @@ def list_mutating_webhook_configuration_with_http_info(self, **kwargs): # noqa: 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2061,30 +2667,30 @@ def list_mutating_webhook_configuration_with_http_info(self, **kwargs): # noqa: path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2092,11 +2698,16 @@ def list_mutating_webhook_configuration_with_http_info(self, **kwargs): # noqa: body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1MutatingWebhookConfigurationList", + 401: None, + } + return self.api_client.call_api( '/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations', 'GET', path_params, @@ -2105,13 +2716,14 @@ def list_mutating_webhook_configuration_with_http_info(self, **kwargs): # noqa: body=body_params, post_params=form_params, files=local_var_files, - response_type='V1MutatingWebhookConfigurationList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_validating_admission_policy(self, **kwargs): # noqa: E501 """list_validating_admission_policy # noqa: E501 @@ -2119,31 +2731,46 @@ def list_validating_admission_policy(self, **kwargs): # noqa: E501 list or watch objects of kind ValidatingAdmissionPolicy # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_validating_admission_policy(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ValidatingAdmissionPolicyList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ValidatingAdmissionPolicyList """ kwargs['_return_http_data_only'] = True return self.list_validating_admission_policy_with_http_info(**kwargs) # noqa: E501 @@ -2154,33 +2781,54 @@ def list_validating_admission_policy_with_http_info(self, **kwargs): # noqa: E5 list or watch objects of kind ValidatingAdmissionPolicy # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_validating_admission_policy_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ValidatingAdmissionPolicyList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ValidatingAdmissionPolicyList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -2203,7 +2851,10 @@ def list_validating_admission_policy_with_http_info(self, **kwargs): # noqa: E5 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2221,30 +2872,30 @@ def list_validating_admission_policy_with_http_info(self, **kwargs): # noqa: E5 path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2252,11 +2903,16 @@ def list_validating_admission_policy_with_http_info(self, **kwargs): # noqa: E5 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ValidatingAdmissionPolicyList", + 401: None, + } + return self.api_client.call_api( '/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies', 'GET', path_params, @@ -2265,13 +2921,14 @@ def list_validating_admission_policy_with_http_info(self, **kwargs): # noqa: E5 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ValidatingAdmissionPolicyList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_validating_admission_policy_binding(self, **kwargs): # noqa: E501 """list_validating_admission_policy_binding # noqa: E501 @@ -2279,31 +2936,46 @@ def list_validating_admission_policy_binding(self, **kwargs): # noqa: E501 list or watch objects of kind ValidatingAdmissionPolicyBinding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_validating_admission_policy_binding(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ValidatingAdmissionPolicyBindingList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ValidatingAdmissionPolicyBindingList """ kwargs['_return_http_data_only'] = True return self.list_validating_admission_policy_binding_with_http_info(**kwargs) # noqa: E501 @@ -2314,33 +2986,54 @@ def list_validating_admission_policy_binding_with_http_info(self, **kwargs): # list or watch objects of kind ValidatingAdmissionPolicyBinding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_validating_admission_policy_binding_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ValidatingAdmissionPolicyBindingList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ValidatingAdmissionPolicyBindingList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -2363,7 +3056,10 @@ def list_validating_admission_policy_binding_with_http_info(self, **kwargs): # 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2381,30 +3077,30 @@ def list_validating_admission_policy_binding_with_http_info(self, **kwargs): # path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2412,11 +3108,16 @@ def list_validating_admission_policy_binding_with_http_info(self, **kwargs): # body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ValidatingAdmissionPolicyBindingList", + 401: None, + } + return self.api_client.call_api( '/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicybindings', 'GET', path_params, @@ -2425,13 +3126,14 @@ def list_validating_admission_policy_binding_with_http_info(self, **kwargs): # body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ValidatingAdmissionPolicyBindingList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_validating_webhook_configuration(self, **kwargs): # noqa: E501 """list_validating_webhook_configuration # noqa: E501 @@ -2439,31 +3141,46 @@ def list_validating_webhook_configuration(self, **kwargs): # noqa: E501 list or watch objects of kind ValidatingWebhookConfiguration # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_validating_webhook_configuration(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ValidatingWebhookConfigurationList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ValidatingWebhookConfigurationList """ kwargs['_return_http_data_only'] = True return self.list_validating_webhook_configuration_with_http_info(**kwargs) # noqa: E501 @@ -2474,33 +3191,54 @@ def list_validating_webhook_configuration_with_http_info(self, **kwargs): # noq list or watch objects of kind ValidatingWebhookConfiguration # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_validating_webhook_configuration_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ValidatingWebhookConfigurationList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ValidatingWebhookConfigurationList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -2523,7 +3261,10 @@ def list_validating_webhook_configuration_with_http_info(self, **kwargs): # noq 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2541,30 +3282,30 @@ def list_validating_webhook_configuration_with_http_info(self, **kwargs): # noq path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2572,11 +3313,16 @@ def list_validating_webhook_configuration_with_http_info(self, **kwargs): # noq body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ValidatingWebhookConfigurationList", + 401: None, + } + return self.api_client.call_api( '/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations', 'GET', path_params, @@ -2585,13 +3331,14 @@ def list_validating_webhook_configuration_with_http_info(self, **kwargs): # noq body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ValidatingWebhookConfigurationList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_mutating_webhook_configuration(self, name, body, **kwargs): # noqa: E501 """patch_mutating_webhook_configuration # noqa: E501 @@ -2599,27 +3346,38 @@ def patch_mutating_webhook_configuration(self, name, body, **kwargs): # noqa: E partially update the specified MutatingWebhookConfiguration # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_mutating_webhook_configuration(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the MutatingWebhookConfiguration (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the MutatingWebhookConfiguration (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1MutatingWebhookConfiguration + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1MutatingWebhookConfiguration """ kwargs['_return_http_data_only'] = True return self.patch_mutating_webhook_configuration_with_http_info(name, body, **kwargs) # noqa: E501 @@ -2630,29 +3388,46 @@ def patch_mutating_webhook_configuration_with_http_info(self, name, body, **kwar partially update the specified MutatingWebhookConfiguration # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_mutating_webhook_configuration_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the MutatingWebhookConfiguration (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the MutatingWebhookConfiguration (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1MutatingWebhookConfiguration, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1MutatingWebhookConfiguration, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -2671,7 +3446,10 @@ def patch_mutating_webhook_configuration_with_http_info(self, name, body, **kwar 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2684,12 +3462,10 @@ def patch_mutating_webhook_configuration_with_http_info(self, name, body, **kwar local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_mutating_webhook_configuration`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_mutating_webhook_configuration`") # noqa: E501 collection_formats = {} @@ -2699,18 +3475,18 @@ def patch_mutating_webhook_configuration_with_http_info(self, name, body, **kwar path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2720,15 +3496,25 @@ def patch_mutating_webhook_configuration_with_http_info(self, name, body, **kwar body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1MutatingWebhookConfiguration", + 201: "V1MutatingWebhookConfiguration", + 401: None, + } + return self.api_client.call_api( '/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations/{name}', 'PATCH', path_params, @@ -2737,13 +3523,14 @@ def patch_mutating_webhook_configuration_with_http_info(self, name, body, **kwar body=body_params, post_params=form_params, files=local_var_files, - response_type='V1MutatingWebhookConfiguration', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_validating_admission_policy(self, name, body, **kwargs): # noqa: E501 """patch_validating_admission_policy # noqa: E501 @@ -2751,27 +3538,38 @@ def patch_validating_admission_policy(self, name, body, **kwargs): # noqa: E501 partially update the specified ValidatingAdmissionPolicy # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_validating_admission_policy(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingAdmissionPolicy (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the ValidatingAdmissionPolicy (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ValidatingAdmissionPolicy + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ValidatingAdmissionPolicy """ kwargs['_return_http_data_only'] = True return self.patch_validating_admission_policy_with_http_info(name, body, **kwargs) # noqa: E501 @@ -2782,29 +3580,46 @@ def patch_validating_admission_policy_with_http_info(self, name, body, **kwargs) partially update the specified ValidatingAdmissionPolicy # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_validating_admission_policy_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingAdmissionPolicy (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the ValidatingAdmissionPolicy (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ValidatingAdmissionPolicy, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ValidatingAdmissionPolicy, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -2823,7 +3638,10 @@ def patch_validating_admission_policy_with_http_info(self, name, body, **kwargs) 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2836,12 +3654,10 @@ def patch_validating_admission_policy_with_http_info(self, name, body, **kwargs) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_validating_admission_policy`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_validating_admission_policy`") # noqa: E501 collection_formats = {} @@ -2851,18 +3667,18 @@ def patch_validating_admission_policy_with_http_info(self, name, body, **kwargs) path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2872,15 +3688,25 @@ def patch_validating_admission_policy_with_http_info(self, name, body, **kwargs) body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ValidatingAdmissionPolicy", + 201: "V1ValidatingAdmissionPolicy", + 401: None, + } + return self.api_client.call_api( '/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies/{name}', 'PATCH', path_params, @@ -2889,13 +3715,14 @@ def patch_validating_admission_policy_with_http_info(self, name, body, **kwargs) body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ValidatingAdmissionPolicy', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_validating_admission_policy_binding(self, name, body, **kwargs): # noqa: E501 """patch_validating_admission_policy_binding # noqa: E501 @@ -2903,27 +3730,38 @@ def patch_validating_admission_policy_binding(self, name, body, **kwargs): # no partially update the specified ValidatingAdmissionPolicyBinding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_validating_admission_policy_binding(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingAdmissionPolicyBinding (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the ValidatingAdmissionPolicyBinding (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ValidatingAdmissionPolicyBinding + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ValidatingAdmissionPolicyBinding """ kwargs['_return_http_data_only'] = True return self.patch_validating_admission_policy_binding_with_http_info(name, body, **kwargs) # noqa: E501 @@ -2934,29 +3772,46 @@ def patch_validating_admission_policy_binding_with_http_info(self, name, body, * partially update the specified ValidatingAdmissionPolicyBinding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_validating_admission_policy_binding_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingAdmissionPolicyBinding (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the ValidatingAdmissionPolicyBinding (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ValidatingAdmissionPolicyBinding, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ValidatingAdmissionPolicyBinding, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -2975,7 +3830,10 @@ def patch_validating_admission_policy_binding_with_http_info(self, name, body, * 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2988,12 +3846,10 @@ def patch_validating_admission_policy_binding_with_http_info(self, name, body, * local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_validating_admission_policy_binding`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_validating_admission_policy_binding`") # noqa: E501 collection_formats = {} @@ -3003,18 +3859,18 @@ def patch_validating_admission_policy_binding_with_http_info(self, name, body, * path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -3024,15 +3880,25 @@ def patch_validating_admission_policy_binding_with_http_info(self, name, body, * body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ValidatingAdmissionPolicyBinding", + 201: "V1ValidatingAdmissionPolicyBinding", + 401: None, + } + return self.api_client.call_api( '/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicybindings/{name}', 'PATCH', path_params, @@ -3041,13 +3907,14 @@ def patch_validating_admission_policy_binding_with_http_info(self, name, body, * body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ValidatingAdmissionPolicyBinding', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_validating_admission_policy_status(self, name, body, **kwargs): # noqa: E501 """patch_validating_admission_policy_status # noqa: E501 @@ -3055,27 +3922,38 @@ def patch_validating_admission_policy_status(self, name, body, **kwargs): # noq partially update status of the specified ValidatingAdmissionPolicy # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_validating_admission_policy_status(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingAdmissionPolicy (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the ValidatingAdmissionPolicy (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ValidatingAdmissionPolicy + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ValidatingAdmissionPolicy """ kwargs['_return_http_data_only'] = True return self.patch_validating_admission_policy_status_with_http_info(name, body, **kwargs) # noqa: E501 @@ -3086,29 +3964,46 @@ def patch_validating_admission_policy_status_with_http_info(self, name, body, ** partially update status of the specified ValidatingAdmissionPolicy # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_validating_admission_policy_status_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingAdmissionPolicy (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the ValidatingAdmissionPolicy (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ValidatingAdmissionPolicy, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ValidatingAdmissionPolicy, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -3127,7 +4022,10 @@ def patch_validating_admission_policy_status_with_http_info(self, name, body, ** 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -3140,12 +4038,10 @@ def patch_validating_admission_policy_status_with_http_info(self, name, body, ** local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_validating_admission_policy_status`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_validating_admission_policy_status`") # noqa: E501 collection_formats = {} @@ -3155,18 +4051,18 @@ def patch_validating_admission_policy_status_with_http_info(self, name, body, ** path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -3176,15 +4072,25 @@ def patch_validating_admission_policy_status_with_http_info(self, name, body, ** body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ValidatingAdmissionPolicy", + 201: "V1ValidatingAdmissionPolicy", + 401: None, + } + return self.api_client.call_api( '/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies/{name}/status', 'PATCH', path_params, @@ -3193,13 +4099,14 @@ def patch_validating_admission_policy_status_with_http_info(self, name, body, ** body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ValidatingAdmissionPolicy', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_validating_webhook_configuration(self, name, body, **kwargs): # noqa: E501 """patch_validating_webhook_configuration # noqa: E501 @@ -3207,27 +4114,38 @@ def patch_validating_webhook_configuration(self, name, body, **kwargs): # noqa: partially update the specified ValidatingWebhookConfiguration # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_validating_webhook_configuration(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingWebhookConfiguration (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the ValidatingWebhookConfiguration (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ValidatingWebhookConfiguration + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ValidatingWebhookConfiguration """ kwargs['_return_http_data_only'] = True return self.patch_validating_webhook_configuration_with_http_info(name, body, **kwargs) # noqa: E501 @@ -3238,29 +4156,46 @@ def patch_validating_webhook_configuration_with_http_info(self, name, body, **kw partially update the specified ValidatingWebhookConfiguration # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_validating_webhook_configuration_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingWebhookConfiguration (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the ValidatingWebhookConfiguration (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ValidatingWebhookConfiguration, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ValidatingWebhookConfiguration, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -3279,7 +4214,10 @@ def patch_validating_webhook_configuration_with_http_info(self, name, body, **kw 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -3292,12 +4230,10 @@ def patch_validating_webhook_configuration_with_http_info(self, name, body, **kw local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_validating_webhook_configuration`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_validating_webhook_configuration`") # noqa: E501 collection_formats = {} @@ -3307,18 +4243,18 @@ def patch_validating_webhook_configuration_with_http_info(self, name, body, **kw path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -3328,15 +4264,25 @@ def patch_validating_webhook_configuration_with_http_info(self, name, body, **kw body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ValidatingWebhookConfiguration", + 201: "V1ValidatingWebhookConfiguration", + 401: None, + } + return self.api_client.call_api( '/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name}', 'PATCH', path_params, @@ -3345,13 +4291,14 @@ def patch_validating_webhook_configuration_with_http_info(self, name, body, **kw body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ValidatingWebhookConfiguration', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_mutating_webhook_configuration(self, name, **kwargs): # noqa: E501 """read_mutating_webhook_configuration # noqa: E501 @@ -3359,22 +4306,28 @@ def read_mutating_webhook_configuration(self, name, **kwargs): # noqa: E501 read the specified MutatingWebhookConfiguration # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_mutating_webhook_configuration(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the MutatingWebhookConfiguration (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the MutatingWebhookConfiguration (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1MutatingWebhookConfiguration + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1MutatingWebhookConfiguration """ kwargs['_return_http_data_only'] = True return self.read_mutating_webhook_configuration_with_http_info(name, **kwargs) # noqa: E501 @@ -3385,24 +4338,36 @@ def read_mutating_webhook_configuration_with_http_info(self, name, **kwargs): # read the specified MutatingWebhookConfiguration # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_mutating_webhook_configuration_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the MutatingWebhookConfiguration (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the MutatingWebhookConfiguration (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1MutatingWebhookConfiguration, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1MutatingWebhookConfiguration, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -3416,7 +4381,10 @@ def read_mutating_webhook_configuration_with_http_info(self, name, **kwargs): # 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -3429,8 +4397,7 @@ def read_mutating_webhook_configuration_with_http_info(self, name, **kwargs): # local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_mutating_webhook_configuration`") # noqa: E501 collection_formats = {} @@ -3440,10 +4407,10 @@ def read_mutating_webhook_configuration_with_http_info(self, name, **kwargs): # path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -3451,11 +4418,16 @@ def read_mutating_webhook_configuration_with_http_info(self, name, **kwargs): # body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1MutatingWebhookConfiguration", + 401: None, + } + return self.api_client.call_api( '/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations/{name}', 'GET', path_params, @@ -3464,13 +4436,14 @@ def read_mutating_webhook_configuration_with_http_info(self, name, **kwargs): # body=body_params, post_params=form_params, files=local_var_files, - response_type='V1MutatingWebhookConfiguration', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_validating_admission_policy(self, name, **kwargs): # noqa: E501 """read_validating_admission_policy # noqa: E501 @@ -3478,22 +4451,28 @@ def read_validating_admission_policy(self, name, **kwargs): # noqa: E501 read the specified ValidatingAdmissionPolicy # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_validating_admission_policy(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingAdmissionPolicy (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the ValidatingAdmissionPolicy (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ValidatingAdmissionPolicy + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ValidatingAdmissionPolicy """ kwargs['_return_http_data_only'] = True return self.read_validating_admission_policy_with_http_info(name, **kwargs) # noqa: E501 @@ -3504,24 +4483,36 @@ def read_validating_admission_policy_with_http_info(self, name, **kwargs): # no read the specified ValidatingAdmissionPolicy # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_validating_admission_policy_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingAdmissionPolicy (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the ValidatingAdmissionPolicy (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ValidatingAdmissionPolicy, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ValidatingAdmissionPolicy, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -3535,7 +4526,10 @@ def read_validating_admission_policy_with_http_info(self, name, **kwargs): # no 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -3548,8 +4542,7 @@ def read_validating_admission_policy_with_http_info(self, name, **kwargs): # no local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_validating_admission_policy`") # noqa: E501 collection_formats = {} @@ -3559,10 +4552,10 @@ def read_validating_admission_policy_with_http_info(self, name, **kwargs): # no path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -3570,11 +4563,16 @@ def read_validating_admission_policy_with_http_info(self, name, **kwargs): # no body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ValidatingAdmissionPolicy", + 401: None, + } + return self.api_client.call_api( '/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies/{name}', 'GET', path_params, @@ -3583,13 +4581,14 @@ def read_validating_admission_policy_with_http_info(self, name, **kwargs): # no body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ValidatingAdmissionPolicy', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_validating_admission_policy_binding(self, name, **kwargs): # noqa: E501 """read_validating_admission_policy_binding # noqa: E501 @@ -3597,22 +4596,28 @@ def read_validating_admission_policy_binding(self, name, **kwargs): # noqa: E50 read the specified ValidatingAdmissionPolicyBinding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_validating_admission_policy_binding(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingAdmissionPolicyBinding (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the ValidatingAdmissionPolicyBinding (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ValidatingAdmissionPolicyBinding + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ValidatingAdmissionPolicyBinding """ kwargs['_return_http_data_only'] = True return self.read_validating_admission_policy_binding_with_http_info(name, **kwargs) # noqa: E501 @@ -3623,24 +4628,36 @@ def read_validating_admission_policy_binding_with_http_info(self, name, **kwargs read the specified ValidatingAdmissionPolicyBinding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_validating_admission_policy_binding_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingAdmissionPolicyBinding (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the ValidatingAdmissionPolicyBinding (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ValidatingAdmissionPolicyBinding, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ValidatingAdmissionPolicyBinding, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -3654,7 +4671,10 @@ def read_validating_admission_policy_binding_with_http_info(self, name, **kwargs 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -3667,8 +4687,7 @@ def read_validating_admission_policy_binding_with_http_info(self, name, **kwargs local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_validating_admission_policy_binding`") # noqa: E501 collection_formats = {} @@ -3678,10 +4697,10 @@ def read_validating_admission_policy_binding_with_http_info(self, name, **kwargs path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -3689,11 +4708,16 @@ def read_validating_admission_policy_binding_with_http_info(self, name, **kwargs body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ValidatingAdmissionPolicyBinding", + 401: None, + } + return self.api_client.call_api( '/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicybindings/{name}', 'GET', path_params, @@ -3702,13 +4726,14 @@ def read_validating_admission_policy_binding_with_http_info(self, name, **kwargs body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ValidatingAdmissionPolicyBinding', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_validating_admission_policy_status(self, name, **kwargs): # noqa: E501 """read_validating_admission_policy_status # noqa: E501 @@ -3716,22 +4741,28 @@ def read_validating_admission_policy_status(self, name, **kwargs): # noqa: E501 read status of the specified ValidatingAdmissionPolicy # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_validating_admission_policy_status(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingAdmissionPolicy (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the ValidatingAdmissionPolicy (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ValidatingAdmissionPolicy + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ValidatingAdmissionPolicy """ kwargs['_return_http_data_only'] = True return self.read_validating_admission_policy_status_with_http_info(name, **kwargs) # noqa: E501 @@ -3742,24 +4773,36 @@ def read_validating_admission_policy_status_with_http_info(self, name, **kwargs) read status of the specified ValidatingAdmissionPolicy # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_validating_admission_policy_status_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingAdmissionPolicy (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the ValidatingAdmissionPolicy (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ValidatingAdmissionPolicy, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ValidatingAdmissionPolicy, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -3773,7 +4816,10 @@ def read_validating_admission_policy_status_with_http_info(self, name, **kwargs) 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -3786,8 +4832,7 @@ def read_validating_admission_policy_status_with_http_info(self, name, **kwargs) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_validating_admission_policy_status`") # noqa: E501 collection_formats = {} @@ -3797,10 +4842,10 @@ def read_validating_admission_policy_status_with_http_info(self, name, **kwargs) path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -3808,11 +4853,16 @@ def read_validating_admission_policy_status_with_http_info(self, name, **kwargs) body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ValidatingAdmissionPolicy", + 401: None, + } + return self.api_client.call_api( '/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies/{name}/status', 'GET', path_params, @@ -3821,13 +4871,14 @@ def read_validating_admission_policy_status_with_http_info(self, name, **kwargs) body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ValidatingAdmissionPolicy', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_validating_webhook_configuration(self, name, **kwargs): # noqa: E501 """read_validating_webhook_configuration # noqa: E501 @@ -3835,22 +4886,28 @@ def read_validating_webhook_configuration(self, name, **kwargs): # noqa: E501 read the specified ValidatingWebhookConfiguration # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_validating_webhook_configuration(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingWebhookConfiguration (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the ValidatingWebhookConfiguration (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ValidatingWebhookConfiguration + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ValidatingWebhookConfiguration """ kwargs['_return_http_data_only'] = True return self.read_validating_webhook_configuration_with_http_info(name, **kwargs) # noqa: E501 @@ -3861,24 +4918,36 @@ def read_validating_webhook_configuration_with_http_info(self, name, **kwargs): read the specified ValidatingWebhookConfiguration # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_validating_webhook_configuration_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingWebhookConfiguration (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the ValidatingWebhookConfiguration (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ValidatingWebhookConfiguration, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ValidatingWebhookConfiguration, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -3892,7 +4961,10 @@ def read_validating_webhook_configuration_with_http_info(self, name, **kwargs): 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -3905,8 +4977,7 @@ def read_validating_webhook_configuration_with_http_info(self, name, **kwargs): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_validating_webhook_configuration`") # noqa: E501 collection_formats = {} @@ -3916,10 +4987,10 @@ def read_validating_webhook_configuration_with_http_info(self, name, **kwargs): path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -3927,11 +4998,16 @@ def read_validating_webhook_configuration_with_http_info(self, name, **kwargs): body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ValidatingWebhookConfiguration", + 401: None, + } + return self.api_client.call_api( '/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name}', 'GET', path_params, @@ -3940,13 +5016,14 @@ def read_validating_webhook_configuration_with_http_info(self, name, **kwargs): body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ValidatingWebhookConfiguration', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_mutating_webhook_configuration(self, name, body, **kwargs): # noqa: E501 """replace_mutating_webhook_configuration # noqa: E501 @@ -3954,26 +5031,36 @@ def replace_mutating_webhook_configuration(self, name, body, **kwargs): # noqa: replace the specified MutatingWebhookConfiguration # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_mutating_webhook_configuration(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the MutatingWebhookConfiguration (required) - :param V1MutatingWebhookConfiguration body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the MutatingWebhookConfiguration (required) + :type name: str + :param body: (required) + :type body: V1MutatingWebhookConfiguration + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1MutatingWebhookConfiguration + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1MutatingWebhookConfiguration """ kwargs['_return_http_data_only'] = True return self.replace_mutating_webhook_configuration_with_http_info(name, body, **kwargs) # noqa: E501 @@ -3984,28 +5071,44 @@ def replace_mutating_webhook_configuration_with_http_info(self, name, body, **kw replace the specified MutatingWebhookConfiguration # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_mutating_webhook_configuration_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the MutatingWebhookConfiguration (required) - :param V1MutatingWebhookConfiguration body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the MutatingWebhookConfiguration (required) + :type name: str + :param body: (required) + :type body: V1MutatingWebhookConfiguration + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1MutatingWebhookConfiguration, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1MutatingWebhookConfiguration, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -4023,7 +5126,10 @@ def replace_mutating_webhook_configuration_with_http_info(self, name, body, **kw 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -4036,12 +5142,10 @@ def replace_mutating_webhook_configuration_with_http_info(self, name, body, **kw local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_mutating_webhook_configuration`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_mutating_webhook_configuration`") # noqa: E501 collection_formats = {} @@ -4051,16 +5155,16 @@ def replace_mutating_webhook_configuration_with_http_info(self, name, body, **kw path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -4070,11 +5174,17 @@ def replace_mutating_webhook_configuration_with_http_info(self, name, body, **kw body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1MutatingWebhookConfiguration", + 201: "V1MutatingWebhookConfiguration", + 401: None, + } + return self.api_client.call_api( '/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations/{name}', 'PUT', path_params, @@ -4083,13 +5193,14 @@ def replace_mutating_webhook_configuration_with_http_info(self, name, body, **kw body=body_params, post_params=form_params, files=local_var_files, - response_type='V1MutatingWebhookConfiguration', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_validating_admission_policy(self, name, body, **kwargs): # noqa: E501 """replace_validating_admission_policy # noqa: E501 @@ -4097,26 +5208,36 @@ def replace_validating_admission_policy(self, name, body, **kwargs): # noqa: E5 replace the specified ValidatingAdmissionPolicy # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_validating_admission_policy(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingAdmissionPolicy (required) - :param V1ValidatingAdmissionPolicy body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the ValidatingAdmissionPolicy (required) + :type name: str + :param body: (required) + :type body: V1ValidatingAdmissionPolicy + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ValidatingAdmissionPolicy + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ValidatingAdmissionPolicy """ kwargs['_return_http_data_only'] = True return self.replace_validating_admission_policy_with_http_info(name, body, **kwargs) # noqa: E501 @@ -4127,28 +5248,44 @@ def replace_validating_admission_policy_with_http_info(self, name, body, **kwarg replace the specified ValidatingAdmissionPolicy # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_validating_admission_policy_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingAdmissionPolicy (required) - :param V1ValidatingAdmissionPolicy body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the ValidatingAdmissionPolicy (required) + :type name: str + :param body: (required) + :type body: V1ValidatingAdmissionPolicy + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ValidatingAdmissionPolicy, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ValidatingAdmissionPolicy, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -4166,7 +5303,10 @@ def replace_validating_admission_policy_with_http_info(self, name, body, **kwarg 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -4179,12 +5319,10 @@ def replace_validating_admission_policy_with_http_info(self, name, body, **kwarg local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_validating_admission_policy`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_validating_admission_policy`") # noqa: E501 collection_formats = {} @@ -4194,16 +5332,16 @@ def replace_validating_admission_policy_with_http_info(self, name, body, **kwarg path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -4213,11 +5351,17 @@ def replace_validating_admission_policy_with_http_info(self, name, body, **kwarg body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ValidatingAdmissionPolicy", + 201: "V1ValidatingAdmissionPolicy", + 401: None, + } + return self.api_client.call_api( '/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies/{name}', 'PUT', path_params, @@ -4226,13 +5370,14 @@ def replace_validating_admission_policy_with_http_info(self, name, body, **kwarg body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ValidatingAdmissionPolicy', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_validating_admission_policy_binding(self, name, body, **kwargs): # noqa: E501 """replace_validating_admission_policy_binding # noqa: E501 @@ -4240,26 +5385,36 @@ def replace_validating_admission_policy_binding(self, name, body, **kwargs): # replace the specified ValidatingAdmissionPolicyBinding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_validating_admission_policy_binding(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingAdmissionPolicyBinding (required) - :param V1ValidatingAdmissionPolicyBinding body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the ValidatingAdmissionPolicyBinding (required) + :type name: str + :param body: (required) + :type body: V1ValidatingAdmissionPolicyBinding + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ValidatingAdmissionPolicyBinding + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ValidatingAdmissionPolicyBinding """ kwargs['_return_http_data_only'] = True return self.replace_validating_admission_policy_binding_with_http_info(name, body, **kwargs) # noqa: E501 @@ -4270,28 +5425,44 @@ def replace_validating_admission_policy_binding_with_http_info(self, name, body, replace the specified ValidatingAdmissionPolicyBinding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_validating_admission_policy_binding_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingAdmissionPolicyBinding (required) - :param V1ValidatingAdmissionPolicyBinding body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the ValidatingAdmissionPolicyBinding (required) + :type name: str + :param body: (required) + :type body: V1ValidatingAdmissionPolicyBinding + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ValidatingAdmissionPolicyBinding, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ValidatingAdmissionPolicyBinding, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -4309,7 +5480,10 @@ def replace_validating_admission_policy_binding_with_http_info(self, name, body, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -4322,12 +5496,10 @@ def replace_validating_admission_policy_binding_with_http_info(self, name, body, local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_validating_admission_policy_binding`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_validating_admission_policy_binding`") # noqa: E501 collection_formats = {} @@ -4337,16 +5509,16 @@ def replace_validating_admission_policy_binding_with_http_info(self, name, body, path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -4356,11 +5528,17 @@ def replace_validating_admission_policy_binding_with_http_info(self, name, body, body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ValidatingAdmissionPolicyBinding", + 201: "V1ValidatingAdmissionPolicyBinding", + 401: None, + } + return self.api_client.call_api( '/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicybindings/{name}', 'PUT', path_params, @@ -4369,13 +5547,14 @@ def replace_validating_admission_policy_binding_with_http_info(self, name, body, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ValidatingAdmissionPolicyBinding', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_validating_admission_policy_status(self, name, body, **kwargs): # noqa: E501 """replace_validating_admission_policy_status # noqa: E501 @@ -4383,26 +5562,36 @@ def replace_validating_admission_policy_status(self, name, body, **kwargs): # n replace status of the specified ValidatingAdmissionPolicy # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_validating_admission_policy_status(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingAdmissionPolicy (required) - :param V1ValidatingAdmissionPolicy body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the ValidatingAdmissionPolicy (required) + :type name: str + :param body: (required) + :type body: V1ValidatingAdmissionPolicy + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ValidatingAdmissionPolicy + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ValidatingAdmissionPolicy """ kwargs['_return_http_data_only'] = True return self.replace_validating_admission_policy_status_with_http_info(name, body, **kwargs) # noqa: E501 @@ -4413,28 +5602,44 @@ def replace_validating_admission_policy_status_with_http_info(self, name, body, replace status of the specified ValidatingAdmissionPolicy # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_validating_admission_policy_status_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingAdmissionPolicy (required) - :param V1ValidatingAdmissionPolicy body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the ValidatingAdmissionPolicy (required) + :type name: str + :param body: (required) + :type body: V1ValidatingAdmissionPolicy + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ValidatingAdmissionPolicy, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ValidatingAdmissionPolicy, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -4452,7 +5657,10 @@ def replace_validating_admission_policy_status_with_http_info(self, name, body, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -4465,12 +5673,10 @@ def replace_validating_admission_policy_status_with_http_info(self, name, body, local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_validating_admission_policy_status`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_validating_admission_policy_status`") # noqa: E501 collection_formats = {} @@ -4480,16 +5686,16 @@ def replace_validating_admission_policy_status_with_http_info(self, name, body, path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -4499,11 +5705,17 @@ def replace_validating_admission_policy_status_with_http_info(self, name, body, body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ValidatingAdmissionPolicy", + 201: "V1ValidatingAdmissionPolicy", + 401: None, + } + return self.api_client.call_api( '/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies/{name}/status', 'PUT', path_params, @@ -4512,13 +5724,14 @@ def replace_validating_admission_policy_status_with_http_info(self, name, body, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ValidatingAdmissionPolicy', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_validating_webhook_configuration(self, name, body, **kwargs): # noqa: E501 """replace_validating_webhook_configuration # noqa: E501 @@ -4526,26 +5739,36 @@ def replace_validating_webhook_configuration(self, name, body, **kwargs): # noq replace the specified ValidatingWebhookConfiguration # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_validating_webhook_configuration(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingWebhookConfiguration (required) - :param V1ValidatingWebhookConfiguration body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the ValidatingWebhookConfiguration (required) + :type name: str + :param body: (required) + :type body: V1ValidatingWebhookConfiguration + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ValidatingWebhookConfiguration + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ValidatingWebhookConfiguration """ kwargs['_return_http_data_only'] = True return self.replace_validating_webhook_configuration_with_http_info(name, body, **kwargs) # noqa: E501 @@ -4556,28 +5779,44 @@ def replace_validating_webhook_configuration_with_http_info(self, name, body, ** replace the specified ValidatingWebhookConfiguration # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_validating_webhook_configuration_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingWebhookConfiguration (required) - :param V1ValidatingWebhookConfiguration body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the ValidatingWebhookConfiguration (required) + :type name: str + :param body: (required) + :type body: V1ValidatingWebhookConfiguration + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ValidatingWebhookConfiguration, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ValidatingWebhookConfiguration, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -4595,7 +5834,10 @@ def replace_validating_webhook_configuration_with_http_info(self, name, body, ** 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -4608,12 +5850,10 @@ def replace_validating_webhook_configuration_with_http_info(self, name, body, ** local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_validating_webhook_configuration`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_validating_webhook_configuration`") # noqa: E501 collection_formats = {} @@ -4623,16 +5863,16 @@ def replace_validating_webhook_configuration_with_http_info(self, name, body, ** path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -4642,11 +5882,17 @@ def replace_validating_webhook_configuration_with_http_info(self, name, body, ** body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ValidatingWebhookConfiguration", + 201: "V1ValidatingWebhookConfiguration", + 401: None, + } + return self.api_client.call_api( '/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name}', 'PUT', path_params, @@ -4655,10 +5901,11 @@ def replace_validating_webhook_configuration_with_http_info(self, name, body, ** body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ValidatingWebhookConfiguration', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) diff --git a/kubernetes/client/api/admissionregistration_v1alpha1_api.py b/kubernetes/client/api/admissionregistration_v1alpha1_api.py index dbdffe0af6..2f99792536 100644 --- a/kubernetes/client/api/admissionregistration_v1alpha1_api.py +++ b/kubernetes/client/api/admissionregistration_v1alpha1_api.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ @@ -36,62 +36,86 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def create_validating_admission_policy(self, body, **kwargs): # noqa: E501 - """create_validating_admission_policy # noqa: E501 + def create_mutating_admission_policy(self, body, **kwargs): # noqa: E501 + """create_mutating_admission_policy # noqa: E501 - create a ValidatingAdmissionPolicy # noqa: E501 + create a MutatingAdmissionPolicy # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_validating_admission_policy(body, async_req=True) + + >>> thread = api.create_mutating_admission_policy(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param V1alpha1ValidatingAdmissionPolicy body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param body: (required) + :type body: V1alpha1MutatingAdmissionPolicy + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1alpha1ValidatingAdmissionPolicy + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1alpha1MutatingAdmissionPolicy """ kwargs['_return_http_data_only'] = True - return self.create_validating_admission_policy_with_http_info(body, **kwargs) # noqa: E501 + return self.create_mutating_admission_policy_with_http_info(body, **kwargs) # noqa: E501 - def create_validating_admission_policy_with_http_info(self, body, **kwargs): # noqa: E501 - """create_validating_admission_policy # noqa: E501 + def create_mutating_admission_policy_with_http_info(self, body, **kwargs): # noqa: E501 + """create_mutating_admission_policy # noqa: E501 - create a ValidatingAdmissionPolicy # noqa: E501 + create a MutatingAdmissionPolicy # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_validating_admission_policy_with_http_info(body, async_req=True) + + >>> thread = api.create_mutating_admission_policy_with_http_info(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param V1alpha1ValidatingAdmissionPolicy body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param body: (required) + :type body: V1alpha1MutatingAdmissionPolicy + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1alpha1ValidatingAdmissionPolicy, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1alpha1MutatingAdmissionPolicy, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -108,7 +132,10 @@ def create_validating_admission_policy_with_http_info(self, body, **kwargs): # 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -116,30 +143,29 @@ def create_validating_admission_policy_with_http_info(self, body, **kwargs): # if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method create_validating_admission_policy" % key + " to method create_mutating_admission_policy" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `create_validating_admission_policy`") # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `create_mutating_admission_policy`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -149,83 +175,115 @@ def create_validating_admission_policy_with_http_info(self, body, **kwargs): # body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1alpha1MutatingAdmissionPolicy", + 201: "V1alpha1MutatingAdmissionPolicy", + 202: "V1alpha1MutatingAdmissionPolicy", + 401: None, + } + return self.api_client.call_api( - '/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies', 'POST', + '/apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicies', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1alpha1ValidatingAdmissionPolicy', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) - def create_validating_admission_policy_binding(self, body, **kwargs): # noqa: E501 - """create_validating_admission_policy_binding # noqa: E501 + def create_mutating_admission_policy_binding(self, body, **kwargs): # noqa: E501 + """create_mutating_admission_policy_binding # noqa: E501 - create a ValidatingAdmissionPolicyBinding # noqa: E501 + create a MutatingAdmissionPolicyBinding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_validating_admission_policy_binding(body, async_req=True) + + >>> thread = api.create_mutating_admission_policy_binding(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param V1alpha1ValidatingAdmissionPolicyBinding body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param body: (required) + :type body: V1alpha1MutatingAdmissionPolicyBinding + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1alpha1ValidatingAdmissionPolicyBinding + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1alpha1MutatingAdmissionPolicyBinding """ kwargs['_return_http_data_only'] = True - return self.create_validating_admission_policy_binding_with_http_info(body, **kwargs) # noqa: E501 + return self.create_mutating_admission_policy_binding_with_http_info(body, **kwargs) # noqa: E501 - def create_validating_admission_policy_binding_with_http_info(self, body, **kwargs): # noqa: E501 - """create_validating_admission_policy_binding # noqa: E501 + def create_mutating_admission_policy_binding_with_http_info(self, body, **kwargs): # noqa: E501 + """create_mutating_admission_policy_binding # noqa: E501 - create a ValidatingAdmissionPolicyBinding # noqa: E501 + create a MutatingAdmissionPolicyBinding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_validating_admission_policy_binding_with_http_info(body, async_req=True) + + >>> thread = api.create_mutating_admission_policy_binding_with_http_info(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param V1alpha1ValidatingAdmissionPolicyBinding body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param body: (required) + :type body: V1alpha1MutatingAdmissionPolicyBinding + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1alpha1ValidatingAdmissionPolicyBinding, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1alpha1MutatingAdmissionPolicyBinding, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -242,7 +300,10 @@ def create_validating_admission_policy_binding_with_http_info(self, body, **kwar 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -250,30 +311,29 @@ def create_validating_admission_policy_binding_with_http_info(self, body, **kwar if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method create_validating_admission_policy_binding" % key + " to method create_mutating_admission_policy_binding" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `create_validating_admission_policy_binding`") # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `create_mutating_admission_policy_binding`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -283,101 +343,155 @@ def create_validating_admission_policy_binding_with_http_info(self, body, **kwar body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1alpha1MutatingAdmissionPolicyBinding", + 201: "V1alpha1MutatingAdmissionPolicyBinding", + 202: "V1alpha1MutatingAdmissionPolicyBinding", + 401: None, + } + return self.api_client.call_api( - '/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicybindings', 'POST', + '/apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicybindings', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1alpha1ValidatingAdmissionPolicyBinding', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) - def delete_collection_validating_admission_policy(self, **kwargs): # noqa: E501 - """delete_collection_validating_admission_policy # noqa: E501 + def delete_collection_mutating_admission_policy(self, **kwargs): # noqa: E501 + """delete_collection_mutating_admission_policy # noqa: E501 - delete collection of ValidatingAdmissionPolicy # noqa: E501 + delete collection of MutatingAdmissionPolicy # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_collection_validating_admission_policy(async_req=True) + + >>> thread = api.delete_collection_mutating_admission_policy(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True - return self.delete_collection_validating_admission_policy_with_http_info(**kwargs) # noqa: E501 + return self.delete_collection_mutating_admission_policy_with_http_info(**kwargs) # noqa: E501 - def delete_collection_validating_admission_policy_with_http_info(self, **kwargs): # noqa: E501 - """delete_collection_validating_admission_policy # noqa: E501 + def delete_collection_mutating_admission_policy_with_http_info(self, **kwargs): # noqa: E501 + """delete_collection_mutating_admission_policy # noqa: E501 - delete collection of ValidatingAdmissionPolicy # noqa: E501 + delete collection of MutatingAdmissionPolicy # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_collection_validating_admission_policy_with_http_info(async_req=True) + + >>> thread = api.delete_collection_mutating_admission_policy_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -388,6 +502,7 @@ def delete_collection_validating_admission_policy_with_http_info(self, **kwargs) 'dry_run', 'field_selector', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'label_selector', 'limit', 'orphan_dependents', @@ -403,7 +518,10 @@ def delete_collection_validating_admission_policy_with_http_info(self, **kwargs) 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -411,7 +529,7 @@ def delete_collection_validating_admission_policy_with_http_info(self, **kwargs) if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method delete_collection_validating_admission_policy" % key + " to method delete_collection_mutating_admission_policy" % key ) local_var_params[key] = val del local_var_params['kwargs'] @@ -421,34 +539,36 @@ def delete_collection_validating_admission_policy_with_http_info(self, **kwargs) path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -458,101 +578,153 @@ def delete_collection_validating_admission_policy_with_http_info(self, **kwargs) body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 401: None, + } + return self.api_client.call_api( - '/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies', 'DELETE', + '/apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicies', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) - def delete_collection_validating_admission_policy_binding(self, **kwargs): # noqa: E501 - """delete_collection_validating_admission_policy_binding # noqa: E501 + def delete_collection_mutating_admission_policy_binding(self, **kwargs): # noqa: E501 + """delete_collection_mutating_admission_policy_binding # noqa: E501 - delete collection of ValidatingAdmissionPolicyBinding # noqa: E501 + delete collection of MutatingAdmissionPolicyBinding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_collection_validating_admission_policy_binding(async_req=True) + + >>> thread = api.delete_collection_mutating_admission_policy_binding(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True - return self.delete_collection_validating_admission_policy_binding_with_http_info(**kwargs) # noqa: E501 + return self.delete_collection_mutating_admission_policy_binding_with_http_info(**kwargs) # noqa: E501 - def delete_collection_validating_admission_policy_binding_with_http_info(self, **kwargs): # noqa: E501 - """delete_collection_validating_admission_policy_binding # noqa: E501 + def delete_collection_mutating_admission_policy_binding_with_http_info(self, **kwargs): # noqa: E501 + """delete_collection_mutating_admission_policy_binding # noqa: E501 - delete collection of ValidatingAdmissionPolicyBinding # noqa: E501 + delete collection of MutatingAdmissionPolicyBinding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_collection_validating_admission_policy_binding_with_http_info(async_req=True) + + >>> thread = api.delete_collection_mutating_admission_policy_binding_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -563,6 +735,7 @@ def delete_collection_validating_admission_policy_binding_with_http_info(self, * 'dry_run', 'field_selector', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'label_selector', 'limit', 'orphan_dependents', @@ -578,7 +751,10 @@ def delete_collection_validating_admission_policy_binding_with_http_info(self, * 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -586,7 +762,7 @@ def delete_collection_validating_admission_policy_binding_with_http_info(self, * if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method delete_collection_validating_admission_policy_binding" % key + " to method delete_collection_mutating_admission_policy_binding" % key ) local_var_params[key] = val del local_var_params['kwargs'] @@ -596,34 +772,36 @@ def delete_collection_validating_admission_policy_binding_with_http_info(self, * path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -633,87 +811,125 @@ def delete_collection_validating_admission_policy_binding_with_http_info(self, * body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 401: None, + } + return self.api_client.call_api( - '/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicybindings', 'DELETE', + '/apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicybindings', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) - def delete_validating_admission_policy(self, name, **kwargs): # noqa: E501 - """delete_validating_admission_policy # noqa: E501 + def delete_mutating_admission_policy(self, name, **kwargs): # noqa: E501 + """delete_mutating_admission_policy # noqa: E501 - delete a ValidatingAdmissionPolicy # noqa: E501 + delete a MutatingAdmissionPolicy # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_validating_admission_policy(name, async_req=True) + + >>> thread = api.delete_mutating_admission_policy(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingAdmissionPolicy (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the MutatingAdmissionPolicy (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True - return self.delete_validating_admission_policy_with_http_info(name, **kwargs) # noqa: E501 + return self.delete_mutating_admission_policy_with_http_info(name, **kwargs) # noqa: E501 - def delete_validating_admission_policy_with_http_info(self, name, **kwargs): # noqa: E501 - """delete_validating_admission_policy # noqa: E501 + def delete_mutating_admission_policy_with_http_info(self, name, **kwargs): # noqa: E501 + """delete_mutating_admission_policy # noqa: E501 - delete a ValidatingAdmissionPolicy # noqa: E501 + delete a MutatingAdmissionPolicy # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_validating_admission_policy_with_http_info(name, async_req=True) + + >>> thread = api.delete_mutating_admission_policy_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingAdmissionPolicy (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the MutatingAdmissionPolicy (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -723,6 +939,7 @@ def delete_validating_admission_policy_with_http_info(self, name, **kwargs): # 'pretty', 'dry_run', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'orphan_dependents', 'propagation_policy', 'body' @@ -732,7 +949,10 @@ def delete_validating_admission_policy_with_http_info(self, name, **kwargs): # 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -740,14 +960,13 @@ def delete_validating_admission_policy_with_http_info(self, name, **kwargs): # if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method delete_validating_admission_policy" % key + " to method delete_mutating_admission_policy" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `delete_validating_admission_policy`") # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `delete_mutating_admission_policy`") # noqa: E501 collection_formats = {} @@ -756,18 +975,20 @@ def delete_validating_admission_policy_with_http_info(self, name, **kwargs): # path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -777,87 +998,126 @@ def delete_validating_admission_policy_with_http_info(self, name, **kwargs): # body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 202: "V1Status", + 401: None, + } + return self.api_client.call_api( - '/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies/{name}', 'DELETE', + '/apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicies/{name}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) - def delete_validating_admission_policy_binding(self, name, **kwargs): # noqa: E501 - """delete_validating_admission_policy_binding # noqa: E501 + def delete_mutating_admission_policy_binding(self, name, **kwargs): # noqa: E501 + """delete_mutating_admission_policy_binding # noqa: E501 - delete a ValidatingAdmissionPolicyBinding # noqa: E501 + delete a MutatingAdmissionPolicyBinding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_validating_admission_policy_binding(name, async_req=True) + + >>> thread = api.delete_mutating_admission_policy_binding(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingAdmissionPolicyBinding (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the MutatingAdmissionPolicyBinding (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True - return self.delete_validating_admission_policy_binding_with_http_info(name, **kwargs) # noqa: E501 + return self.delete_mutating_admission_policy_binding_with_http_info(name, **kwargs) # noqa: E501 - def delete_validating_admission_policy_binding_with_http_info(self, name, **kwargs): # noqa: E501 - """delete_validating_admission_policy_binding # noqa: E501 + def delete_mutating_admission_policy_binding_with_http_info(self, name, **kwargs): # noqa: E501 + """delete_mutating_admission_policy_binding # noqa: E501 - delete a ValidatingAdmissionPolicyBinding # noqa: E501 + delete a MutatingAdmissionPolicyBinding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_validating_admission_policy_binding_with_http_info(name, async_req=True) + + >>> thread = api.delete_mutating_admission_policy_binding_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingAdmissionPolicyBinding (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the MutatingAdmissionPolicyBinding (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -867,6 +1127,7 @@ def delete_validating_admission_policy_binding_with_http_info(self, name, **kwar 'pretty', 'dry_run', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'orphan_dependents', 'propagation_policy', 'body' @@ -876,7 +1137,10 @@ def delete_validating_admission_policy_binding_with_http_info(self, name, **kwar 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -884,14 +1148,13 @@ def delete_validating_admission_policy_binding_with_http_info(self, name, **kwar if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method delete_validating_admission_policy_binding" % key + " to method delete_mutating_admission_policy_binding" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `delete_validating_admission_policy_binding`") # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `delete_mutating_admission_policy_binding`") # noqa: E501 collection_formats = {} @@ -900,18 +1163,20 @@ def delete_validating_admission_policy_binding_with_http_info(self, name, **kwar path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -921,26 +1186,33 @@ def delete_validating_admission_policy_binding_with_http_info(self, name, **kwar body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 202: "V1Status", + 401: None, + } + return self.api_client.call_api( - '/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicybindings/{name}', 'DELETE', + '/apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicybindings/{name}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def get_api_resources(self, **kwargs): # noqa: E501 """get_api_resources # noqa: E501 @@ -948,20 +1220,24 @@ def get_api_resources(self, **kwargs): # noqa: E501 get available resources # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_resources(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1APIResourceList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1APIResourceList """ kwargs['_return_http_data_only'] = True return self.get_api_resources_with_http_info(**kwargs) # noqa: E501 @@ -972,22 +1248,32 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 get available resources # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_resources_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -999,7 +1285,10 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1018,7 +1307,7 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1026,11 +1315,16 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1APIResourceList", + 401: None, + } + return self.api_client.call_api( '/apis/admissionregistration.k8s.io/v1alpha1/', 'GET', path_params, @@ -1039,82 +1333,119 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1APIResourceList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) - def list_validating_admission_policy(self, **kwargs): # noqa: E501 - """list_validating_admission_policy # noqa: E501 + def list_mutating_admission_policy(self, **kwargs): # noqa: E501 + """list_mutating_admission_policy # noqa: E501 - list or watch objects of kind ValidatingAdmissionPolicy # noqa: E501 + list or watch objects of kind MutatingAdmissionPolicy # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_validating_admission_policy(async_req=True) + + >>> thread = api.list_mutating_admission_policy(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1alpha1ValidatingAdmissionPolicyList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1alpha1MutatingAdmissionPolicyList """ kwargs['_return_http_data_only'] = True - return self.list_validating_admission_policy_with_http_info(**kwargs) # noqa: E501 + return self.list_mutating_admission_policy_with_http_info(**kwargs) # noqa: E501 - def list_validating_admission_policy_with_http_info(self, **kwargs): # noqa: E501 - """list_validating_admission_policy # noqa: E501 + def list_mutating_admission_policy_with_http_info(self, **kwargs): # noqa: E501 + """list_mutating_admission_policy # noqa: E501 - list or watch objects of kind ValidatingAdmissionPolicy # noqa: E501 + list or watch objects of kind MutatingAdmissionPolicy # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_validating_admission_policy_with_http_info(async_req=True) + + >>> thread = api.list_mutating_admission_policy_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1alpha1ValidatingAdmissionPolicyList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1alpha1MutatingAdmissionPolicyList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1137,7 +1468,10 @@ def list_validating_admission_policy_with_http_info(self, **kwargs): # noqa: E5 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1145,7 +1479,7 @@ def list_validating_admission_policy_with_http_info(self, **kwargs): # noqa: E5 if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method list_validating_admission_policy" % key + " to method list_mutating_admission_policy" % key ) local_var_params[key] = val del local_var_params['kwargs'] @@ -1155,30 +1489,30 @@ def list_validating_admission_policy_with_http_info(self, **kwargs): # noqa: E5 path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1186,95 +1520,137 @@ def list_validating_admission_policy_with_http_info(self, **kwargs): # noqa: E5 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1alpha1MutatingAdmissionPolicyList", + 401: None, + } + return self.api_client.call_api( - '/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies', 'GET', + '/apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicies', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1alpha1ValidatingAdmissionPolicyList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) - def list_validating_admission_policy_binding(self, **kwargs): # noqa: E501 - """list_validating_admission_policy_binding # noqa: E501 + def list_mutating_admission_policy_binding(self, **kwargs): # noqa: E501 + """list_mutating_admission_policy_binding # noqa: E501 - list or watch objects of kind ValidatingAdmissionPolicyBinding # noqa: E501 + list or watch objects of kind MutatingAdmissionPolicyBinding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_validating_admission_policy_binding(async_req=True) + + >>> thread = api.list_mutating_admission_policy_binding(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1alpha1ValidatingAdmissionPolicyBindingList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1alpha1MutatingAdmissionPolicyBindingList """ kwargs['_return_http_data_only'] = True - return self.list_validating_admission_policy_binding_with_http_info(**kwargs) # noqa: E501 + return self.list_mutating_admission_policy_binding_with_http_info(**kwargs) # noqa: E501 - def list_validating_admission_policy_binding_with_http_info(self, **kwargs): # noqa: E501 - """list_validating_admission_policy_binding # noqa: E501 + def list_mutating_admission_policy_binding_with_http_info(self, **kwargs): # noqa: E501 + """list_mutating_admission_policy_binding # noqa: E501 - list or watch objects of kind ValidatingAdmissionPolicyBinding # noqa: E501 + list or watch objects of kind MutatingAdmissionPolicyBinding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_validating_admission_policy_binding_with_http_info(async_req=True) + + >>> thread = api.list_mutating_admission_policy_binding_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1alpha1ValidatingAdmissionPolicyBindingList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1alpha1MutatingAdmissionPolicyBindingList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1297,7 +1673,10 @@ def list_validating_admission_policy_binding_with_http_info(self, **kwargs): # 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1305,7 +1684,7 @@ def list_validating_admission_policy_binding_with_http_info(self, **kwargs): # if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method list_validating_admission_policy_binding" % key + " to method list_mutating_admission_policy_binding" % key ) local_var_params[key] = val del local_var_params['kwargs'] @@ -1315,30 +1694,30 @@ def list_validating_admission_policy_binding_with_http_info(self, **kwargs): # path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1346,239 +1725,121 @@ def list_validating_admission_policy_binding_with_http_info(self, **kwargs): # body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 - return self.api_client.call_api( - '/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicybindings', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha1ValidatingAdmissionPolicyBindingList', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def patch_validating_admission_policy(self, name, body, **kwargs): # noqa: E501 - """patch_validating_admission_policy # noqa: E501 - - partially update the specified ValidatingAdmissionPolicy # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_validating_admission_policy(name, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingAdmissionPolicy (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha1ValidatingAdmissionPolicy - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.patch_validating_admission_policy_with_http_info(name, body, **kwargs) # noqa: E501 - - def patch_validating_admission_policy_with_http_info(self, name, body, **kwargs): # noqa: E501 - """patch_validating_admission_policy # noqa: E501 - - partially update the specified ValidatingAdmissionPolicy # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_validating_admission_policy_with_http_info(name, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingAdmissionPolicy (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha1ValidatingAdmissionPolicy, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'body', - 'pretty', - 'dry_run', - 'field_manager', - 'field_validation', - 'force' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method patch_validating_admission_policy" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `patch_validating_admission_policy`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `patch_validating_admission_policy`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 - query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 - query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 - query_params.append(('force', local_var_params['force'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1alpha1MutatingAdmissionPolicyBindingList", + 401: None, + } return self.api_client.call_api( - '/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies/{name}', 'PATCH', + '/apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicybindings', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1alpha1ValidatingAdmissionPolicy', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) - def patch_validating_admission_policy_binding(self, name, body, **kwargs): # noqa: E501 - """patch_validating_admission_policy_binding # noqa: E501 + def patch_mutating_admission_policy(self, name, body, **kwargs): # noqa: E501 + """patch_mutating_admission_policy # noqa: E501 - partially update the specified ValidatingAdmissionPolicyBinding # noqa: E501 + partially update the specified MutatingAdmissionPolicy # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_validating_admission_policy_binding(name, body, async_req=True) + + >>> thread = api.patch_mutating_admission_policy(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingAdmissionPolicyBinding (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the MutatingAdmissionPolicy (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1alpha1ValidatingAdmissionPolicyBinding + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1alpha1MutatingAdmissionPolicy """ kwargs['_return_http_data_only'] = True - return self.patch_validating_admission_policy_binding_with_http_info(name, body, **kwargs) # noqa: E501 + return self.patch_mutating_admission_policy_with_http_info(name, body, **kwargs) # noqa: E501 - def patch_validating_admission_policy_binding_with_http_info(self, name, body, **kwargs): # noqa: E501 - """patch_validating_admission_policy_binding # noqa: E501 + def patch_mutating_admission_policy_with_http_info(self, name, body, **kwargs): # noqa: E501 + """patch_mutating_admission_policy # noqa: E501 - partially update the specified ValidatingAdmissionPolicyBinding # noqa: E501 + partially update the specified MutatingAdmissionPolicy # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_validating_admission_policy_binding_with_http_info(name, body, async_req=True) + + >>> thread = api.patch_mutating_admission_policy_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingAdmissionPolicyBinding (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the MutatingAdmissionPolicy (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1alpha1ValidatingAdmissionPolicyBinding, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1alpha1MutatingAdmissionPolicy, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1597,7 +1858,10 @@ def patch_validating_admission_policy_binding_with_http_info(self, name, body, * 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1605,18 +1869,16 @@ def patch_validating_admission_policy_binding_with_http_info(self, name, body, * if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method patch_validating_admission_policy_binding" % key + " to method patch_mutating_admission_policy" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `patch_validating_admission_policy_binding`") # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `patch_mutating_admission_policy`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `patch_validating_admission_policy_binding`") # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `patch_mutating_admission_policy`") # noqa: E501 collection_formats = {} @@ -1625,18 +1887,18 @@ def patch_validating_admission_policy_binding_with_http_info(self, name, body, * path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1646,91 +1908,130 @@ def patch_validating_admission_policy_binding_with_http_info(self, name, body, * body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1alpha1MutatingAdmissionPolicy", + 201: "V1alpha1MutatingAdmissionPolicy", + 401: None, + } + return self.api_client.call_api( - '/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicybindings/{name}', 'PATCH', + '/apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicies/{name}', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1alpha1ValidatingAdmissionPolicyBinding', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) - def patch_validating_admission_policy_status(self, name, body, **kwargs): # noqa: E501 - """patch_validating_admission_policy_status # noqa: E501 + def patch_mutating_admission_policy_binding(self, name, body, **kwargs): # noqa: E501 + """patch_mutating_admission_policy_binding # noqa: E501 - partially update status of the specified ValidatingAdmissionPolicy # noqa: E501 + partially update the specified MutatingAdmissionPolicyBinding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_validating_admission_policy_status(name, body, async_req=True) + + >>> thread = api.patch_mutating_admission_policy_binding(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingAdmissionPolicy (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the MutatingAdmissionPolicyBinding (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1alpha1ValidatingAdmissionPolicy + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1alpha1MutatingAdmissionPolicyBinding """ kwargs['_return_http_data_only'] = True - return self.patch_validating_admission_policy_status_with_http_info(name, body, **kwargs) # noqa: E501 + return self.patch_mutating_admission_policy_binding_with_http_info(name, body, **kwargs) # noqa: E501 - def patch_validating_admission_policy_status_with_http_info(self, name, body, **kwargs): # noqa: E501 - """patch_validating_admission_policy_status # noqa: E501 + def patch_mutating_admission_policy_binding_with_http_info(self, name, body, **kwargs): # noqa: E501 + """patch_mutating_admission_policy_binding # noqa: E501 - partially update status of the specified ValidatingAdmissionPolicy # noqa: E501 + partially update the specified MutatingAdmissionPolicyBinding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_validating_admission_policy_status_with_http_info(name, body, async_req=True) + + >>> thread = api.patch_mutating_admission_policy_binding_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingAdmissionPolicy (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the MutatingAdmissionPolicyBinding (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1alpha1ValidatingAdmissionPolicy, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1alpha1MutatingAdmissionPolicyBinding, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1749,7 +2050,10 @@ def patch_validating_admission_policy_status_with_http_info(self, name, body, ** 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1757,18 +2061,16 @@ def patch_validating_admission_policy_status_with_http_info(self, name, body, ** if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method patch_validating_admission_policy_status" % key + " to method patch_mutating_admission_policy_binding" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `patch_validating_admission_policy_status`") # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `patch_mutating_admission_policy_binding`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `patch_validating_admission_policy_status`") # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `patch_mutating_admission_policy_binding`") # noqa: E501 collection_formats = {} @@ -1777,18 +2079,18 @@ def patch_validating_admission_policy_status_with_http_info(self, name, body, ** path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1798,200 +2100,110 @@ def patch_validating_admission_policy_status_with_http_info(self, name, body, ** body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 - return self.api_client.call_api( - '/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies/{name}/status', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha1ValidatingAdmissionPolicy', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def read_validating_admission_policy(self, name, **kwargs): # noqa: E501 - """read_validating_admission_policy # noqa: E501 - - read the specified ValidatingAdmissionPolicy # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.read_validating_admission_policy(name, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingAdmissionPolicy (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha1ValidatingAdmissionPolicy - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.read_validating_admission_policy_with_http_info(name, **kwargs) # noqa: E501 - - def read_validating_admission_policy_with_http_info(self, name, **kwargs): # noqa: E501 - """read_validating_admission_policy # noqa: E501 - - read the specified ValidatingAdmissionPolicy # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.read_validating_admission_policy_with_http_info(name, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingAdmissionPolicy (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha1ValidatingAdmissionPolicy, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'pretty' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method read_validating_admission_policy" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `read_validating_admission_policy`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1alpha1MutatingAdmissionPolicyBinding", + 201: "V1alpha1MutatingAdmissionPolicyBinding", + 401: None, + } return self.api_client.call_api( - '/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies/{name}', 'GET', + '/apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicybindings/{name}', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1alpha1ValidatingAdmissionPolicy', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) - def read_validating_admission_policy_binding(self, name, **kwargs): # noqa: E501 - """read_validating_admission_policy_binding # noqa: E501 + def read_mutating_admission_policy(self, name, **kwargs): # noqa: E501 + """read_mutating_admission_policy # noqa: E501 - read the specified ValidatingAdmissionPolicyBinding # noqa: E501 + read the specified MutatingAdmissionPolicy # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.read_validating_admission_policy_binding(name, async_req=True) + + >>> thread = api.read_mutating_admission_policy(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingAdmissionPolicyBinding (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the MutatingAdmissionPolicy (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1alpha1ValidatingAdmissionPolicyBinding + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1alpha1MutatingAdmissionPolicy """ kwargs['_return_http_data_only'] = True - return self.read_validating_admission_policy_binding_with_http_info(name, **kwargs) # noqa: E501 + return self.read_mutating_admission_policy_with_http_info(name, **kwargs) # noqa: E501 - def read_validating_admission_policy_binding_with_http_info(self, name, **kwargs): # noqa: E501 - """read_validating_admission_policy_binding # noqa: E501 + def read_mutating_admission_policy_with_http_info(self, name, **kwargs): # noqa: E501 + """read_mutating_admission_policy # noqa: E501 - read the specified ValidatingAdmissionPolicyBinding # noqa: E501 + read the specified MutatingAdmissionPolicy # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.read_validating_admission_policy_binding_with_http_info(name, async_req=True) + + >>> thread = api.read_mutating_admission_policy_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingAdmissionPolicyBinding (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the MutatingAdmissionPolicy (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1alpha1ValidatingAdmissionPolicyBinding, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1alpha1MutatingAdmissionPolicy, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -2005,7 +2217,10 @@ def read_validating_admission_policy_binding_with_http_info(self, name, **kwargs 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2013,14 +2228,13 @@ def read_validating_admission_policy_binding_with_http_info(self, name, **kwargs if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method read_validating_admission_policy_binding" % key + " to method read_mutating_admission_policy" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `read_validating_admission_policy_binding`") # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `read_mutating_admission_policy`") # noqa: E501 collection_formats = {} @@ -2029,10 +2243,10 @@ def read_validating_admission_policy_binding_with_http_info(self, name, **kwargs path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2040,77 +2254,101 @@ def read_validating_admission_policy_binding_with_http_info(self, name, **kwargs body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1alpha1MutatingAdmissionPolicy", + 401: None, + } + return self.api_client.call_api( - '/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicybindings/{name}', 'GET', + '/apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicies/{name}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1alpha1ValidatingAdmissionPolicyBinding', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) - def read_validating_admission_policy_status(self, name, **kwargs): # noqa: E501 - """read_validating_admission_policy_status # noqa: E501 + def read_mutating_admission_policy_binding(self, name, **kwargs): # noqa: E501 + """read_mutating_admission_policy_binding # noqa: E501 - read status of the specified ValidatingAdmissionPolicy # noqa: E501 + read the specified MutatingAdmissionPolicyBinding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.read_validating_admission_policy_status(name, async_req=True) + + >>> thread = api.read_mutating_admission_policy_binding(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingAdmissionPolicy (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the MutatingAdmissionPolicyBinding (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1alpha1ValidatingAdmissionPolicy + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1alpha1MutatingAdmissionPolicyBinding """ kwargs['_return_http_data_only'] = True - return self.read_validating_admission_policy_status_with_http_info(name, **kwargs) # noqa: E501 + return self.read_mutating_admission_policy_binding_with_http_info(name, **kwargs) # noqa: E501 - def read_validating_admission_policy_status_with_http_info(self, name, **kwargs): # noqa: E501 - """read_validating_admission_policy_status # noqa: E501 + def read_mutating_admission_policy_binding_with_http_info(self, name, **kwargs): # noqa: E501 + """read_mutating_admission_policy_binding # noqa: E501 - read status of the specified ValidatingAdmissionPolicy # noqa: E501 + read the specified MutatingAdmissionPolicyBinding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.read_validating_admission_policy_status_with_http_info(name, async_req=True) + + >>> thread = api.read_mutating_admission_policy_binding_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingAdmissionPolicy (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the MutatingAdmissionPolicyBinding (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1alpha1ValidatingAdmissionPolicy, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1alpha1MutatingAdmissionPolicyBinding, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -2124,7 +2362,10 @@ def read_validating_admission_policy_status_with_http_info(self, name, **kwargs) 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2132,14 +2373,13 @@ def read_validating_admission_policy_status_with_http_info(self, name, **kwargs) if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method read_validating_admission_policy_status" % key + " to method read_mutating_admission_policy_binding" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `read_validating_admission_policy_status`") # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `read_mutating_admission_policy_binding`") # noqa: E501 collection_formats = {} @@ -2148,10 +2388,10 @@ def read_validating_admission_policy_status_with_http_info(self, name, **kwargs) path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2159,228 +2399,117 @@ def read_validating_admission_policy_status_with_http_info(self, name, **kwargs) body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 - return self.api_client.call_api( - '/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies/{name}/status', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha1ValidatingAdmissionPolicy', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def replace_validating_admission_policy(self, name, body, **kwargs): # noqa: E501 - """replace_validating_admission_policy # noqa: E501 - - replace the specified ValidatingAdmissionPolicy # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.replace_validating_admission_policy(name, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingAdmissionPolicy (required) - :param V1alpha1ValidatingAdmissionPolicy body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha1ValidatingAdmissionPolicy - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.replace_validating_admission_policy_with_http_info(name, body, **kwargs) # noqa: E501 - - def replace_validating_admission_policy_with_http_info(self, name, body, **kwargs): # noqa: E501 - """replace_validating_admission_policy # noqa: E501 - - replace the specified ValidatingAdmissionPolicy # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.replace_validating_admission_policy_with_http_info(name, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingAdmissionPolicy (required) - :param V1alpha1ValidatingAdmissionPolicy body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha1ValidatingAdmissionPolicy, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'body', - 'pretty', - 'dry_run', - 'field_manager', - 'field_validation' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method replace_validating_admission_policy" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `replace_validating_admission_policy`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `replace_validating_admission_policy`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 - query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 - query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1alpha1MutatingAdmissionPolicyBinding", + 401: None, + } return self.api_client.call_api( - '/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies/{name}', 'PUT', + '/apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicybindings/{name}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1alpha1ValidatingAdmissionPolicy', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) - def replace_validating_admission_policy_binding(self, name, body, **kwargs): # noqa: E501 - """replace_validating_admission_policy_binding # noqa: E501 + def replace_mutating_admission_policy(self, name, body, **kwargs): # noqa: E501 + """replace_mutating_admission_policy # noqa: E501 - replace the specified ValidatingAdmissionPolicyBinding # noqa: E501 + replace the specified MutatingAdmissionPolicy # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.replace_validating_admission_policy_binding(name, body, async_req=True) + + >>> thread = api.replace_mutating_admission_policy(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingAdmissionPolicyBinding (required) - :param V1alpha1ValidatingAdmissionPolicyBinding body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the MutatingAdmissionPolicy (required) + :type name: str + :param body: (required) + :type body: V1alpha1MutatingAdmissionPolicy + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1alpha1ValidatingAdmissionPolicyBinding + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1alpha1MutatingAdmissionPolicy """ kwargs['_return_http_data_only'] = True - return self.replace_validating_admission_policy_binding_with_http_info(name, body, **kwargs) # noqa: E501 + return self.replace_mutating_admission_policy_with_http_info(name, body, **kwargs) # noqa: E501 - def replace_validating_admission_policy_binding_with_http_info(self, name, body, **kwargs): # noqa: E501 - """replace_validating_admission_policy_binding # noqa: E501 + def replace_mutating_admission_policy_with_http_info(self, name, body, **kwargs): # noqa: E501 + """replace_mutating_admission_policy # noqa: E501 - replace the specified ValidatingAdmissionPolicyBinding # noqa: E501 + replace the specified MutatingAdmissionPolicy # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.replace_validating_admission_policy_binding_with_http_info(name, body, async_req=True) + + >>> thread = api.replace_mutating_admission_policy_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingAdmissionPolicyBinding (required) - :param V1alpha1ValidatingAdmissionPolicyBinding body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the MutatingAdmissionPolicy (required) + :type name: str + :param body: (required) + :type body: V1alpha1MutatingAdmissionPolicy + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1alpha1ValidatingAdmissionPolicyBinding, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1alpha1MutatingAdmissionPolicy, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -2398,7 +2527,10 @@ def replace_validating_admission_policy_binding_with_http_info(self, name, body, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2406,18 +2538,16 @@ def replace_validating_admission_policy_binding_with_http_info(self, name, body, if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method replace_validating_admission_policy_binding" % key + " to method replace_mutating_admission_policy" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `replace_validating_admission_policy_binding`") # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `replace_mutating_admission_policy`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `replace_validating_admission_policy_binding`") # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `replace_mutating_admission_policy`") # noqa: E501 collection_formats = {} @@ -2426,16 +2556,16 @@ def replace_validating_admission_policy_binding_with_http_info(self, name, body, path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2445,85 +2575,118 @@ def replace_validating_admission_policy_binding_with_http_info(self, name, body, body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1alpha1MutatingAdmissionPolicy", + 201: "V1alpha1MutatingAdmissionPolicy", + 401: None, + } + return self.api_client.call_api( - '/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicybindings/{name}', 'PUT', + '/apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicies/{name}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1alpha1ValidatingAdmissionPolicyBinding', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) - def replace_validating_admission_policy_status(self, name, body, **kwargs): # noqa: E501 - """replace_validating_admission_policy_status # noqa: E501 + def replace_mutating_admission_policy_binding(self, name, body, **kwargs): # noqa: E501 + """replace_mutating_admission_policy_binding # noqa: E501 - replace status of the specified ValidatingAdmissionPolicy # noqa: E501 + replace the specified MutatingAdmissionPolicyBinding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.replace_validating_admission_policy_status(name, body, async_req=True) + + >>> thread = api.replace_mutating_admission_policy_binding(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingAdmissionPolicy (required) - :param V1alpha1ValidatingAdmissionPolicy body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the MutatingAdmissionPolicyBinding (required) + :type name: str + :param body: (required) + :type body: V1alpha1MutatingAdmissionPolicyBinding + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1alpha1ValidatingAdmissionPolicy + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1alpha1MutatingAdmissionPolicyBinding """ kwargs['_return_http_data_only'] = True - return self.replace_validating_admission_policy_status_with_http_info(name, body, **kwargs) # noqa: E501 + return self.replace_mutating_admission_policy_binding_with_http_info(name, body, **kwargs) # noqa: E501 - def replace_validating_admission_policy_status_with_http_info(self, name, body, **kwargs): # noqa: E501 - """replace_validating_admission_policy_status # noqa: E501 + def replace_mutating_admission_policy_binding_with_http_info(self, name, body, **kwargs): # noqa: E501 + """replace_mutating_admission_policy_binding # noqa: E501 - replace status of the specified ValidatingAdmissionPolicy # noqa: E501 + replace the specified MutatingAdmissionPolicyBinding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.replace_validating_admission_policy_status_with_http_info(name, body, async_req=True) + + >>> thread = api.replace_mutating_admission_policy_binding_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingAdmissionPolicy (required) - :param V1alpha1ValidatingAdmissionPolicy body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the MutatingAdmissionPolicyBinding (required) + :type name: str + :param body: (required) + :type body: V1alpha1MutatingAdmissionPolicyBinding + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1alpha1ValidatingAdmissionPolicy, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1alpha1MutatingAdmissionPolicyBinding, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -2541,7 +2704,10 @@ def replace_validating_admission_policy_status_with_http_info(self, name, body, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2549,18 +2715,16 @@ def replace_validating_admission_policy_status_with_http_info(self, name, body, if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method replace_validating_admission_policy_status" % key + " to method replace_mutating_admission_policy_binding" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `replace_validating_admission_policy_status`") # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `replace_mutating_admission_policy_binding`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `replace_validating_admission_policy_status`") # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `replace_mutating_admission_policy_binding`") # noqa: E501 collection_formats = {} @@ -2569,16 +2733,16 @@ def replace_validating_admission_policy_status_with_http_info(self, name, body, path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2588,23 +2752,30 @@ def replace_validating_admission_policy_status_with_http_info(self, name, body, body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1alpha1MutatingAdmissionPolicyBinding", + 201: "V1alpha1MutatingAdmissionPolicyBinding", + 401: None, + } + return self.api_client.call_api( - '/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies/{name}/status', 'PUT', + '/apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicybindings/{name}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1alpha1ValidatingAdmissionPolicy', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) diff --git a/kubernetes/client/api/admissionregistration_v1beta1_api.py b/kubernetes/client/api/admissionregistration_v1beta1_api.py index 253d870745..6ef1f8e409 100644 --- a/kubernetes/client/api/admissionregistration_v1beta1_api.py +++ b/kubernetes/client/api/admissionregistration_v1beta1_api.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ @@ -36,62 +36,86 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def create_validating_admission_policy(self, body, **kwargs): # noqa: E501 - """create_validating_admission_policy # noqa: E501 + def create_mutating_admission_policy(self, body, **kwargs): # noqa: E501 + """create_mutating_admission_policy # noqa: E501 - create a ValidatingAdmissionPolicy # noqa: E501 + create a MutatingAdmissionPolicy # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_validating_admission_policy(body, async_req=True) + + >>> thread = api.create_mutating_admission_policy(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param V1beta1ValidatingAdmissionPolicy body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param body: (required) + :type body: V1beta1MutatingAdmissionPolicy + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1beta1ValidatingAdmissionPolicy + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1beta1MutatingAdmissionPolicy """ kwargs['_return_http_data_only'] = True - return self.create_validating_admission_policy_with_http_info(body, **kwargs) # noqa: E501 + return self.create_mutating_admission_policy_with_http_info(body, **kwargs) # noqa: E501 - def create_validating_admission_policy_with_http_info(self, body, **kwargs): # noqa: E501 - """create_validating_admission_policy # noqa: E501 + def create_mutating_admission_policy_with_http_info(self, body, **kwargs): # noqa: E501 + """create_mutating_admission_policy # noqa: E501 - create a ValidatingAdmissionPolicy # noqa: E501 + create a MutatingAdmissionPolicy # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_validating_admission_policy_with_http_info(body, async_req=True) + + >>> thread = api.create_mutating_admission_policy_with_http_info(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param V1beta1ValidatingAdmissionPolicy body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param body: (required) + :type body: V1beta1MutatingAdmissionPolicy + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1beta1ValidatingAdmissionPolicy, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1beta1MutatingAdmissionPolicy, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -108,7 +132,10 @@ def create_validating_admission_policy_with_http_info(self, body, **kwargs): # 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -116,30 +143,29 @@ def create_validating_admission_policy_with_http_info(self, body, **kwargs): # if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method create_validating_admission_policy" % key + " to method create_mutating_admission_policy" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `create_validating_admission_policy`") # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `create_mutating_admission_policy`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -149,83 +175,115 @@ def create_validating_admission_policy_with_http_info(self, body, **kwargs): # body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1beta1MutatingAdmissionPolicy", + 201: "V1beta1MutatingAdmissionPolicy", + 202: "V1beta1MutatingAdmissionPolicy", + 401: None, + } + return self.api_client.call_api( - '/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies', 'POST', + '/apis/admissionregistration.k8s.io/v1beta1/mutatingadmissionpolicies', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1ValidatingAdmissionPolicy', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) - def create_validating_admission_policy_binding(self, body, **kwargs): # noqa: E501 - """create_validating_admission_policy_binding # noqa: E501 + def create_mutating_admission_policy_binding(self, body, **kwargs): # noqa: E501 + """create_mutating_admission_policy_binding # noqa: E501 - create a ValidatingAdmissionPolicyBinding # noqa: E501 + create a MutatingAdmissionPolicyBinding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_validating_admission_policy_binding(body, async_req=True) + + >>> thread = api.create_mutating_admission_policy_binding(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param V1beta1ValidatingAdmissionPolicyBinding body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param body: (required) + :type body: V1beta1MutatingAdmissionPolicyBinding + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1beta1ValidatingAdmissionPolicyBinding + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1beta1MutatingAdmissionPolicyBinding """ kwargs['_return_http_data_only'] = True - return self.create_validating_admission_policy_binding_with_http_info(body, **kwargs) # noqa: E501 + return self.create_mutating_admission_policy_binding_with_http_info(body, **kwargs) # noqa: E501 - def create_validating_admission_policy_binding_with_http_info(self, body, **kwargs): # noqa: E501 - """create_validating_admission_policy_binding # noqa: E501 + def create_mutating_admission_policy_binding_with_http_info(self, body, **kwargs): # noqa: E501 + """create_mutating_admission_policy_binding # noqa: E501 - create a ValidatingAdmissionPolicyBinding # noqa: E501 + create a MutatingAdmissionPolicyBinding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_validating_admission_policy_binding_with_http_info(body, async_req=True) + + >>> thread = api.create_mutating_admission_policy_binding_with_http_info(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param V1beta1ValidatingAdmissionPolicyBinding body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param body: (required) + :type body: V1beta1MutatingAdmissionPolicyBinding + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1beta1ValidatingAdmissionPolicyBinding, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1beta1MutatingAdmissionPolicyBinding, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -242,7 +300,10 @@ def create_validating_admission_policy_binding_with_http_info(self, body, **kwar 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -250,30 +311,29 @@ def create_validating_admission_policy_binding_with_http_info(self, body, **kwar if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method create_validating_admission_policy_binding" % key + " to method create_mutating_admission_policy_binding" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `create_validating_admission_policy_binding`") # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `create_mutating_admission_policy_binding`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -283,101 +343,155 @@ def create_validating_admission_policy_binding_with_http_info(self, body, **kwar body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1beta1MutatingAdmissionPolicyBinding", + 201: "V1beta1MutatingAdmissionPolicyBinding", + 202: "V1beta1MutatingAdmissionPolicyBinding", + 401: None, + } + return self.api_client.call_api( - '/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings', 'POST', + '/apis/admissionregistration.k8s.io/v1beta1/mutatingadmissionpolicybindings', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1ValidatingAdmissionPolicyBinding', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) - def delete_collection_validating_admission_policy(self, **kwargs): # noqa: E501 - """delete_collection_validating_admission_policy # noqa: E501 + def delete_collection_mutating_admission_policy(self, **kwargs): # noqa: E501 + """delete_collection_mutating_admission_policy # noqa: E501 - delete collection of ValidatingAdmissionPolicy # noqa: E501 + delete collection of MutatingAdmissionPolicy # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_collection_validating_admission_policy(async_req=True) + + >>> thread = api.delete_collection_mutating_admission_policy(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True - return self.delete_collection_validating_admission_policy_with_http_info(**kwargs) # noqa: E501 + return self.delete_collection_mutating_admission_policy_with_http_info(**kwargs) # noqa: E501 - def delete_collection_validating_admission_policy_with_http_info(self, **kwargs): # noqa: E501 - """delete_collection_validating_admission_policy # noqa: E501 + def delete_collection_mutating_admission_policy_with_http_info(self, **kwargs): # noqa: E501 + """delete_collection_mutating_admission_policy # noqa: E501 - delete collection of ValidatingAdmissionPolicy # noqa: E501 + delete collection of MutatingAdmissionPolicy # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_collection_validating_admission_policy_with_http_info(async_req=True) + + >>> thread = api.delete_collection_mutating_admission_policy_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -388,6 +502,7 @@ def delete_collection_validating_admission_policy_with_http_info(self, **kwargs) 'dry_run', 'field_selector', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'label_selector', 'limit', 'orphan_dependents', @@ -403,7 +518,10 @@ def delete_collection_validating_admission_policy_with_http_info(self, **kwargs) 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -411,7 +529,7 @@ def delete_collection_validating_admission_policy_with_http_info(self, **kwargs) if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method delete_collection_validating_admission_policy" % key + " to method delete_collection_mutating_admission_policy" % key ) local_var_params[key] = val del local_var_params['kwargs'] @@ -421,34 +539,36 @@ def delete_collection_validating_admission_policy_with_http_info(self, **kwargs) path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -458,101 +578,153 @@ def delete_collection_validating_admission_policy_with_http_info(self, **kwargs) body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 401: None, + } + return self.api_client.call_api( - '/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies', 'DELETE', + '/apis/admissionregistration.k8s.io/v1beta1/mutatingadmissionpolicies', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) - def delete_collection_validating_admission_policy_binding(self, **kwargs): # noqa: E501 - """delete_collection_validating_admission_policy_binding # noqa: E501 + def delete_collection_mutating_admission_policy_binding(self, **kwargs): # noqa: E501 + """delete_collection_mutating_admission_policy_binding # noqa: E501 - delete collection of ValidatingAdmissionPolicyBinding # noqa: E501 + delete collection of MutatingAdmissionPolicyBinding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_collection_validating_admission_policy_binding(async_req=True) + + >>> thread = api.delete_collection_mutating_admission_policy_binding(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True - return self.delete_collection_validating_admission_policy_binding_with_http_info(**kwargs) # noqa: E501 + return self.delete_collection_mutating_admission_policy_binding_with_http_info(**kwargs) # noqa: E501 - def delete_collection_validating_admission_policy_binding_with_http_info(self, **kwargs): # noqa: E501 - """delete_collection_validating_admission_policy_binding # noqa: E501 + def delete_collection_mutating_admission_policy_binding_with_http_info(self, **kwargs): # noqa: E501 + """delete_collection_mutating_admission_policy_binding # noqa: E501 - delete collection of ValidatingAdmissionPolicyBinding # noqa: E501 + delete collection of MutatingAdmissionPolicyBinding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_collection_validating_admission_policy_binding_with_http_info(async_req=True) + + >>> thread = api.delete_collection_mutating_admission_policy_binding_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -563,6 +735,7 @@ def delete_collection_validating_admission_policy_binding_with_http_info(self, * 'dry_run', 'field_selector', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'label_selector', 'limit', 'orphan_dependents', @@ -578,7 +751,10 @@ def delete_collection_validating_admission_policy_binding_with_http_info(self, * 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -586,7 +762,7 @@ def delete_collection_validating_admission_policy_binding_with_http_info(self, * if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method delete_collection_validating_admission_policy_binding" % key + " to method delete_collection_mutating_admission_policy_binding" % key ) local_var_params[key] = val del local_var_params['kwargs'] @@ -596,34 +772,36 @@ def delete_collection_validating_admission_policy_binding_with_http_info(self, * path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -633,87 +811,125 @@ def delete_collection_validating_admission_policy_binding_with_http_info(self, * body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 401: None, + } + return self.api_client.call_api( - '/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings', 'DELETE', + '/apis/admissionregistration.k8s.io/v1beta1/mutatingadmissionpolicybindings', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) - def delete_validating_admission_policy(self, name, **kwargs): # noqa: E501 - """delete_validating_admission_policy # noqa: E501 + def delete_mutating_admission_policy(self, name, **kwargs): # noqa: E501 + """delete_mutating_admission_policy # noqa: E501 - delete a ValidatingAdmissionPolicy # noqa: E501 + delete a MutatingAdmissionPolicy # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_validating_admission_policy(name, async_req=True) + + >>> thread = api.delete_mutating_admission_policy(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingAdmissionPolicy (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the MutatingAdmissionPolicy (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True - return self.delete_validating_admission_policy_with_http_info(name, **kwargs) # noqa: E501 + return self.delete_mutating_admission_policy_with_http_info(name, **kwargs) # noqa: E501 - def delete_validating_admission_policy_with_http_info(self, name, **kwargs): # noqa: E501 - """delete_validating_admission_policy # noqa: E501 + def delete_mutating_admission_policy_with_http_info(self, name, **kwargs): # noqa: E501 + """delete_mutating_admission_policy # noqa: E501 - delete a ValidatingAdmissionPolicy # noqa: E501 + delete a MutatingAdmissionPolicy # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_validating_admission_policy_with_http_info(name, async_req=True) + + >>> thread = api.delete_mutating_admission_policy_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingAdmissionPolicy (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the MutatingAdmissionPolicy (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -723,6 +939,7 @@ def delete_validating_admission_policy_with_http_info(self, name, **kwargs): # 'pretty', 'dry_run', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'orphan_dependents', 'propagation_policy', 'body' @@ -732,7 +949,10 @@ def delete_validating_admission_policy_with_http_info(self, name, **kwargs): # 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -740,14 +960,13 @@ def delete_validating_admission_policy_with_http_info(self, name, **kwargs): # if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method delete_validating_admission_policy" % key + " to method delete_mutating_admission_policy" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `delete_validating_admission_policy`") # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `delete_mutating_admission_policy`") # noqa: E501 collection_formats = {} @@ -756,18 +975,20 @@ def delete_validating_admission_policy_with_http_info(self, name, **kwargs): # path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -777,87 +998,126 @@ def delete_validating_admission_policy_with_http_info(self, name, **kwargs): # body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 202: "V1Status", + 401: None, + } + return self.api_client.call_api( - '/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name}', 'DELETE', + '/apis/admissionregistration.k8s.io/v1beta1/mutatingadmissionpolicies/{name}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) - def delete_validating_admission_policy_binding(self, name, **kwargs): # noqa: E501 - """delete_validating_admission_policy_binding # noqa: E501 + def delete_mutating_admission_policy_binding(self, name, **kwargs): # noqa: E501 + """delete_mutating_admission_policy_binding # noqa: E501 - delete a ValidatingAdmissionPolicyBinding # noqa: E501 + delete a MutatingAdmissionPolicyBinding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_validating_admission_policy_binding(name, async_req=True) + + >>> thread = api.delete_mutating_admission_policy_binding(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingAdmissionPolicyBinding (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the MutatingAdmissionPolicyBinding (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True - return self.delete_validating_admission_policy_binding_with_http_info(name, **kwargs) # noqa: E501 + return self.delete_mutating_admission_policy_binding_with_http_info(name, **kwargs) # noqa: E501 - def delete_validating_admission_policy_binding_with_http_info(self, name, **kwargs): # noqa: E501 - """delete_validating_admission_policy_binding # noqa: E501 + def delete_mutating_admission_policy_binding_with_http_info(self, name, **kwargs): # noqa: E501 + """delete_mutating_admission_policy_binding # noqa: E501 - delete a ValidatingAdmissionPolicyBinding # noqa: E501 + delete a MutatingAdmissionPolicyBinding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_validating_admission_policy_binding_with_http_info(name, async_req=True) + + >>> thread = api.delete_mutating_admission_policy_binding_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingAdmissionPolicyBinding (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the MutatingAdmissionPolicyBinding (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -867,6 +1127,7 @@ def delete_validating_admission_policy_binding_with_http_info(self, name, **kwar 'pretty', 'dry_run', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'orphan_dependents', 'propagation_policy', 'body' @@ -876,7 +1137,10 @@ def delete_validating_admission_policy_binding_with_http_info(self, name, **kwar 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -884,14 +1148,13 @@ def delete_validating_admission_policy_binding_with_http_info(self, name, **kwar if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method delete_validating_admission_policy_binding" % key + " to method delete_mutating_admission_policy_binding" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `delete_validating_admission_policy_binding`") # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `delete_mutating_admission_policy_binding`") # noqa: E501 collection_formats = {} @@ -900,18 +1163,20 @@ def delete_validating_admission_policy_binding_with_http_info(self, name, **kwar path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -921,26 +1186,33 @@ def delete_validating_admission_policy_binding_with_http_info(self, name, **kwar body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 202: "V1Status", + 401: None, + } + return self.api_client.call_api( - '/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings/{name}', 'DELETE', + '/apis/admissionregistration.k8s.io/v1beta1/mutatingadmissionpolicybindings/{name}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def get_api_resources(self, **kwargs): # noqa: E501 """get_api_resources # noqa: E501 @@ -948,20 +1220,24 @@ def get_api_resources(self, **kwargs): # noqa: E501 get available resources # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_resources(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1APIResourceList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1APIResourceList """ kwargs['_return_http_data_only'] = True return self.get_api_resources_with_http_info(**kwargs) # noqa: E501 @@ -972,22 +1248,32 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 get available resources # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_resources_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -999,7 +1285,10 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1018,7 +1307,7 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1026,11 +1315,16 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1APIResourceList", + 401: None, + } + return self.api_client.call_api( '/apis/admissionregistration.k8s.io/v1beta1/', 'GET', path_params, @@ -1039,82 +1333,119 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1APIResourceList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) - def list_validating_admission_policy(self, **kwargs): # noqa: E501 - """list_validating_admission_policy # noqa: E501 + def list_mutating_admission_policy(self, **kwargs): # noqa: E501 + """list_mutating_admission_policy # noqa: E501 - list or watch objects of kind ValidatingAdmissionPolicy # noqa: E501 + list or watch objects of kind MutatingAdmissionPolicy # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_validating_admission_policy(async_req=True) + + >>> thread = api.list_mutating_admission_policy(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1beta1ValidatingAdmissionPolicyList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1beta1MutatingAdmissionPolicyList """ kwargs['_return_http_data_only'] = True - return self.list_validating_admission_policy_with_http_info(**kwargs) # noqa: E501 + return self.list_mutating_admission_policy_with_http_info(**kwargs) # noqa: E501 - def list_validating_admission_policy_with_http_info(self, **kwargs): # noqa: E501 - """list_validating_admission_policy # noqa: E501 + def list_mutating_admission_policy_with_http_info(self, **kwargs): # noqa: E501 + """list_mutating_admission_policy # noqa: E501 - list or watch objects of kind ValidatingAdmissionPolicy # noqa: E501 + list or watch objects of kind MutatingAdmissionPolicy # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_validating_admission_policy_with_http_info(async_req=True) + + >>> thread = api.list_mutating_admission_policy_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1beta1ValidatingAdmissionPolicyList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1beta1MutatingAdmissionPolicyList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1137,7 +1468,10 @@ def list_validating_admission_policy_with_http_info(self, **kwargs): # noqa: E5 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1145,7 +1479,7 @@ def list_validating_admission_policy_with_http_info(self, **kwargs): # noqa: E5 if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method list_validating_admission_policy" % key + " to method list_mutating_admission_policy" % key ) local_var_params[key] = val del local_var_params['kwargs'] @@ -1155,30 +1489,30 @@ def list_validating_admission_policy_with_http_info(self, **kwargs): # noqa: E5 path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1186,95 +1520,137 @@ def list_validating_admission_policy_with_http_info(self, **kwargs): # noqa: E5 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1beta1MutatingAdmissionPolicyList", + 401: None, + } + return self.api_client.call_api( - '/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies', 'GET', + '/apis/admissionregistration.k8s.io/v1beta1/mutatingadmissionpolicies', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1ValidatingAdmissionPolicyList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) - def list_validating_admission_policy_binding(self, **kwargs): # noqa: E501 - """list_validating_admission_policy_binding # noqa: E501 + def list_mutating_admission_policy_binding(self, **kwargs): # noqa: E501 + """list_mutating_admission_policy_binding # noqa: E501 - list or watch objects of kind ValidatingAdmissionPolicyBinding # noqa: E501 + list or watch objects of kind MutatingAdmissionPolicyBinding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_validating_admission_policy_binding(async_req=True) + + >>> thread = api.list_mutating_admission_policy_binding(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1beta1ValidatingAdmissionPolicyBindingList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1beta1MutatingAdmissionPolicyBindingList """ kwargs['_return_http_data_only'] = True - return self.list_validating_admission_policy_binding_with_http_info(**kwargs) # noqa: E501 + return self.list_mutating_admission_policy_binding_with_http_info(**kwargs) # noqa: E501 - def list_validating_admission_policy_binding_with_http_info(self, **kwargs): # noqa: E501 - """list_validating_admission_policy_binding # noqa: E501 + def list_mutating_admission_policy_binding_with_http_info(self, **kwargs): # noqa: E501 + """list_mutating_admission_policy_binding # noqa: E501 - list or watch objects of kind ValidatingAdmissionPolicyBinding # noqa: E501 + list or watch objects of kind MutatingAdmissionPolicyBinding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_validating_admission_policy_binding_with_http_info(async_req=True) + + >>> thread = api.list_mutating_admission_policy_binding_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1beta1ValidatingAdmissionPolicyBindingList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1beta1MutatingAdmissionPolicyBindingList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1297,7 +1673,10 @@ def list_validating_admission_policy_binding_with_http_info(self, **kwargs): # 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1305,7 +1684,7 @@ def list_validating_admission_policy_binding_with_http_info(self, **kwargs): # if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method list_validating_admission_policy_binding" % key + " to method list_mutating_admission_policy_binding" % key ) local_var_params[key] = val del local_var_params['kwargs'] @@ -1315,30 +1694,30 @@ def list_validating_admission_policy_binding_with_http_info(self, **kwargs): # path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1346,239 +1725,121 @@ def list_validating_admission_policy_binding_with_http_info(self, **kwargs): # body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 - return self.api_client.call_api( - '/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1beta1ValidatingAdmissionPolicyBindingList', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def patch_validating_admission_policy(self, name, body, **kwargs): # noqa: E501 - """patch_validating_admission_policy # noqa: E501 - - partially update the specified ValidatingAdmissionPolicy # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_validating_admission_policy(name, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingAdmissionPolicy (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1beta1ValidatingAdmissionPolicy - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.patch_validating_admission_policy_with_http_info(name, body, **kwargs) # noqa: E501 - - def patch_validating_admission_policy_with_http_info(self, name, body, **kwargs): # noqa: E501 - """patch_validating_admission_policy # noqa: E501 - - partially update the specified ValidatingAdmissionPolicy # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_validating_admission_policy_with_http_info(name, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingAdmissionPolicy (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1beta1ValidatingAdmissionPolicy, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'body', - 'pretty', - 'dry_run', - 'field_manager', - 'field_validation', - 'force' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method patch_validating_admission_policy" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `patch_validating_admission_policy`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `patch_validating_admission_policy`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 - query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 - query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 - query_params.append(('force', local_var_params['force'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1beta1MutatingAdmissionPolicyBindingList", + 401: None, + } return self.api_client.call_api( - '/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name}', 'PATCH', + '/apis/admissionregistration.k8s.io/v1beta1/mutatingadmissionpolicybindings', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1ValidatingAdmissionPolicy', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) - def patch_validating_admission_policy_binding(self, name, body, **kwargs): # noqa: E501 - """patch_validating_admission_policy_binding # noqa: E501 + def patch_mutating_admission_policy(self, name, body, **kwargs): # noqa: E501 + """patch_mutating_admission_policy # noqa: E501 - partially update the specified ValidatingAdmissionPolicyBinding # noqa: E501 + partially update the specified MutatingAdmissionPolicy # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_validating_admission_policy_binding(name, body, async_req=True) + + >>> thread = api.patch_mutating_admission_policy(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingAdmissionPolicyBinding (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the MutatingAdmissionPolicy (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1beta1ValidatingAdmissionPolicyBinding + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1beta1MutatingAdmissionPolicy """ kwargs['_return_http_data_only'] = True - return self.patch_validating_admission_policy_binding_with_http_info(name, body, **kwargs) # noqa: E501 + return self.patch_mutating_admission_policy_with_http_info(name, body, **kwargs) # noqa: E501 - def patch_validating_admission_policy_binding_with_http_info(self, name, body, **kwargs): # noqa: E501 - """patch_validating_admission_policy_binding # noqa: E501 + def patch_mutating_admission_policy_with_http_info(self, name, body, **kwargs): # noqa: E501 + """patch_mutating_admission_policy # noqa: E501 - partially update the specified ValidatingAdmissionPolicyBinding # noqa: E501 + partially update the specified MutatingAdmissionPolicy # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_validating_admission_policy_binding_with_http_info(name, body, async_req=True) + + >>> thread = api.patch_mutating_admission_policy_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingAdmissionPolicyBinding (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the MutatingAdmissionPolicy (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1beta1ValidatingAdmissionPolicyBinding, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1beta1MutatingAdmissionPolicy, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1597,7 +1858,10 @@ def patch_validating_admission_policy_binding_with_http_info(self, name, body, * 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1605,18 +1869,16 @@ def patch_validating_admission_policy_binding_with_http_info(self, name, body, * if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method patch_validating_admission_policy_binding" % key + " to method patch_mutating_admission_policy" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `patch_validating_admission_policy_binding`") # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `patch_mutating_admission_policy`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `patch_validating_admission_policy_binding`") # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `patch_mutating_admission_policy`") # noqa: E501 collection_formats = {} @@ -1625,18 +1887,18 @@ def patch_validating_admission_policy_binding_with_http_info(self, name, body, * path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1646,91 +1908,130 @@ def patch_validating_admission_policy_binding_with_http_info(self, name, body, * body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1beta1MutatingAdmissionPolicy", + 201: "V1beta1MutatingAdmissionPolicy", + 401: None, + } + return self.api_client.call_api( - '/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings/{name}', 'PATCH', + '/apis/admissionregistration.k8s.io/v1beta1/mutatingadmissionpolicies/{name}', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1ValidatingAdmissionPolicyBinding', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) - def patch_validating_admission_policy_status(self, name, body, **kwargs): # noqa: E501 - """patch_validating_admission_policy_status # noqa: E501 + def patch_mutating_admission_policy_binding(self, name, body, **kwargs): # noqa: E501 + """patch_mutating_admission_policy_binding # noqa: E501 - partially update status of the specified ValidatingAdmissionPolicy # noqa: E501 + partially update the specified MutatingAdmissionPolicyBinding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_validating_admission_policy_status(name, body, async_req=True) + + >>> thread = api.patch_mutating_admission_policy_binding(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingAdmissionPolicy (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the MutatingAdmissionPolicyBinding (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1beta1ValidatingAdmissionPolicy + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1beta1MutatingAdmissionPolicyBinding """ kwargs['_return_http_data_only'] = True - return self.patch_validating_admission_policy_status_with_http_info(name, body, **kwargs) # noqa: E501 + return self.patch_mutating_admission_policy_binding_with_http_info(name, body, **kwargs) # noqa: E501 - def patch_validating_admission_policy_status_with_http_info(self, name, body, **kwargs): # noqa: E501 - """patch_validating_admission_policy_status # noqa: E501 + def patch_mutating_admission_policy_binding_with_http_info(self, name, body, **kwargs): # noqa: E501 + """patch_mutating_admission_policy_binding # noqa: E501 - partially update status of the specified ValidatingAdmissionPolicy # noqa: E501 + partially update the specified MutatingAdmissionPolicyBinding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_validating_admission_policy_status_with_http_info(name, body, async_req=True) + + >>> thread = api.patch_mutating_admission_policy_binding_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingAdmissionPolicy (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the MutatingAdmissionPolicyBinding (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1beta1ValidatingAdmissionPolicy, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1beta1MutatingAdmissionPolicyBinding, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1749,7 +2050,10 @@ def patch_validating_admission_policy_status_with_http_info(self, name, body, ** 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1757,18 +2061,16 @@ def patch_validating_admission_policy_status_with_http_info(self, name, body, ** if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method patch_validating_admission_policy_status" % key + " to method patch_mutating_admission_policy_binding" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `patch_validating_admission_policy_status`") # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `patch_mutating_admission_policy_binding`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `patch_validating_admission_policy_status`") # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `patch_mutating_admission_policy_binding`") # noqa: E501 collection_formats = {} @@ -1777,18 +2079,18 @@ def patch_validating_admission_policy_status_with_http_info(self, name, body, ** path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1798,200 +2100,110 @@ def patch_validating_admission_policy_status_with_http_info(self, name, body, ** body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 - return self.api_client.call_api( - '/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name}/status', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1beta1ValidatingAdmissionPolicy', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def read_validating_admission_policy(self, name, **kwargs): # noqa: E501 - """read_validating_admission_policy # noqa: E501 - - read the specified ValidatingAdmissionPolicy # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.read_validating_admission_policy(name, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingAdmissionPolicy (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1beta1ValidatingAdmissionPolicy - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.read_validating_admission_policy_with_http_info(name, **kwargs) # noqa: E501 - - def read_validating_admission_policy_with_http_info(self, name, **kwargs): # noqa: E501 - """read_validating_admission_policy # noqa: E501 - - read the specified ValidatingAdmissionPolicy # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.read_validating_admission_policy_with_http_info(name, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingAdmissionPolicy (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1beta1ValidatingAdmissionPolicy, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'pretty' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method read_validating_admission_policy" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `read_validating_admission_policy`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1beta1MutatingAdmissionPolicyBinding", + 201: "V1beta1MutatingAdmissionPolicyBinding", + 401: None, + } return self.api_client.call_api( - '/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name}', 'GET', + '/apis/admissionregistration.k8s.io/v1beta1/mutatingadmissionpolicybindings/{name}', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1ValidatingAdmissionPolicy', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) - def read_validating_admission_policy_binding(self, name, **kwargs): # noqa: E501 - """read_validating_admission_policy_binding # noqa: E501 + def read_mutating_admission_policy(self, name, **kwargs): # noqa: E501 + """read_mutating_admission_policy # noqa: E501 - read the specified ValidatingAdmissionPolicyBinding # noqa: E501 + read the specified MutatingAdmissionPolicy # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.read_validating_admission_policy_binding(name, async_req=True) + + >>> thread = api.read_mutating_admission_policy(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingAdmissionPolicyBinding (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the MutatingAdmissionPolicy (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1beta1ValidatingAdmissionPolicyBinding + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1beta1MutatingAdmissionPolicy """ kwargs['_return_http_data_only'] = True - return self.read_validating_admission_policy_binding_with_http_info(name, **kwargs) # noqa: E501 + return self.read_mutating_admission_policy_with_http_info(name, **kwargs) # noqa: E501 - def read_validating_admission_policy_binding_with_http_info(self, name, **kwargs): # noqa: E501 - """read_validating_admission_policy_binding # noqa: E501 + def read_mutating_admission_policy_with_http_info(self, name, **kwargs): # noqa: E501 + """read_mutating_admission_policy # noqa: E501 - read the specified ValidatingAdmissionPolicyBinding # noqa: E501 + read the specified MutatingAdmissionPolicy # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.read_validating_admission_policy_binding_with_http_info(name, async_req=True) + + >>> thread = api.read_mutating_admission_policy_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingAdmissionPolicyBinding (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the MutatingAdmissionPolicy (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1beta1ValidatingAdmissionPolicyBinding, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1beta1MutatingAdmissionPolicy, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -2005,7 +2217,10 @@ def read_validating_admission_policy_binding_with_http_info(self, name, **kwargs 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2013,14 +2228,13 @@ def read_validating_admission_policy_binding_with_http_info(self, name, **kwargs if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method read_validating_admission_policy_binding" % key + " to method read_mutating_admission_policy" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `read_validating_admission_policy_binding`") # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `read_mutating_admission_policy`") # noqa: E501 collection_formats = {} @@ -2029,10 +2243,10 @@ def read_validating_admission_policy_binding_with_http_info(self, name, **kwargs path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2040,77 +2254,101 @@ def read_validating_admission_policy_binding_with_http_info(self, name, **kwargs body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1beta1MutatingAdmissionPolicy", + 401: None, + } + return self.api_client.call_api( - '/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings/{name}', 'GET', + '/apis/admissionregistration.k8s.io/v1beta1/mutatingadmissionpolicies/{name}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1ValidatingAdmissionPolicyBinding', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) - def read_validating_admission_policy_status(self, name, **kwargs): # noqa: E501 - """read_validating_admission_policy_status # noqa: E501 + def read_mutating_admission_policy_binding(self, name, **kwargs): # noqa: E501 + """read_mutating_admission_policy_binding # noqa: E501 - read status of the specified ValidatingAdmissionPolicy # noqa: E501 + read the specified MutatingAdmissionPolicyBinding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.read_validating_admission_policy_status(name, async_req=True) + + >>> thread = api.read_mutating_admission_policy_binding(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingAdmissionPolicy (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the MutatingAdmissionPolicyBinding (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1beta1ValidatingAdmissionPolicy + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1beta1MutatingAdmissionPolicyBinding """ kwargs['_return_http_data_only'] = True - return self.read_validating_admission_policy_status_with_http_info(name, **kwargs) # noqa: E501 + return self.read_mutating_admission_policy_binding_with_http_info(name, **kwargs) # noqa: E501 - def read_validating_admission_policy_status_with_http_info(self, name, **kwargs): # noqa: E501 - """read_validating_admission_policy_status # noqa: E501 + def read_mutating_admission_policy_binding_with_http_info(self, name, **kwargs): # noqa: E501 + """read_mutating_admission_policy_binding # noqa: E501 - read status of the specified ValidatingAdmissionPolicy # noqa: E501 + read the specified MutatingAdmissionPolicyBinding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.read_validating_admission_policy_status_with_http_info(name, async_req=True) + + >>> thread = api.read_mutating_admission_policy_binding_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingAdmissionPolicy (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the MutatingAdmissionPolicyBinding (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1beta1ValidatingAdmissionPolicy, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1beta1MutatingAdmissionPolicyBinding, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -2124,7 +2362,10 @@ def read_validating_admission_policy_status_with_http_info(self, name, **kwargs) 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2132,14 +2373,13 @@ def read_validating_admission_policy_status_with_http_info(self, name, **kwargs) if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method read_validating_admission_policy_status" % key + " to method read_mutating_admission_policy_binding" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `read_validating_admission_policy_status`") # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `read_mutating_admission_policy_binding`") # noqa: E501 collection_formats = {} @@ -2148,10 +2388,10 @@ def read_validating_admission_policy_status_with_http_info(self, name, **kwargs) path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2159,228 +2399,117 @@ def read_validating_admission_policy_status_with_http_info(self, name, **kwargs) body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 - return self.api_client.call_api( - '/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name}/status', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1beta1ValidatingAdmissionPolicy', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def replace_validating_admission_policy(self, name, body, **kwargs): # noqa: E501 - """replace_validating_admission_policy # noqa: E501 - - replace the specified ValidatingAdmissionPolicy # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.replace_validating_admission_policy(name, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingAdmissionPolicy (required) - :param V1beta1ValidatingAdmissionPolicy body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1beta1ValidatingAdmissionPolicy - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.replace_validating_admission_policy_with_http_info(name, body, **kwargs) # noqa: E501 - - def replace_validating_admission_policy_with_http_info(self, name, body, **kwargs): # noqa: E501 - """replace_validating_admission_policy # noqa: E501 - - replace the specified ValidatingAdmissionPolicy # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.replace_validating_admission_policy_with_http_info(name, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingAdmissionPolicy (required) - :param V1beta1ValidatingAdmissionPolicy body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1beta1ValidatingAdmissionPolicy, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'body', - 'pretty', - 'dry_run', - 'field_manager', - 'field_validation' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method replace_validating_admission_policy" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `replace_validating_admission_policy`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `replace_validating_admission_policy`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 - query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 - query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1beta1MutatingAdmissionPolicyBinding", + 401: None, + } return self.api_client.call_api( - '/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name}', 'PUT', + '/apis/admissionregistration.k8s.io/v1beta1/mutatingadmissionpolicybindings/{name}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1ValidatingAdmissionPolicy', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) - def replace_validating_admission_policy_binding(self, name, body, **kwargs): # noqa: E501 - """replace_validating_admission_policy_binding # noqa: E501 + def replace_mutating_admission_policy(self, name, body, **kwargs): # noqa: E501 + """replace_mutating_admission_policy # noqa: E501 - replace the specified ValidatingAdmissionPolicyBinding # noqa: E501 + replace the specified MutatingAdmissionPolicy # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.replace_validating_admission_policy_binding(name, body, async_req=True) + + >>> thread = api.replace_mutating_admission_policy(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingAdmissionPolicyBinding (required) - :param V1beta1ValidatingAdmissionPolicyBinding body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the MutatingAdmissionPolicy (required) + :type name: str + :param body: (required) + :type body: V1beta1MutatingAdmissionPolicy + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1beta1ValidatingAdmissionPolicyBinding + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1beta1MutatingAdmissionPolicy """ kwargs['_return_http_data_only'] = True - return self.replace_validating_admission_policy_binding_with_http_info(name, body, **kwargs) # noqa: E501 + return self.replace_mutating_admission_policy_with_http_info(name, body, **kwargs) # noqa: E501 - def replace_validating_admission_policy_binding_with_http_info(self, name, body, **kwargs): # noqa: E501 - """replace_validating_admission_policy_binding # noqa: E501 + def replace_mutating_admission_policy_with_http_info(self, name, body, **kwargs): # noqa: E501 + """replace_mutating_admission_policy # noqa: E501 - replace the specified ValidatingAdmissionPolicyBinding # noqa: E501 + replace the specified MutatingAdmissionPolicy # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.replace_validating_admission_policy_binding_with_http_info(name, body, async_req=True) + + >>> thread = api.replace_mutating_admission_policy_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingAdmissionPolicyBinding (required) - :param V1beta1ValidatingAdmissionPolicyBinding body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the MutatingAdmissionPolicy (required) + :type name: str + :param body: (required) + :type body: V1beta1MutatingAdmissionPolicy + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1beta1ValidatingAdmissionPolicyBinding, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1beta1MutatingAdmissionPolicy, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -2398,7 +2527,10 @@ def replace_validating_admission_policy_binding_with_http_info(self, name, body, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2406,18 +2538,16 @@ def replace_validating_admission_policy_binding_with_http_info(self, name, body, if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method replace_validating_admission_policy_binding" % key + " to method replace_mutating_admission_policy" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `replace_validating_admission_policy_binding`") # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `replace_mutating_admission_policy`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `replace_validating_admission_policy_binding`") # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `replace_mutating_admission_policy`") # noqa: E501 collection_formats = {} @@ -2426,16 +2556,16 @@ def replace_validating_admission_policy_binding_with_http_info(self, name, body, path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2445,85 +2575,118 @@ def replace_validating_admission_policy_binding_with_http_info(self, name, body, body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1beta1MutatingAdmissionPolicy", + 201: "V1beta1MutatingAdmissionPolicy", + 401: None, + } + return self.api_client.call_api( - '/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings/{name}', 'PUT', + '/apis/admissionregistration.k8s.io/v1beta1/mutatingadmissionpolicies/{name}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1ValidatingAdmissionPolicyBinding', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) - def replace_validating_admission_policy_status(self, name, body, **kwargs): # noqa: E501 - """replace_validating_admission_policy_status # noqa: E501 + def replace_mutating_admission_policy_binding(self, name, body, **kwargs): # noqa: E501 + """replace_mutating_admission_policy_binding # noqa: E501 - replace status of the specified ValidatingAdmissionPolicy # noqa: E501 + replace the specified MutatingAdmissionPolicyBinding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.replace_validating_admission_policy_status(name, body, async_req=True) + + >>> thread = api.replace_mutating_admission_policy_binding(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingAdmissionPolicy (required) - :param V1beta1ValidatingAdmissionPolicy body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the MutatingAdmissionPolicyBinding (required) + :type name: str + :param body: (required) + :type body: V1beta1MutatingAdmissionPolicyBinding + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1beta1ValidatingAdmissionPolicy + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1beta1MutatingAdmissionPolicyBinding """ kwargs['_return_http_data_only'] = True - return self.replace_validating_admission_policy_status_with_http_info(name, body, **kwargs) # noqa: E501 + return self.replace_mutating_admission_policy_binding_with_http_info(name, body, **kwargs) # noqa: E501 - def replace_validating_admission_policy_status_with_http_info(self, name, body, **kwargs): # noqa: E501 - """replace_validating_admission_policy_status # noqa: E501 + def replace_mutating_admission_policy_binding_with_http_info(self, name, body, **kwargs): # noqa: E501 + """replace_mutating_admission_policy_binding # noqa: E501 - replace status of the specified ValidatingAdmissionPolicy # noqa: E501 + replace the specified MutatingAdmissionPolicyBinding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.replace_validating_admission_policy_status_with_http_info(name, body, async_req=True) + + >>> thread = api.replace_mutating_admission_policy_binding_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ValidatingAdmissionPolicy (required) - :param V1beta1ValidatingAdmissionPolicy body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the MutatingAdmissionPolicyBinding (required) + :type name: str + :param body: (required) + :type body: V1beta1MutatingAdmissionPolicyBinding + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1beta1ValidatingAdmissionPolicy, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1beta1MutatingAdmissionPolicyBinding, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -2541,7 +2704,10 @@ def replace_validating_admission_policy_status_with_http_info(self, name, body, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2549,18 +2715,16 @@ def replace_validating_admission_policy_status_with_http_info(self, name, body, if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method replace_validating_admission_policy_status" % key + " to method replace_mutating_admission_policy_binding" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `replace_validating_admission_policy_status`") # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `replace_mutating_admission_policy_binding`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `replace_validating_admission_policy_status`") # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `replace_mutating_admission_policy_binding`") # noqa: E501 collection_formats = {} @@ -2569,16 +2733,16 @@ def replace_validating_admission_policy_status_with_http_info(self, name, body, path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2588,23 +2752,30 @@ def replace_validating_admission_policy_status_with_http_info(self, name, body, body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1beta1MutatingAdmissionPolicyBinding", + 201: "V1beta1MutatingAdmissionPolicyBinding", + 401: None, + } + return self.api_client.call_api( - '/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name}/status', 'PUT', + '/apis/admissionregistration.k8s.io/v1beta1/mutatingadmissionpolicybindings/{name}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1ValidatingAdmissionPolicy', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) diff --git a/kubernetes/client/api/apiextensions_api.py b/kubernetes/client/api/apiextensions_api.py index 462e760f1d..359c066080 100644 --- a/kubernetes/client/api/apiextensions_api.py +++ b/kubernetes/client/api/apiextensions_api.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ @@ -42,20 +42,24 @@ def get_api_group(self, **kwargs): # noqa: E501 get information of a group # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_group(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1APIGroup + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1APIGroup """ kwargs['_return_http_data_only'] = True return self.get_api_group_with_http_info(**kwargs) # noqa: E501 @@ -66,22 +70,32 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 get information of a group # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_group_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1APIGroup, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1APIGroup, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -93,7 +107,10 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -112,7 +129,7 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -125,6 +142,11 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1APIGroup", + 401: None, + } + return self.api_client.call_api( '/apis/apiextensions.k8s.io/', 'GET', path_params, @@ -133,10 +155,11 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1APIGroup', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) diff --git a/kubernetes/client/api/apiextensions_v1_api.py b/kubernetes/client/api/apiextensions_v1_api.py index c346abcc3d..4dffef6be3 100644 --- a/kubernetes/client/api/apiextensions_v1_api.py +++ b/kubernetes/client/api/apiextensions_v1_api.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ @@ -42,25 +42,34 @@ def create_custom_resource_definition(self, body, **kwargs): # noqa: E501 create a CustomResourceDefinition # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_custom_resource_definition(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param V1CustomResourceDefinition body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param body: (required) + :type body: V1CustomResourceDefinition + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1CustomResourceDefinition + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1CustomResourceDefinition """ kwargs['_return_http_data_only'] = True return self.create_custom_resource_definition_with_http_info(body, **kwargs) # noqa: E501 @@ -71,27 +80,42 @@ def create_custom_resource_definition_with_http_info(self, body, **kwargs): # n create a CustomResourceDefinition # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_custom_resource_definition_with_http_info(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param V1CustomResourceDefinition body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param body: (required) + :type body: V1CustomResourceDefinition + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1CustomResourceDefinition, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1CustomResourceDefinition, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -108,7 +132,10 @@ def create_custom_resource_definition_with_http_info(self, body, **kwargs): # n 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -121,8 +148,7 @@ def create_custom_resource_definition_with_http_info(self, body, **kwargs): # n local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_custom_resource_definition`") # noqa: E501 collection_formats = {} @@ -130,16 +156,16 @@ def create_custom_resource_definition_with_http_info(self, body, **kwargs): # n path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -149,11 +175,18 @@ def create_custom_resource_definition_with_http_info(self, body, **kwargs): # n body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1CustomResourceDefinition", + 201: "V1CustomResourceDefinition", + 202: "V1CustomResourceDefinition", + 401: None, + } + return self.api_client.call_api( '/apis/apiextensions.k8s.io/v1/customresourcedefinitions', 'POST', path_params, @@ -162,13 +195,14 @@ def create_custom_resource_definition_with_http_info(self, body, **kwargs): # n body=body_params, post_params=form_params, files=local_var_files, - response_type='V1CustomResourceDefinition', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_collection_custom_resource_definition(self, **kwargs): # noqa: E501 """delete_collection_custom_resource_definition # noqa: E501 @@ -176,34 +210,54 @@ def delete_collection_custom_resource_definition(self, **kwargs): # noqa: E501 delete collection of CustomResourceDefinition # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_custom_resource_definition(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_collection_custom_resource_definition_with_http_info(**kwargs) # noqa: E501 @@ -214,36 +268,62 @@ def delete_collection_custom_resource_definition_with_http_info(self, **kwargs): delete collection of CustomResourceDefinition # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_custom_resource_definition_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -254,6 +334,7 @@ def delete_collection_custom_resource_definition_with_http_info(self, **kwargs): 'dry_run', 'field_selector', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'label_selector', 'limit', 'orphan_dependents', @@ -269,7 +350,10 @@ def delete_collection_custom_resource_definition_with_http_info(self, **kwargs): 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -287,34 +371,36 @@ def delete_collection_custom_resource_definition_with_http_info(self, **kwargs): path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -324,11 +410,16 @@ def delete_collection_custom_resource_definition_with_http_info(self, **kwargs): body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 401: None, + } + return self.api_client.call_api( '/apis/apiextensions.k8s.io/v1/customresourcedefinitions', 'DELETE', path_params, @@ -337,13 +428,14 @@ def delete_collection_custom_resource_definition_with_http_info(self, **kwargs): body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_custom_resource_definition(self, name, **kwargs): # noqa: E501 """delete_custom_resource_definition # noqa: E501 @@ -351,27 +443,40 @@ def delete_custom_resource_definition(self, name, **kwargs): # noqa: E501 delete a CustomResourceDefinition # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_custom_resource_definition(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the CustomResourceDefinition (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the CustomResourceDefinition (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_custom_resource_definition_with_http_info(name, **kwargs) # noqa: E501 @@ -382,29 +487,48 @@ def delete_custom_resource_definition_with_http_info(self, name, **kwargs): # n delete a CustomResourceDefinition # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_custom_resource_definition_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the CustomResourceDefinition (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the CustomResourceDefinition (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -414,6 +538,7 @@ def delete_custom_resource_definition_with_http_info(self, name, **kwargs): # n 'pretty', 'dry_run', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'orphan_dependents', 'propagation_policy', 'body' @@ -423,7 +548,10 @@ def delete_custom_resource_definition_with_http_info(self, name, **kwargs): # n 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -436,8 +564,7 @@ def delete_custom_resource_definition_with_http_info(self, name, **kwargs): # n local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `delete_custom_resource_definition`") # noqa: E501 collection_formats = {} @@ -447,18 +574,20 @@ def delete_custom_resource_definition_with_http_info(self, name, **kwargs): # n path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -468,11 +597,17 @@ def delete_custom_resource_definition_with_http_info(self, name, **kwargs): # n body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 202: "V1Status", + 401: None, + } + return self.api_client.call_api( '/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}', 'DELETE', path_params, @@ -481,13 +616,14 @@ def delete_custom_resource_definition_with_http_info(self, name, **kwargs): # n body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def get_api_resources(self, **kwargs): # noqa: E501 """get_api_resources # noqa: E501 @@ -495,20 +631,24 @@ def get_api_resources(self, **kwargs): # noqa: E501 get available resources # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_resources(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1APIResourceList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1APIResourceList """ kwargs['_return_http_data_only'] = True return self.get_api_resources_with_http_info(**kwargs) # noqa: E501 @@ -519,22 +659,32 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 get available resources # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_resources_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -546,7 +696,10 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -565,7 +718,7 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -573,11 +726,16 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1APIResourceList", + 401: None, + } + return self.api_client.call_api( '/apis/apiextensions.k8s.io/v1/', 'GET', path_params, @@ -586,13 +744,14 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1APIResourceList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_custom_resource_definition(self, **kwargs): # noqa: E501 """list_custom_resource_definition # noqa: E501 @@ -600,31 +759,46 @@ def list_custom_resource_definition(self, **kwargs): # noqa: E501 list or watch objects of kind CustomResourceDefinition # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_custom_resource_definition(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1CustomResourceDefinitionList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1CustomResourceDefinitionList """ kwargs['_return_http_data_only'] = True return self.list_custom_resource_definition_with_http_info(**kwargs) # noqa: E501 @@ -635,33 +809,54 @@ def list_custom_resource_definition_with_http_info(self, **kwargs): # noqa: E50 list or watch objects of kind CustomResourceDefinition # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_custom_resource_definition_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1CustomResourceDefinitionList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1CustomResourceDefinitionList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -684,7 +879,10 @@ def list_custom_resource_definition_with_http_info(self, **kwargs): # noqa: E50 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -702,30 +900,30 @@ def list_custom_resource_definition_with_http_info(self, **kwargs): # noqa: E50 path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -733,11 +931,16 @@ def list_custom_resource_definition_with_http_info(self, **kwargs): # noqa: E50 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1CustomResourceDefinitionList", + 401: None, + } + return self.api_client.call_api( '/apis/apiextensions.k8s.io/v1/customresourcedefinitions', 'GET', path_params, @@ -746,13 +949,14 @@ def list_custom_resource_definition_with_http_info(self, **kwargs): # noqa: E50 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1CustomResourceDefinitionList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_custom_resource_definition(self, name, body, **kwargs): # noqa: E501 """patch_custom_resource_definition # noqa: E501 @@ -760,27 +964,38 @@ def patch_custom_resource_definition(self, name, body, **kwargs): # noqa: E501 partially update the specified CustomResourceDefinition # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_custom_resource_definition(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the CustomResourceDefinition (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the CustomResourceDefinition (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1CustomResourceDefinition + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1CustomResourceDefinition """ kwargs['_return_http_data_only'] = True return self.patch_custom_resource_definition_with_http_info(name, body, **kwargs) # noqa: E501 @@ -791,29 +1006,46 @@ def patch_custom_resource_definition_with_http_info(self, name, body, **kwargs): partially update the specified CustomResourceDefinition # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_custom_resource_definition_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the CustomResourceDefinition (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the CustomResourceDefinition (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1CustomResourceDefinition, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1CustomResourceDefinition, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -832,7 +1064,10 @@ def patch_custom_resource_definition_with_http_info(self, name, body, **kwargs): 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -845,12 +1080,10 @@ def patch_custom_resource_definition_with_http_info(self, name, body, **kwargs): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_custom_resource_definition`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_custom_resource_definition`") # noqa: E501 collection_formats = {} @@ -860,18 +1093,18 @@ def patch_custom_resource_definition_with_http_info(self, name, body, **kwargs): path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -881,15 +1114,25 @@ def patch_custom_resource_definition_with_http_info(self, name, body, **kwargs): body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1CustomResourceDefinition", + 201: "V1CustomResourceDefinition", + 401: None, + } + return self.api_client.call_api( '/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}', 'PATCH', path_params, @@ -898,13 +1141,14 @@ def patch_custom_resource_definition_with_http_info(self, name, body, **kwargs): body=body_params, post_params=form_params, files=local_var_files, - response_type='V1CustomResourceDefinition', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_custom_resource_definition_status(self, name, body, **kwargs): # noqa: E501 """patch_custom_resource_definition_status # noqa: E501 @@ -912,27 +1156,38 @@ def patch_custom_resource_definition_status(self, name, body, **kwargs): # noqa partially update status of the specified CustomResourceDefinition # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_custom_resource_definition_status(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the CustomResourceDefinition (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the CustomResourceDefinition (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1CustomResourceDefinition + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1CustomResourceDefinition """ kwargs['_return_http_data_only'] = True return self.patch_custom_resource_definition_status_with_http_info(name, body, **kwargs) # noqa: E501 @@ -943,29 +1198,46 @@ def patch_custom_resource_definition_status_with_http_info(self, name, body, **k partially update status of the specified CustomResourceDefinition # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_custom_resource_definition_status_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the CustomResourceDefinition (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the CustomResourceDefinition (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1CustomResourceDefinition, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1CustomResourceDefinition, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -984,7 +1256,10 @@ def patch_custom_resource_definition_status_with_http_info(self, name, body, **k 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -997,12 +1272,10 @@ def patch_custom_resource_definition_status_with_http_info(self, name, body, **k local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_custom_resource_definition_status`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_custom_resource_definition_status`") # noqa: E501 collection_formats = {} @@ -1012,18 +1285,18 @@ def patch_custom_resource_definition_status_with_http_info(self, name, body, **k path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1033,15 +1306,25 @@ def patch_custom_resource_definition_status_with_http_info(self, name, body, **k body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1CustomResourceDefinition", + 201: "V1CustomResourceDefinition", + 401: None, + } + return self.api_client.call_api( '/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}/status', 'PATCH', path_params, @@ -1050,13 +1333,14 @@ def patch_custom_resource_definition_status_with_http_info(self, name, body, **k body=body_params, post_params=form_params, files=local_var_files, - response_type='V1CustomResourceDefinition', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_custom_resource_definition(self, name, **kwargs): # noqa: E501 """read_custom_resource_definition # noqa: E501 @@ -1064,22 +1348,28 @@ def read_custom_resource_definition(self, name, **kwargs): # noqa: E501 read the specified CustomResourceDefinition # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_custom_resource_definition(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the CustomResourceDefinition (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the CustomResourceDefinition (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1CustomResourceDefinition + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1CustomResourceDefinition """ kwargs['_return_http_data_only'] = True return self.read_custom_resource_definition_with_http_info(name, **kwargs) # noqa: E501 @@ -1090,24 +1380,36 @@ def read_custom_resource_definition_with_http_info(self, name, **kwargs): # noq read the specified CustomResourceDefinition # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_custom_resource_definition_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the CustomResourceDefinition (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the CustomResourceDefinition (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1CustomResourceDefinition, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1CustomResourceDefinition, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1121,7 +1423,10 @@ def read_custom_resource_definition_with_http_info(self, name, **kwargs): # noq 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1134,8 +1439,7 @@ def read_custom_resource_definition_with_http_info(self, name, **kwargs): # noq local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_custom_resource_definition`") # noqa: E501 collection_formats = {} @@ -1145,10 +1449,10 @@ def read_custom_resource_definition_with_http_info(self, name, **kwargs): # noq path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1156,11 +1460,16 @@ def read_custom_resource_definition_with_http_info(self, name, **kwargs): # noq body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1CustomResourceDefinition", + 401: None, + } + return self.api_client.call_api( '/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}', 'GET', path_params, @@ -1169,13 +1478,14 @@ def read_custom_resource_definition_with_http_info(self, name, **kwargs): # noq body=body_params, post_params=form_params, files=local_var_files, - response_type='V1CustomResourceDefinition', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_custom_resource_definition_status(self, name, **kwargs): # noqa: E501 """read_custom_resource_definition_status # noqa: E501 @@ -1183,22 +1493,28 @@ def read_custom_resource_definition_status(self, name, **kwargs): # noqa: E501 read status of the specified CustomResourceDefinition # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_custom_resource_definition_status(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the CustomResourceDefinition (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the CustomResourceDefinition (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1CustomResourceDefinition + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1CustomResourceDefinition """ kwargs['_return_http_data_only'] = True return self.read_custom_resource_definition_status_with_http_info(name, **kwargs) # noqa: E501 @@ -1209,24 +1525,36 @@ def read_custom_resource_definition_status_with_http_info(self, name, **kwargs): read status of the specified CustomResourceDefinition # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_custom_resource_definition_status_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the CustomResourceDefinition (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the CustomResourceDefinition (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1CustomResourceDefinition, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1CustomResourceDefinition, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1240,7 +1568,10 @@ def read_custom_resource_definition_status_with_http_info(self, name, **kwargs): 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1253,8 +1584,7 @@ def read_custom_resource_definition_status_with_http_info(self, name, **kwargs): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_custom_resource_definition_status`") # noqa: E501 collection_formats = {} @@ -1264,10 +1594,10 @@ def read_custom_resource_definition_status_with_http_info(self, name, **kwargs): path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1275,11 +1605,16 @@ def read_custom_resource_definition_status_with_http_info(self, name, **kwargs): body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1CustomResourceDefinition", + 401: None, + } + return self.api_client.call_api( '/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}/status', 'GET', path_params, @@ -1288,13 +1623,14 @@ def read_custom_resource_definition_status_with_http_info(self, name, **kwargs): body=body_params, post_params=form_params, files=local_var_files, - response_type='V1CustomResourceDefinition', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_custom_resource_definition(self, name, body, **kwargs): # noqa: E501 """replace_custom_resource_definition # noqa: E501 @@ -1302,26 +1638,36 @@ def replace_custom_resource_definition(self, name, body, **kwargs): # noqa: E50 replace the specified CustomResourceDefinition # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_custom_resource_definition(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the CustomResourceDefinition (required) - :param V1CustomResourceDefinition body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the CustomResourceDefinition (required) + :type name: str + :param body: (required) + :type body: V1CustomResourceDefinition + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1CustomResourceDefinition + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1CustomResourceDefinition """ kwargs['_return_http_data_only'] = True return self.replace_custom_resource_definition_with_http_info(name, body, **kwargs) # noqa: E501 @@ -1332,28 +1678,44 @@ def replace_custom_resource_definition_with_http_info(self, name, body, **kwargs replace the specified CustomResourceDefinition # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_custom_resource_definition_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the CustomResourceDefinition (required) - :param V1CustomResourceDefinition body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the CustomResourceDefinition (required) + :type name: str + :param body: (required) + :type body: V1CustomResourceDefinition + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1CustomResourceDefinition, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1CustomResourceDefinition, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1371,7 +1733,10 @@ def replace_custom_resource_definition_with_http_info(self, name, body, **kwargs 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1384,12 +1749,10 @@ def replace_custom_resource_definition_with_http_info(self, name, body, **kwargs local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_custom_resource_definition`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_custom_resource_definition`") # noqa: E501 collection_formats = {} @@ -1399,16 +1762,16 @@ def replace_custom_resource_definition_with_http_info(self, name, body, **kwargs path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1418,11 +1781,17 @@ def replace_custom_resource_definition_with_http_info(self, name, body, **kwargs body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1CustomResourceDefinition", + 201: "V1CustomResourceDefinition", + 401: None, + } + return self.api_client.call_api( '/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}', 'PUT', path_params, @@ -1431,13 +1800,14 @@ def replace_custom_resource_definition_with_http_info(self, name, body, **kwargs body=body_params, post_params=form_params, files=local_var_files, - response_type='V1CustomResourceDefinition', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_custom_resource_definition_status(self, name, body, **kwargs): # noqa: E501 """replace_custom_resource_definition_status # noqa: E501 @@ -1445,26 +1815,36 @@ def replace_custom_resource_definition_status(self, name, body, **kwargs): # no replace status of the specified CustomResourceDefinition # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_custom_resource_definition_status(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the CustomResourceDefinition (required) - :param V1CustomResourceDefinition body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the CustomResourceDefinition (required) + :type name: str + :param body: (required) + :type body: V1CustomResourceDefinition + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1CustomResourceDefinition + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1CustomResourceDefinition """ kwargs['_return_http_data_only'] = True return self.replace_custom_resource_definition_status_with_http_info(name, body, **kwargs) # noqa: E501 @@ -1475,28 +1855,44 @@ def replace_custom_resource_definition_status_with_http_info(self, name, body, * replace status of the specified CustomResourceDefinition # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_custom_resource_definition_status_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the CustomResourceDefinition (required) - :param V1CustomResourceDefinition body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the CustomResourceDefinition (required) + :type name: str + :param body: (required) + :type body: V1CustomResourceDefinition + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1CustomResourceDefinition, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1CustomResourceDefinition, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1514,7 +1910,10 @@ def replace_custom_resource_definition_status_with_http_info(self, name, body, * 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1527,12 +1926,10 @@ def replace_custom_resource_definition_status_with_http_info(self, name, body, * local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_custom_resource_definition_status`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_custom_resource_definition_status`") # noqa: E501 collection_formats = {} @@ -1542,16 +1939,16 @@ def replace_custom_resource_definition_status_with_http_info(self, name, body, * path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1561,11 +1958,17 @@ def replace_custom_resource_definition_status_with_http_info(self, name, body, * body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1CustomResourceDefinition", + 201: "V1CustomResourceDefinition", + 401: None, + } + return self.api_client.call_api( '/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}/status', 'PUT', path_params, @@ -1574,10 +1977,11 @@ def replace_custom_resource_definition_status_with_http_info(self, name, body, * body=body_params, post_params=form_params, files=local_var_files, - response_type='V1CustomResourceDefinition', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) diff --git a/kubernetes/client/api/apiregistration_api.py b/kubernetes/client/api/apiregistration_api.py index 739aa7858e..7bde8eadbc 100644 --- a/kubernetes/client/api/apiregistration_api.py +++ b/kubernetes/client/api/apiregistration_api.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ @@ -42,20 +42,24 @@ def get_api_group(self, **kwargs): # noqa: E501 get information of a group # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_group(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1APIGroup + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1APIGroup """ kwargs['_return_http_data_only'] = True return self.get_api_group_with_http_info(**kwargs) # noqa: E501 @@ -66,22 +70,32 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 get information of a group # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_group_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1APIGroup, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1APIGroup, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -93,7 +107,10 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -112,7 +129,7 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -125,6 +142,11 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1APIGroup", + 401: None, + } + return self.api_client.call_api( '/apis/apiregistration.k8s.io/', 'GET', path_params, @@ -133,10 +155,11 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1APIGroup', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) diff --git a/kubernetes/client/api/apiregistration_v1_api.py b/kubernetes/client/api/apiregistration_v1_api.py index 3484fe954b..ac6915efde 100644 --- a/kubernetes/client/api/apiregistration_v1_api.py +++ b/kubernetes/client/api/apiregistration_v1_api.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ @@ -42,25 +42,34 @@ def create_api_service(self, body, **kwargs): # noqa: E501 create an APIService # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_api_service(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param V1APIService body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param body: (required) + :type body: V1APIService + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1APIService + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1APIService """ kwargs['_return_http_data_only'] = True return self.create_api_service_with_http_info(body, **kwargs) # noqa: E501 @@ -71,27 +80,42 @@ def create_api_service_with_http_info(self, body, **kwargs): # noqa: E501 create an APIService # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_api_service_with_http_info(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param V1APIService body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param body: (required) + :type body: V1APIService + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1APIService, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1APIService, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -108,7 +132,10 @@ def create_api_service_with_http_info(self, body, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -121,8 +148,7 @@ def create_api_service_with_http_info(self, body, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_api_service`") # noqa: E501 collection_formats = {} @@ -130,16 +156,16 @@ def create_api_service_with_http_info(self, body, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -149,11 +175,18 @@ def create_api_service_with_http_info(self, body, **kwargs): # noqa: E501 body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1APIService", + 201: "V1APIService", + 202: "V1APIService", + 401: None, + } + return self.api_client.call_api( '/apis/apiregistration.k8s.io/v1/apiservices', 'POST', path_params, @@ -162,13 +195,14 @@ def create_api_service_with_http_info(self, body, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1APIService', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_api_service(self, name, **kwargs): # noqa: E501 """delete_api_service # noqa: E501 @@ -176,27 +210,40 @@ def delete_api_service(self, name, **kwargs): # noqa: E501 delete an APIService # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_api_service(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the APIService (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the APIService (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_api_service_with_http_info(name, **kwargs) # noqa: E501 @@ -207,29 +254,48 @@ def delete_api_service_with_http_info(self, name, **kwargs): # noqa: E501 delete an APIService # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_api_service_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the APIService (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the APIService (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -239,6 +305,7 @@ def delete_api_service_with_http_info(self, name, **kwargs): # noqa: E501 'pretty', 'dry_run', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'orphan_dependents', 'propagation_policy', 'body' @@ -248,7 +315,10 @@ def delete_api_service_with_http_info(self, name, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -261,8 +331,7 @@ def delete_api_service_with_http_info(self, name, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `delete_api_service`") # noqa: E501 collection_formats = {} @@ -272,18 +341,20 @@ def delete_api_service_with_http_info(self, name, **kwargs): # noqa: E501 path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -293,11 +364,17 @@ def delete_api_service_with_http_info(self, name, **kwargs): # noqa: E501 body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 202: "V1Status", + 401: None, + } + return self.api_client.call_api( '/apis/apiregistration.k8s.io/v1/apiservices/{name}', 'DELETE', path_params, @@ -306,13 +383,14 @@ def delete_api_service_with_http_info(self, name, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_collection_api_service(self, **kwargs): # noqa: E501 """delete_collection_api_service # noqa: E501 @@ -320,34 +398,54 @@ def delete_collection_api_service(self, **kwargs): # noqa: E501 delete collection of APIService # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_api_service(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_collection_api_service_with_http_info(**kwargs) # noqa: E501 @@ -358,36 +456,62 @@ def delete_collection_api_service_with_http_info(self, **kwargs): # noqa: E501 delete collection of APIService # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_api_service_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -398,6 +522,7 @@ def delete_collection_api_service_with_http_info(self, **kwargs): # noqa: E501 'dry_run', 'field_selector', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'label_selector', 'limit', 'orphan_dependents', @@ -413,7 +538,10 @@ def delete_collection_api_service_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -431,34 +559,36 @@ def delete_collection_api_service_with_http_info(self, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -468,11 +598,16 @@ def delete_collection_api_service_with_http_info(self, **kwargs): # noqa: E501 body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 401: None, + } + return self.api_client.call_api( '/apis/apiregistration.k8s.io/v1/apiservices', 'DELETE', path_params, @@ -481,13 +616,14 @@ def delete_collection_api_service_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def get_api_resources(self, **kwargs): # noqa: E501 """get_api_resources # noqa: E501 @@ -495,20 +631,24 @@ def get_api_resources(self, **kwargs): # noqa: E501 get available resources # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_resources(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1APIResourceList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1APIResourceList """ kwargs['_return_http_data_only'] = True return self.get_api_resources_with_http_info(**kwargs) # noqa: E501 @@ -519,22 +659,32 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 get available resources # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_resources_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -546,7 +696,10 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -565,7 +718,7 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -573,11 +726,16 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1APIResourceList", + 401: None, + } + return self.api_client.call_api( '/apis/apiregistration.k8s.io/v1/', 'GET', path_params, @@ -586,13 +744,14 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1APIResourceList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_api_service(self, **kwargs): # noqa: E501 """list_api_service # noqa: E501 @@ -600,31 +759,46 @@ def list_api_service(self, **kwargs): # noqa: E501 list or watch objects of kind APIService # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_api_service(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1APIServiceList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1APIServiceList """ kwargs['_return_http_data_only'] = True return self.list_api_service_with_http_info(**kwargs) # noqa: E501 @@ -635,33 +809,54 @@ def list_api_service_with_http_info(self, **kwargs): # noqa: E501 list or watch objects of kind APIService # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_api_service_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1APIServiceList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1APIServiceList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -684,7 +879,10 @@ def list_api_service_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -702,30 +900,30 @@ def list_api_service_with_http_info(self, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -733,11 +931,16 @@ def list_api_service_with_http_info(self, **kwargs): # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1APIServiceList", + 401: None, + } + return self.api_client.call_api( '/apis/apiregistration.k8s.io/v1/apiservices', 'GET', path_params, @@ -746,13 +949,14 @@ def list_api_service_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1APIServiceList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_api_service(self, name, body, **kwargs): # noqa: E501 """patch_api_service # noqa: E501 @@ -760,27 +964,38 @@ def patch_api_service(self, name, body, **kwargs): # noqa: E501 partially update the specified APIService # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_api_service(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the APIService (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the APIService (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1APIService + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1APIService """ kwargs['_return_http_data_only'] = True return self.patch_api_service_with_http_info(name, body, **kwargs) # noqa: E501 @@ -791,29 +1006,46 @@ def patch_api_service_with_http_info(self, name, body, **kwargs): # noqa: E501 partially update the specified APIService # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_api_service_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the APIService (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the APIService (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1APIService, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1APIService, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -832,7 +1064,10 @@ def patch_api_service_with_http_info(self, name, body, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -845,12 +1080,10 @@ def patch_api_service_with_http_info(self, name, body, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_api_service`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_api_service`") # noqa: E501 collection_formats = {} @@ -860,18 +1093,18 @@ def patch_api_service_with_http_info(self, name, body, **kwargs): # noqa: E501 path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -881,15 +1114,25 @@ def patch_api_service_with_http_info(self, name, body, **kwargs): # noqa: E501 body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1APIService", + 201: "V1APIService", + 401: None, + } + return self.api_client.call_api( '/apis/apiregistration.k8s.io/v1/apiservices/{name}', 'PATCH', path_params, @@ -898,13 +1141,14 @@ def patch_api_service_with_http_info(self, name, body, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1APIService', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_api_service_status(self, name, body, **kwargs): # noqa: E501 """patch_api_service_status # noqa: E501 @@ -912,27 +1156,38 @@ def patch_api_service_status(self, name, body, **kwargs): # noqa: E501 partially update status of the specified APIService # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_api_service_status(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the APIService (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the APIService (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1APIService + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1APIService """ kwargs['_return_http_data_only'] = True return self.patch_api_service_status_with_http_info(name, body, **kwargs) # noqa: E501 @@ -943,29 +1198,46 @@ def patch_api_service_status_with_http_info(self, name, body, **kwargs): # noqa partially update status of the specified APIService # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_api_service_status_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the APIService (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the APIService (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1APIService, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1APIService, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -984,7 +1256,10 @@ def patch_api_service_status_with_http_info(self, name, body, **kwargs): # noqa 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -997,12 +1272,10 @@ def patch_api_service_status_with_http_info(self, name, body, **kwargs): # noqa local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_api_service_status`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_api_service_status`") # noqa: E501 collection_formats = {} @@ -1012,18 +1285,18 @@ def patch_api_service_status_with_http_info(self, name, body, **kwargs): # noqa path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1033,15 +1306,25 @@ def patch_api_service_status_with_http_info(self, name, body, **kwargs): # noqa body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1APIService", + 201: "V1APIService", + 401: None, + } + return self.api_client.call_api( '/apis/apiregistration.k8s.io/v1/apiservices/{name}/status', 'PATCH', path_params, @@ -1050,13 +1333,14 @@ def patch_api_service_status_with_http_info(self, name, body, **kwargs): # noqa body=body_params, post_params=form_params, files=local_var_files, - response_type='V1APIService', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_api_service(self, name, **kwargs): # noqa: E501 """read_api_service # noqa: E501 @@ -1064,22 +1348,28 @@ def read_api_service(self, name, **kwargs): # noqa: E501 read the specified APIService # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_api_service(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the APIService (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the APIService (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1APIService + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1APIService """ kwargs['_return_http_data_only'] = True return self.read_api_service_with_http_info(name, **kwargs) # noqa: E501 @@ -1090,24 +1380,36 @@ def read_api_service_with_http_info(self, name, **kwargs): # noqa: E501 read the specified APIService # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_api_service_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the APIService (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the APIService (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1APIService, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1APIService, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1121,7 +1423,10 @@ def read_api_service_with_http_info(self, name, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1134,8 +1439,7 @@ def read_api_service_with_http_info(self, name, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_api_service`") # noqa: E501 collection_formats = {} @@ -1145,10 +1449,10 @@ def read_api_service_with_http_info(self, name, **kwargs): # noqa: E501 path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1156,11 +1460,16 @@ def read_api_service_with_http_info(self, name, **kwargs): # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1APIService", + 401: None, + } + return self.api_client.call_api( '/apis/apiregistration.k8s.io/v1/apiservices/{name}', 'GET', path_params, @@ -1169,13 +1478,14 @@ def read_api_service_with_http_info(self, name, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1APIService', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_api_service_status(self, name, **kwargs): # noqa: E501 """read_api_service_status # noqa: E501 @@ -1183,22 +1493,28 @@ def read_api_service_status(self, name, **kwargs): # noqa: E501 read status of the specified APIService # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_api_service_status(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the APIService (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the APIService (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1APIService + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1APIService """ kwargs['_return_http_data_only'] = True return self.read_api_service_status_with_http_info(name, **kwargs) # noqa: E501 @@ -1209,24 +1525,36 @@ def read_api_service_status_with_http_info(self, name, **kwargs): # noqa: E501 read status of the specified APIService # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_api_service_status_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the APIService (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the APIService (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1APIService, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1APIService, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1240,7 +1568,10 @@ def read_api_service_status_with_http_info(self, name, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1253,8 +1584,7 @@ def read_api_service_status_with_http_info(self, name, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_api_service_status`") # noqa: E501 collection_formats = {} @@ -1264,10 +1594,10 @@ def read_api_service_status_with_http_info(self, name, **kwargs): # noqa: E501 path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1275,11 +1605,16 @@ def read_api_service_status_with_http_info(self, name, **kwargs): # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1APIService", + 401: None, + } + return self.api_client.call_api( '/apis/apiregistration.k8s.io/v1/apiservices/{name}/status', 'GET', path_params, @@ -1288,13 +1623,14 @@ def read_api_service_status_with_http_info(self, name, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1APIService', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_api_service(self, name, body, **kwargs): # noqa: E501 """replace_api_service # noqa: E501 @@ -1302,26 +1638,36 @@ def replace_api_service(self, name, body, **kwargs): # noqa: E501 replace the specified APIService # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_api_service(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the APIService (required) - :param V1APIService body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the APIService (required) + :type name: str + :param body: (required) + :type body: V1APIService + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1APIService + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1APIService """ kwargs['_return_http_data_only'] = True return self.replace_api_service_with_http_info(name, body, **kwargs) # noqa: E501 @@ -1332,28 +1678,44 @@ def replace_api_service_with_http_info(self, name, body, **kwargs): # noqa: E50 replace the specified APIService # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_api_service_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the APIService (required) - :param V1APIService body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the APIService (required) + :type name: str + :param body: (required) + :type body: V1APIService + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1APIService, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1APIService, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1371,7 +1733,10 @@ def replace_api_service_with_http_info(self, name, body, **kwargs): # noqa: E50 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1384,12 +1749,10 @@ def replace_api_service_with_http_info(self, name, body, **kwargs): # noqa: E50 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_api_service`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_api_service`") # noqa: E501 collection_formats = {} @@ -1399,16 +1762,16 @@ def replace_api_service_with_http_info(self, name, body, **kwargs): # noqa: E50 path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1418,11 +1781,17 @@ def replace_api_service_with_http_info(self, name, body, **kwargs): # noqa: E50 body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1APIService", + 201: "V1APIService", + 401: None, + } + return self.api_client.call_api( '/apis/apiregistration.k8s.io/v1/apiservices/{name}', 'PUT', path_params, @@ -1431,13 +1800,14 @@ def replace_api_service_with_http_info(self, name, body, **kwargs): # noqa: E50 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1APIService', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_api_service_status(self, name, body, **kwargs): # noqa: E501 """replace_api_service_status # noqa: E501 @@ -1445,26 +1815,36 @@ def replace_api_service_status(self, name, body, **kwargs): # noqa: E501 replace status of the specified APIService # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_api_service_status(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the APIService (required) - :param V1APIService body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the APIService (required) + :type name: str + :param body: (required) + :type body: V1APIService + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1APIService + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1APIService """ kwargs['_return_http_data_only'] = True return self.replace_api_service_status_with_http_info(name, body, **kwargs) # noqa: E501 @@ -1475,28 +1855,44 @@ def replace_api_service_status_with_http_info(self, name, body, **kwargs): # no replace status of the specified APIService # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_api_service_status_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the APIService (required) - :param V1APIService body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the APIService (required) + :type name: str + :param body: (required) + :type body: V1APIService + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1APIService, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1APIService, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1514,7 +1910,10 @@ def replace_api_service_status_with_http_info(self, name, body, **kwargs): # no 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1527,12 +1926,10 @@ def replace_api_service_status_with_http_info(self, name, body, **kwargs): # no local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_api_service_status`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_api_service_status`") # noqa: E501 collection_formats = {} @@ -1542,16 +1939,16 @@ def replace_api_service_status_with_http_info(self, name, body, **kwargs): # no path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1561,11 +1958,17 @@ def replace_api_service_status_with_http_info(self, name, body, **kwargs): # no body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1APIService", + 201: "V1APIService", + 401: None, + } + return self.api_client.call_api( '/apis/apiregistration.k8s.io/v1/apiservices/{name}/status', 'PUT', path_params, @@ -1574,10 +1977,11 @@ def replace_api_service_status_with_http_info(self, name, body, **kwargs): # no body=body_params, post_params=form_params, files=local_var_files, - response_type='V1APIService', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) diff --git a/kubernetes/client/api/apis_api.py b/kubernetes/client/api/apis_api.py index fdad40cde7..dc0d461dea 100644 --- a/kubernetes/client/api/apis_api.py +++ b/kubernetes/client/api/apis_api.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ @@ -42,20 +42,24 @@ def get_api_versions(self, **kwargs): # noqa: E501 get available API versions # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_versions(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1APIGroupList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1APIGroupList """ kwargs['_return_http_data_only'] = True return self.get_api_versions_with_http_info(**kwargs) # noqa: E501 @@ -66,22 +70,32 @@ def get_api_versions_with_http_info(self, **kwargs): # noqa: E501 get available API versions # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_versions_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1APIGroupList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1APIGroupList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -93,7 +107,10 @@ def get_api_versions_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -112,7 +129,7 @@ def get_api_versions_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -125,6 +142,11 @@ def get_api_versions_with_http_info(self, **kwargs): # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1APIGroupList", + 401: None, + } + return self.api_client.call_api( '/apis/', 'GET', path_params, @@ -133,10 +155,11 @@ def get_api_versions_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1APIGroupList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) diff --git a/kubernetes/client/api/apps_api.py b/kubernetes/client/api/apps_api.py index f365dc59e4..e69b3c8533 100644 --- a/kubernetes/client/api/apps_api.py +++ b/kubernetes/client/api/apps_api.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ @@ -42,20 +42,24 @@ def get_api_group(self, **kwargs): # noqa: E501 get information of a group # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_group(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1APIGroup + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1APIGroup """ kwargs['_return_http_data_only'] = True return self.get_api_group_with_http_info(**kwargs) # noqa: E501 @@ -66,22 +70,32 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 get information of a group # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_group_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1APIGroup, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1APIGroup, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -93,7 +107,10 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -112,7 +129,7 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -125,6 +142,11 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1APIGroup", + 401: None, + } + return self.api_client.call_api( '/apis/apps/', 'GET', path_params, @@ -133,10 +155,11 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1APIGroup', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) diff --git a/kubernetes/client/api/apps_v1_api.py b/kubernetes/client/api/apps_v1_api.py index cdde677fd7..06bba034df 100644 --- a/kubernetes/client/api/apps_v1_api.py +++ b/kubernetes/client/api/apps_v1_api.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ @@ -42,26 +42,36 @@ def create_namespaced_controller_revision(self, namespace, body, **kwargs): # n create a ControllerRevision # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_namespaced_controller_revision(namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1ControllerRevision body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1ControllerRevision + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ControllerRevision + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ControllerRevision """ kwargs['_return_http_data_only'] = True return self.create_namespaced_controller_revision_with_http_info(namespace, body, **kwargs) # noqa: E501 @@ -72,28 +82,44 @@ def create_namespaced_controller_revision_with_http_info(self, namespace, body, create a ControllerRevision # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_namespaced_controller_revision_with_http_info(namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1ControllerRevision body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1ControllerRevision + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ControllerRevision, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ControllerRevision, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -111,7 +137,10 @@ def create_namespaced_controller_revision_with_http_info(self, namespace, body, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -124,12 +153,10 @@ def create_namespaced_controller_revision_with_http_info(self, namespace, body, local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_controller_revision`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_controller_revision`") # noqa: E501 collection_formats = {} @@ -139,16 +166,16 @@ def create_namespaced_controller_revision_with_http_info(self, namespace, body, path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -158,11 +185,18 @@ def create_namespaced_controller_revision_with_http_info(self, namespace, body, body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ControllerRevision", + 201: "V1ControllerRevision", + 202: "V1ControllerRevision", + 401: None, + } + return self.api_client.call_api( '/apis/apps/v1/namespaces/{namespace}/controllerrevisions', 'POST', path_params, @@ -171,13 +205,14 @@ def create_namespaced_controller_revision_with_http_info(self, namespace, body, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ControllerRevision', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def create_namespaced_daemon_set(self, namespace, body, **kwargs): # noqa: E501 """create_namespaced_daemon_set # noqa: E501 @@ -185,26 +220,36 @@ def create_namespaced_daemon_set(self, namespace, body, **kwargs): # noqa: E501 create a DaemonSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_namespaced_daemon_set(namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1DaemonSet body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1DaemonSet + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1DaemonSet + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1DaemonSet """ kwargs['_return_http_data_only'] = True return self.create_namespaced_daemon_set_with_http_info(namespace, body, **kwargs) # noqa: E501 @@ -215,28 +260,44 @@ def create_namespaced_daemon_set_with_http_info(self, namespace, body, **kwargs) create a DaemonSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_namespaced_daemon_set_with_http_info(namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1DaemonSet body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1DaemonSet + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1DaemonSet, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1DaemonSet, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -254,7 +315,10 @@ def create_namespaced_daemon_set_with_http_info(self, namespace, body, **kwargs) 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -267,12 +331,10 @@ def create_namespaced_daemon_set_with_http_info(self, namespace, body, **kwargs) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_daemon_set`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_daemon_set`") # noqa: E501 collection_formats = {} @@ -282,16 +344,16 @@ def create_namespaced_daemon_set_with_http_info(self, namespace, body, **kwargs) path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -301,11 +363,18 @@ def create_namespaced_daemon_set_with_http_info(self, namespace, body, **kwargs) body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1DaemonSet", + 201: "V1DaemonSet", + 202: "V1DaemonSet", + 401: None, + } + return self.api_client.call_api( '/apis/apps/v1/namespaces/{namespace}/daemonsets', 'POST', path_params, @@ -314,13 +383,14 @@ def create_namespaced_daemon_set_with_http_info(self, namespace, body, **kwargs) body=body_params, post_params=form_params, files=local_var_files, - response_type='V1DaemonSet', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def create_namespaced_deployment(self, namespace, body, **kwargs): # noqa: E501 """create_namespaced_deployment # noqa: E501 @@ -328,26 +398,36 @@ def create_namespaced_deployment(self, namespace, body, **kwargs): # noqa: E501 create a Deployment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_namespaced_deployment(namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1Deployment body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1Deployment + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Deployment + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Deployment """ kwargs['_return_http_data_only'] = True return self.create_namespaced_deployment_with_http_info(namespace, body, **kwargs) # noqa: E501 @@ -358,28 +438,44 @@ def create_namespaced_deployment_with_http_info(self, namespace, body, **kwargs) create a Deployment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_namespaced_deployment_with_http_info(namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1Deployment body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1Deployment + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Deployment, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Deployment, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -397,7 +493,10 @@ def create_namespaced_deployment_with_http_info(self, namespace, body, **kwargs) 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -410,12 +509,10 @@ def create_namespaced_deployment_with_http_info(self, namespace, body, **kwargs) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_deployment`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_deployment`") # noqa: E501 collection_formats = {} @@ -425,16 +522,16 @@ def create_namespaced_deployment_with_http_info(self, namespace, body, **kwargs) path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -444,11 +541,18 @@ def create_namespaced_deployment_with_http_info(self, namespace, body, **kwargs) body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Deployment", + 201: "V1Deployment", + 202: "V1Deployment", + 401: None, + } + return self.api_client.call_api( '/apis/apps/v1/namespaces/{namespace}/deployments', 'POST', path_params, @@ -457,13 +561,14 @@ def create_namespaced_deployment_with_http_info(self, namespace, body, **kwargs) body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Deployment', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def create_namespaced_replica_set(self, namespace, body, **kwargs): # noqa: E501 """create_namespaced_replica_set # noqa: E501 @@ -471,26 +576,36 @@ def create_namespaced_replica_set(self, namespace, body, **kwargs): # noqa: E50 create a ReplicaSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_namespaced_replica_set(namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1ReplicaSet body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1ReplicaSet + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ReplicaSet + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ReplicaSet """ kwargs['_return_http_data_only'] = True return self.create_namespaced_replica_set_with_http_info(namespace, body, **kwargs) # noqa: E501 @@ -501,28 +616,44 @@ def create_namespaced_replica_set_with_http_info(self, namespace, body, **kwargs create a ReplicaSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_namespaced_replica_set_with_http_info(namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1ReplicaSet body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1ReplicaSet + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ReplicaSet, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ReplicaSet, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -540,7 +671,10 @@ def create_namespaced_replica_set_with_http_info(self, namespace, body, **kwargs 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -553,12 +687,10 @@ def create_namespaced_replica_set_with_http_info(self, namespace, body, **kwargs local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_replica_set`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_replica_set`") # noqa: E501 collection_formats = {} @@ -568,16 +700,16 @@ def create_namespaced_replica_set_with_http_info(self, namespace, body, **kwargs path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -587,11 +719,18 @@ def create_namespaced_replica_set_with_http_info(self, namespace, body, **kwargs body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ReplicaSet", + 201: "V1ReplicaSet", + 202: "V1ReplicaSet", + 401: None, + } + return self.api_client.call_api( '/apis/apps/v1/namespaces/{namespace}/replicasets', 'POST', path_params, @@ -600,13 +739,14 @@ def create_namespaced_replica_set_with_http_info(self, namespace, body, **kwargs body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ReplicaSet', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def create_namespaced_stateful_set(self, namespace, body, **kwargs): # noqa: E501 """create_namespaced_stateful_set # noqa: E501 @@ -614,26 +754,36 @@ def create_namespaced_stateful_set(self, namespace, body, **kwargs): # noqa: E5 create a StatefulSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_namespaced_stateful_set(namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1StatefulSet body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1StatefulSet + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1StatefulSet + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1StatefulSet """ kwargs['_return_http_data_only'] = True return self.create_namespaced_stateful_set_with_http_info(namespace, body, **kwargs) # noqa: E501 @@ -644,28 +794,44 @@ def create_namespaced_stateful_set_with_http_info(self, namespace, body, **kwarg create a StatefulSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_namespaced_stateful_set_with_http_info(namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1StatefulSet body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1StatefulSet + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1StatefulSet, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1StatefulSet, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -683,7 +849,10 @@ def create_namespaced_stateful_set_with_http_info(self, namespace, body, **kwarg 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -696,12 +865,10 @@ def create_namespaced_stateful_set_with_http_info(self, namespace, body, **kwarg local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_stateful_set`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_stateful_set`") # noqa: E501 collection_formats = {} @@ -711,16 +878,16 @@ def create_namespaced_stateful_set_with_http_info(self, namespace, body, **kwarg path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -730,11 +897,18 @@ def create_namespaced_stateful_set_with_http_info(self, namespace, body, **kwarg body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1StatefulSet", + 201: "V1StatefulSet", + 202: "V1StatefulSet", + 401: None, + } + return self.api_client.call_api( '/apis/apps/v1/namespaces/{namespace}/statefulsets', 'POST', path_params, @@ -743,13 +917,14 @@ def create_namespaced_stateful_set_with_http_info(self, namespace, body, **kwarg body=body_params, post_params=form_params, files=local_var_files, - response_type='V1StatefulSet', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_collection_namespaced_controller_revision(self, namespace, **kwargs): # noqa: E501 """delete_collection_namespaced_controller_revision # noqa: E501 @@ -757,35 +932,56 @@ def delete_collection_namespaced_controller_revision(self, namespace, **kwargs): delete collection of ControllerRevision # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_namespaced_controller_revision(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_collection_namespaced_controller_revision_with_http_info(namespace, **kwargs) # noqa: E501 @@ -796,37 +992,64 @@ def delete_collection_namespaced_controller_revision_with_http_info(self, namesp delete collection of ControllerRevision # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_namespaced_controller_revision_with_http_info(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -838,6 +1061,7 @@ def delete_collection_namespaced_controller_revision_with_http_info(self, namesp 'dry_run', 'field_selector', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'label_selector', 'limit', 'orphan_dependents', @@ -853,7 +1077,10 @@ def delete_collection_namespaced_controller_revision_with_http_info(self, namesp 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -866,8 +1093,7 @@ def delete_collection_namespaced_controller_revision_with_http_info(self, namesp local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_controller_revision`") # noqa: E501 collection_formats = {} @@ -877,34 +1103,36 @@ def delete_collection_namespaced_controller_revision_with_http_info(self, namesp path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -914,11 +1142,16 @@ def delete_collection_namespaced_controller_revision_with_http_info(self, namesp body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 401: None, + } + return self.api_client.call_api( '/apis/apps/v1/namespaces/{namespace}/controllerrevisions', 'DELETE', path_params, @@ -927,13 +1160,14 @@ def delete_collection_namespaced_controller_revision_with_http_info(self, namesp body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_collection_namespaced_daemon_set(self, namespace, **kwargs): # noqa: E501 """delete_collection_namespaced_daemon_set # noqa: E501 @@ -941,35 +1175,56 @@ def delete_collection_namespaced_daemon_set(self, namespace, **kwargs): # noqa: delete collection of DaemonSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_namespaced_daemon_set(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_collection_namespaced_daemon_set_with_http_info(namespace, **kwargs) # noqa: E501 @@ -980,37 +1235,64 @@ def delete_collection_namespaced_daemon_set_with_http_info(self, namespace, **kw delete collection of DaemonSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_namespaced_daemon_set_with_http_info(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1022,6 +1304,7 @@ def delete_collection_namespaced_daemon_set_with_http_info(self, namespace, **kw 'dry_run', 'field_selector', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'label_selector', 'limit', 'orphan_dependents', @@ -1037,7 +1320,10 @@ def delete_collection_namespaced_daemon_set_with_http_info(self, namespace, **kw 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1050,8 +1336,7 @@ def delete_collection_namespaced_daemon_set_with_http_info(self, namespace, **kw local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_daemon_set`") # noqa: E501 collection_formats = {} @@ -1061,34 +1346,36 @@ def delete_collection_namespaced_daemon_set_with_http_info(self, namespace, **kw path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1098,11 +1385,16 @@ def delete_collection_namespaced_daemon_set_with_http_info(self, namespace, **kw body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 401: None, + } + return self.api_client.call_api( '/apis/apps/v1/namespaces/{namespace}/daemonsets', 'DELETE', path_params, @@ -1111,13 +1403,14 @@ def delete_collection_namespaced_daemon_set_with_http_info(self, namespace, **kw body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_collection_namespaced_deployment(self, namespace, **kwargs): # noqa: E501 """delete_collection_namespaced_deployment # noqa: E501 @@ -1125,35 +1418,56 @@ def delete_collection_namespaced_deployment(self, namespace, **kwargs): # noqa: delete collection of Deployment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_namespaced_deployment(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_collection_namespaced_deployment_with_http_info(namespace, **kwargs) # noqa: E501 @@ -1164,37 +1478,64 @@ def delete_collection_namespaced_deployment_with_http_info(self, namespace, **kw delete collection of Deployment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_namespaced_deployment_with_http_info(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1206,6 +1547,7 @@ def delete_collection_namespaced_deployment_with_http_info(self, namespace, **kw 'dry_run', 'field_selector', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'label_selector', 'limit', 'orphan_dependents', @@ -1221,7 +1563,10 @@ def delete_collection_namespaced_deployment_with_http_info(self, namespace, **kw 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1234,8 +1579,7 @@ def delete_collection_namespaced_deployment_with_http_info(self, namespace, **kw local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_deployment`") # noqa: E501 collection_formats = {} @@ -1245,34 +1589,36 @@ def delete_collection_namespaced_deployment_with_http_info(self, namespace, **kw path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1282,11 +1628,16 @@ def delete_collection_namespaced_deployment_with_http_info(self, namespace, **kw body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 401: None, + } + return self.api_client.call_api( '/apis/apps/v1/namespaces/{namespace}/deployments', 'DELETE', path_params, @@ -1295,13 +1646,14 @@ def delete_collection_namespaced_deployment_with_http_info(self, namespace, **kw body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_collection_namespaced_replica_set(self, namespace, **kwargs): # noqa: E501 """delete_collection_namespaced_replica_set # noqa: E501 @@ -1309,35 +1661,56 @@ def delete_collection_namespaced_replica_set(self, namespace, **kwargs): # noqa delete collection of ReplicaSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_namespaced_replica_set(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_collection_namespaced_replica_set_with_http_info(namespace, **kwargs) # noqa: E501 @@ -1348,37 +1721,64 @@ def delete_collection_namespaced_replica_set_with_http_info(self, namespace, **k delete collection of ReplicaSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_namespaced_replica_set_with_http_info(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1390,6 +1790,7 @@ def delete_collection_namespaced_replica_set_with_http_info(self, namespace, **k 'dry_run', 'field_selector', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'label_selector', 'limit', 'orphan_dependents', @@ -1405,7 +1806,10 @@ def delete_collection_namespaced_replica_set_with_http_info(self, namespace, **k 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1418,8 +1822,7 @@ def delete_collection_namespaced_replica_set_with_http_info(self, namespace, **k local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_replica_set`") # noqa: E501 collection_formats = {} @@ -1429,34 +1832,36 @@ def delete_collection_namespaced_replica_set_with_http_info(self, namespace, **k path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1466,11 +1871,16 @@ def delete_collection_namespaced_replica_set_with_http_info(self, namespace, **k body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 401: None, + } + return self.api_client.call_api( '/apis/apps/v1/namespaces/{namespace}/replicasets', 'DELETE', path_params, @@ -1479,13 +1889,14 @@ def delete_collection_namespaced_replica_set_with_http_info(self, namespace, **k body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_collection_namespaced_stateful_set(self, namespace, **kwargs): # noqa: E501 """delete_collection_namespaced_stateful_set # noqa: E501 @@ -1493,35 +1904,56 @@ def delete_collection_namespaced_stateful_set(self, namespace, **kwargs): # noq delete collection of StatefulSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_namespaced_stateful_set(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_collection_namespaced_stateful_set_with_http_info(namespace, **kwargs) # noqa: E501 @@ -1532,37 +1964,64 @@ def delete_collection_namespaced_stateful_set_with_http_info(self, namespace, ** delete collection of StatefulSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_namespaced_stateful_set_with_http_info(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1574,6 +2033,7 @@ def delete_collection_namespaced_stateful_set_with_http_info(self, namespace, ** 'dry_run', 'field_selector', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'label_selector', 'limit', 'orphan_dependents', @@ -1589,7 +2049,10 @@ def delete_collection_namespaced_stateful_set_with_http_info(self, namespace, ** 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1602,8 +2065,7 @@ def delete_collection_namespaced_stateful_set_with_http_info(self, namespace, ** local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_stateful_set`") # noqa: E501 collection_formats = {} @@ -1613,34 +2075,36 @@ def delete_collection_namespaced_stateful_set_with_http_info(self, namespace, ** path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1650,11 +2114,16 @@ def delete_collection_namespaced_stateful_set_with_http_info(self, namespace, ** body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 401: None, + } + return self.api_client.call_api( '/apis/apps/v1/namespaces/{namespace}/statefulsets', 'DELETE', path_params, @@ -1663,13 +2132,14 @@ def delete_collection_namespaced_stateful_set_with_http_info(self, namespace, ** body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_namespaced_controller_revision(self, name, namespace, **kwargs): # noqa: E501 """delete_namespaced_controller_revision # noqa: E501 @@ -1677,28 +2147,42 @@ def delete_namespaced_controller_revision(self, name, namespace, **kwargs): # n delete a ControllerRevision # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_namespaced_controller_revision(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ControllerRevision (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the ControllerRevision (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_namespaced_controller_revision_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -1709,30 +2193,50 @@ def delete_namespaced_controller_revision_with_http_info(self, name, namespace, delete a ControllerRevision # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_namespaced_controller_revision_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ControllerRevision (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the ControllerRevision (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1743,6 +2247,7 @@ def delete_namespaced_controller_revision_with_http_info(self, name, namespace, 'pretty', 'dry_run', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'orphan_dependents', 'propagation_policy', 'body' @@ -1752,7 +2257,10 @@ def delete_namespaced_controller_revision_with_http_info(self, name, namespace, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1765,12 +2273,10 @@ def delete_namespaced_controller_revision_with_http_info(self, name, namespace, local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_controller_revision`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_controller_revision`") # noqa: E501 collection_formats = {} @@ -1782,18 +2288,20 @@ def delete_namespaced_controller_revision_with_http_info(self, name, namespace, path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1803,11 +2311,17 @@ def delete_namespaced_controller_revision_with_http_info(self, name, namespace, body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 202: "V1Status", + 401: None, + } + return self.api_client.call_api( '/apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}', 'DELETE', path_params, @@ -1816,13 +2330,14 @@ def delete_namespaced_controller_revision_with_http_info(self, name, namespace, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_namespaced_daemon_set(self, name, namespace, **kwargs): # noqa: E501 """delete_namespaced_daemon_set # noqa: E501 @@ -1830,28 +2345,42 @@ def delete_namespaced_daemon_set(self, name, namespace, **kwargs): # noqa: E501 delete a DaemonSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_namespaced_daemon_set(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the DaemonSet (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the DaemonSet (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_namespaced_daemon_set_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -1862,30 +2391,50 @@ def delete_namespaced_daemon_set_with_http_info(self, name, namespace, **kwargs) delete a DaemonSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_namespaced_daemon_set_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the DaemonSet (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the DaemonSet (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1896,6 +2445,7 @@ def delete_namespaced_daemon_set_with_http_info(self, name, namespace, **kwargs) 'pretty', 'dry_run', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'orphan_dependents', 'propagation_policy', 'body' @@ -1905,7 +2455,10 @@ def delete_namespaced_daemon_set_with_http_info(self, name, namespace, **kwargs) 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1918,12 +2471,10 @@ def delete_namespaced_daemon_set_with_http_info(self, name, namespace, **kwargs) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_daemon_set`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_daemon_set`") # noqa: E501 collection_formats = {} @@ -1935,18 +2486,20 @@ def delete_namespaced_daemon_set_with_http_info(self, name, namespace, **kwargs) path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1956,11 +2509,17 @@ def delete_namespaced_daemon_set_with_http_info(self, name, namespace, **kwargs) body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 202: "V1Status", + 401: None, + } + return self.api_client.call_api( '/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}', 'DELETE', path_params, @@ -1969,13 +2528,14 @@ def delete_namespaced_daemon_set_with_http_info(self, name, namespace, **kwargs) body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_namespaced_deployment(self, name, namespace, **kwargs): # noqa: E501 """delete_namespaced_deployment # noqa: E501 @@ -1983,28 +2543,42 @@ def delete_namespaced_deployment(self, name, namespace, **kwargs): # noqa: E501 delete a Deployment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_namespaced_deployment(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Deployment (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the Deployment (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_namespaced_deployment_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -2015,30 +2589,50 @@ def delete_namespaced_deployment_with_http_info(self, name, namespace, **kwargs) delete a Deployment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_namespaced_deployment_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Deployment (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the Deployment (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -2049,6 +2643,7 @@ def delete_namespaced_deployment_with_http_info(self, name, namespace, **kwargs) 'pretty', 'dry_run', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'orphan_dependents', 'propagation_policy', 'body' @@ -2058,7 +2653,10 @@ def delete_namespaced_deployment_with_http_info(self, name, namespace, **kwargs) 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2071,12 +2669,10 @@ def delete_namespaced_deployment_with_http_info(self, name, namespace, **kwargs) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_deployment`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_deployment`") # noqa: E501 collection_formats = {} @@ -2088,18 +2684,20 @@ def delete_namespaced_deployment_with_http_info(self, name, namespace, **kwargs) path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2109,11 +2707,17 @@ def delete_namespaced_deployment_with_http_info(self, name, namespace, **kwargs) body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 202: "V1Status", + 401: None, + } + return self.api_client.call_api( '/apis/apps/v1/namespaces/{namespace}/deployments/{name}', 'DELETE', path_params, @@ -2122,13 +2726,14 @@ def delete_namespaced_deployment_with_http_info(self, name, namespace, **kwargs) body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_namespaced_replica_set(self, name, namespace, **kwargs): # noqa: E501 """delete_namespaced_replica_set # noqa: E501 @@ -2136,28 +2741,42 @@ def delete_namespaced_replica_set(self, name, namespace, **kwargs): # noqa: E50 delete a ReplicaSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_namespaced_replica_set(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ReplicaSet (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the ReplicaSet (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_namespaced_replica_set_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -2168,30 +2787,50 @@ def delete_namespaced_replica_set_with_http_info(self, name, namespace, **kwargs delete a ReplicaSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_namespaced_replica_set_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ReplicaSet (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the ReplicaSet (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -2202,6 +2841,7 @@ def delete_namespaced_replica_set_with_http_info(self, name, namespace, **kwargs 'pretty', 'dry_run', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'orphan_dependents', 'propagation_policy', 'body' @@ -2211,7 +2851,10 @@ def delete_namespaced_replica_set_with_http_info(self, name, namespace, **kwargs 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2224,12 +2867,10 @@ def delete_namespaced_replica_set_with_http_info(self, name, namespace, **kwargs local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_replica_set`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_replica_set`") # noqa: E501 collection_formats = {} @@ -2241,18 +2882,20 @@ def delete_namespaced_replica_set_with_http_info(self, name, namespace, **kwargs path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2262,11 +2905,17 @@ def delete_namespaced_replica_set_with_http_info(self, name, namespace, **kwargs body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 202: "V1Status", + 401: None, + } + return self.api_client.call_api( '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}', 'DELETE', path_params, @@ -2275,13 +2924,14 @@ def delete_namespaced_replica_set_with_http_info(self, name, namespace, **kwargs body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_namespaced_stateful_set(self, name, namespace, **kwargs): # noqa: E501 """delete_namespaced_stateful_set # noqa: E501 @@ -2289,28 +2939,42 @@ def delete_namespaced_stateful_set(self, name, namespace, **kwargs): # noqa: E5 delete a StatefulSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_namespaced_stateful_set(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the StatefulSet (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the StatefulSet (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_namespaced_stateful_set_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -2321,30 +2985,50 @@ def delete_namespaced_stateful_set_with_http_info(self, name, namespace, **kwarg delete a StatefulSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_namespaced_stateful_set_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the StatefulSet (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the StatefulSet (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -2355,6 +3039,7 @@ def delete_namespaced_stateful_set_with_http_info(self, name, namespace, **kwarg 'pretty', 'dry_run', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'orphan_dependents', 'propagation_policy', 'body' @@ -2364,7 +3049,10 @@ def delete_namespaced_stateful_set_with_http_info(self, name, namespace, **kwarg 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2377,12 +3065,10 @@ def delete_namespaced_stateful_set_with_http_info(self, name, namespace, **kwarg local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_stateful_set`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_stateful_set`") # noqa: E501 collection_formats = {} @@ -2394,18 +3080,20 @@ def delete_namespaced_stateful_set_with_http_info(self, name, namespace, **kwarg path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2415,11 +3103,17 @@ def delete_namespaced_stateful_set_with_http_info(self, name, namespace, **kwarg body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 202: "V1Status", + 401: None, + } + return self.api_client.call_api( '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}', 'DELETE', path_params, @@ -2428,13 +3122,14 @@ def delete_namespaced_stateful_set_with_http_info(self, name, namespace, **kwarg body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def get_api_resources(self, **kwargs): # noqa: E501 """get_api_resources # noqa: E501 @@ -2442,20 +3137,24 @@ def get_api_resources(self, **kwargs): # noqa: E501 get available resources # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_resources(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1APIResourceList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1APIResourceList """ kwargs['_return_http_data_only'] = True return self.get_api_resources_with_http_info(**kwargs) # noqa: E501 @@ -2466,22 +3165,32 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 get available resources # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_resources_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -2493,7 +3202,10 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2512,7 +3224,7 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2520,11 +3232,16 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1APIResourceList", + 401: None, + } + return self.api_client.call_api( '/apis/apps/v1/', 'GET', path_params, @@ -2533,13 +3250,14 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1APIResourceList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_controller_revision_for_all_namespaces(self, **kwargs): # noqa: E501 """list_controller_revision_for_all_namespaces # noqa: E501 @@ -2547,31 +3265,46 @@ def list_controller_revision_for_all_namespaces(self, **kwargs): # noqa: E501 list or watch objects of kind ControllerRevision # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_controller_revision_for_all_namespaces(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ControllerRevisionList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ControllerRevisionList """ kwargs['_return_http_data_only'] = True return self.list_controller_revision_for_all_namespaces_with_http_info(**kwargs) # noqa: E501 @@ -2582,33 +3315,54 @@ def list_controller_revision_for_all_namespaces_with_http_info(self, **kwargs): list or watch objects of kind ControllerRevision # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_controller_revision_for_all_namespaces_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ControllerRevisionList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ControllerRevisionList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -2631,7 +3385,10 @@ def list_controller_revision_for_all_namespaces_with_http_info(self, **kwargs): 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2649,30 +3406,30 @@ def list_controller_revision_for_all_namespaces_with_http_info(self, **kwargs): path_params = {} query_params = [] - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2680,11 +3437,16 @@ def list_controller_revision_for_all_namespaces_with_http_info(self, **kwargs): body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ControllerRevisionList", + 401: None, + } + return self.api_client.call_api( '/apis/apps/v1/controllerrevisions', 'GET', path_params, @@ -2693,13 +3455,14 @@ def list_controller_revision_for_all_namespaces_with_http_info(self, **kwargs): body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ControllerRevisionList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_daemon_set_for_all_namespaces(self, **kwargs): # noqa: E501 """list_daemon_set_for_all_namespaces # noqa: E501 @@ -2707,31 +3470,46 @@ def list_daemon_set_for_all_namespaces(self, **kwargs): # noqa: E501 list or watch objects of kind DaemonSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_daemon_set_for_all_namespaces(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1DaemonSetList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1DaemonSetList """ kwargs['_return_http_data_only'] = True return self.list_daemon_set_for_all_namespaces_with_http_info(**kwargs) # noqa: E501 @@ -2742,33 +3520,54 @@ def list_daemon_set_for_all_namespaces_with_http_info(self, **kwargs): # noqa: list or watch objects of kind DaemonSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_daemon_set_for_all_namespaces_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1DaemonSetList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1DaemonSetList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -2791,7 +3590,10 @@ def list_daemon_set_for_all_namespaces_with_http_info(self, **kwargs): # noqa: 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2809,30 +3611,30 @@ def list_daemon_set_for_all_namespaces_with_http_info(self, **kwargs): # noqa: path_params = {} query_params = [] - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2840,11 +3642,16 @@ def list_daemon_set_for_all_namespaces_with_http_info(self, **kwargs): # noqa: body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1DaemonSetList", + 401: None, + } + return self.api_client.call_api( '/apis/apps/v1/daemonsets', 'GET', path_params, @@ -2853,13 +3660,14 @@ def list_daemon_set_for_all_namespaces_with_http_info(self, **kwargs): # noqa: body=body_params, post_params=form_params, files=local_var_files, - response_type='V1DaemonSetList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_deployment_for_all_namespaces(self, **kwargs): # noqa: E501 """list_deployment_for_all_namespaces # noqa: E501 @@ -2867,31 +3675,46 @@ def list_deployment_for_all_namespaces(self, **kwargs): # noqa: E501 list or watch objects of kind Deployment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_deployment_for_all_namespaces(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1DeploymentList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1DeploymentList """ kwargs['_return_http_data_only'] = True return self.list_deployment_for_all_namespaces_with_http_info(**kwargs) # noqa: E501 @@ -2902,33 +3725,54 @@ def list_deployment_for_all_namespaces_with_http_info(self, **kwargs): # noqa: list or watch objects of kind Deployment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_deployment_for_all_namespaces_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1DeploymentList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1DeploymentList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -2951,7 +3795,10 @@ def list_deployment_for_all_namespaces_with_http_info(self, **kwargs): # noqa: 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2969,30 +3816,30 @@ def list_deployment_for_all_namespaces_with_http_info(self, **kwargs): # noqa: path_params = {} query_params = [] - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -3000,11 +3847,16 @@ def list_deployment_for_all_namespaces_with_http_info(self, **kwargs): # noqa: body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1DeploymentList", + 401: None, + } + return self.api_client.call_api( '/apis/apps/v1/deployments', 'GET', path_params, @@ -3013,13 +3865,14 @@ def list_deployment_for_all_namespaces_with_http_info(self, **kwargs): # noqa: body=body_params, post_params=form_params, files=local_var_files, - response_type='V1DeploymentList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_namespaced_controller_revision(self, namespace, **kwargs): # noqa: E501 """list_namespaced_controller_revision # noqa: E501 @@ -3027,32 +3880,48 @@ def list_namespaced_controller_revision(self, namespace, **kwargs): # noqa: E50 list or watch objects of kind ControllerRevision # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_namespaced_controller_revision(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ControllerRevisionList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ControllerRevisionList """ kwargs['_return_http_data_only'] = True return self.list_namespaced_controller_revision_with_http_info(namespace, **kwargs) # noqa: E501 @@ -3063,34 +3932,56 @@ def list_namespaced_controller_revision_with_http_info(self, namespace, **kwargs list or watch objects of kind ControllerRevision # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_namespaced_controller_revision_with_http_info(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ControllerRevisionList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ControllerRevisionList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -3114,7 +4005,10 @@ def list_namespaced_controller_revision_with_http_info(self, namespace, **kwargs 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -3127,8 +4021,7 @@ def list_namespaced_controller_revision_with_http_info(self, namespace, **kwargs local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_controller_revision`") # noqa: E501 collection_formats = {} @@ -3138,30 +4031,30 @@ def list_namespaced_controller_revision_with_http_info(self, namespace, **kwargs path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -3169,11 +4062,16 @@ def list_namespaced_controller_revision_with_http_info(self, namespace, **kwargs body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ControllerRevisionList", + 401: None, + } + return self.api_client.call_api( '/apis/apps/v1/namespaces/{namespace}/controllerrevisions', 'GET', path_params, @@ -3182,13 +4080,14 @@ def list_namespaced_controller_revision_with_http_info(self, namespace, **kwargs body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ControllerRevisionList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_namespaced_daemon_set(self, namespace, **kwargs): # noqa: E501 """list_namespaced_daemon_set # noqa: E501 @@ -3196,32 +4095,48 @@ def list_namespaced_daemon_set(self, namespace, **kwargs): # noqa: E501 list or watch objects of kind DaemonSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_namespaced_daemon_set(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1DaemonSetList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1DaemonSetList """ kwargs['_return_http_data_only'] = True return self.list_namespaced_daemon_set_with_http_info(namespace, **kwargs) # noqa: E501 @@ -3232,34 +4147,56 @@ def list_namespaced_daemon_set_with_http_info(self, namespace, **kwargs): # noq list or watch objects of kind DaemonSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_namespaced_daemon_set_with_http_info(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1DaemonSetList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1DaemonSetList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -3283,7 +4220,10 @@ def list_namespaced_daemon_set_with_http_info(self, namespace, **kwargs): # noq 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -3296,8 +4236,7 @@ def list_namespaced_daemon_set_with_http_info(self, namespace, **kwargs): # noq local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_daemon_set`") # noqa: E501 collection_formats = {} @@ -3307,30 +4246,30 @@ def list_namespaced_daemon_set_with_http_info(self, namespace, **kwargs): # noq path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -3338,11 +4277,16 @@ def list_namespaced_daemon_set_with_http_info(self, namespace, **kwargs): # noq body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1DaemonSetList", + 401: None, + } + return self.api_client.call_api( '/apis/apps/v1/namespaces/{namespace}/daemonsets', 'GET', path_params, @@ -3351,13 +4295,14 @@ def list_namespaced_daemon_set_with_http_info(self, namespace, **kwargs): # noq body=body_params, post_params=form_params, files=local_var_files, - response_type='V1DaemonSetList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_namespaced_deployment(self, namespace, **kwargs): # noqa: E501 """list_namespaced_deployment # noqa: E501 @@ -3365,32 +4310,48 @@ def list_namespaced_deployment(self, namespace, **kwargs): # noqa: E501 list or watch objects of kind Deployment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_namespaced_deployment(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1DeploymentList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1DeploymentList """ kwargs['_return_http_data_only'] = True return self.list_namespaced_deployment_with_http_info(namespace, **kwargs) # noqa: E501 @@ -3401,34 +4362,56 @@ def list_namespaced_deployment_with_http_info(self, namespace, **kwargs): # noq list or watch objects of kind Deployment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_namespaced_deployment_with_http_info(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1DeploymentList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1DeploymentList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -3452,7 +4435,10 @@ def list_namespaced_deployment_with_http_info(self, namespace, **kwargs): # noq 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -3465,8 +4451,7 @@ def list_namespaced_deployment_with_http_info(self, namespace, **kwargs): # noq local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_deployment`") # noqa: E501 collection_formats = {} @@ -3476,30 +4461,30 @@ def list_namespaced_deployment_with_http_info(self, namespace, **kwargs): # noq path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -3507,11 +4492,16 @@ def list_namespaced_deployment_with_http_info(self, namespace, **kwargs): # noq body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1DeploymentList", + 401: None, + } + return self.api_client.call_api( '/apis/apps/v1/namespaces/{namespace}/deployments', 'GET', path_params, @@ -3520,13 +4510,14 @@ def list_namespaced_deployment_with_http_info(self, namespace, **kwargs): # noq body=body_params, post_params=form_params, files=local_var_files, - response_type='V1DeploymentList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_namespaced_replica_set(self, namespace, **kwargs): # noqa: E501 """list_namespaced_replica_set # noqa: E501 @@ -3534,32 +4525,48 @@ def list_namespaced_replica_set(self, namespace, **kwargs): # noqa: E501 list or watch objects of kind ReplicaSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_namespaced_replica_set(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ReplicaSetList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ReplicaSetList """ kwargs['_return_http_data_only'] = True return self.list_namespaced_replica_set_with_http_info(namespace, **kwargs) # noqa: E501 @@ -3570,34 +4577,56 @@ def list_namespaced_replica_set_with_http_info(self, namespace, **kwargs): # no list or watch objects of kind ReplicaSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_namespaced_replica_set_with_http_info(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ReplicaSetList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ReplicaSetList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -3621,7 +4650,10 @@ def list_namespaced_replica_set_with_http_info(self, namespace, **kwargs): # no 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -3634,8 +4666,7 @@ def list_namespaced_replica_set_with_http_info(self, namespace, **kwargs): # no local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_replica_set`") # noqa: E501 collection_formats = {} @@ -3645,30 +4676,30 @@ def list_namespaced_replica_set_with_http_info(self, namespace, **kwargs): # no path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -3676,11 +4707,16 @@ def list_namespaced_replica_set_with_http_info(self, namespace, **kwargs): # no body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ReplicaSetList", + 401: None, + } + return self.api_client.call_api( '/apis/apps/v1/namespaces/{namespace}/replicasets', 'GET', path_params, @@ -3689,13 +4725,14 @@ def list_namespaced_replica_set_with_http_info(self, namespace, **kwargs): # no body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ReplicaSetList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_namespaced_stateful_set(self, namespace, **kwargs): # noqa: E501 """list_namespaced_stateful_set # noqa: E501 @@ -3703,32 +4740,48 @@ def list_namespaced_stateful_set(self, namespace, **kwargs): # noqa: E501 list or watch objects of kind StatefulSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_namespaced_stateful_set(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1StatefulSetList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1StatefulSetList """ kwargs['_return_http_data_only'] = True return self.list_namespaced_stateful_set_with_http_info(namespace, **kwargs) # noqa: E501 @@ -3739,34 +4792,56 @@ def list_namespaced_stateful_set_with_http_info(self, namespace, **kwargs): # n list or watch objects of kind StatefulSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_namespaced_stateful_set_with_http_info(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1StatefulSetList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1StatefulSetList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -3790,7 +4865,10 @@ def list_namespaced_stateful_set_with_http_info(self, namespace, **kwargs): # n 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -3803,8 +4881,7 @@ def list_namespaced_stateful_set_with_http_info(self, namespace, **kwargs): # n local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_stateful_set`") # noqa: E501 collection_formats = {} @@ -3814,30 +4891,30 @@ def list_namespaced_stateful_set_with_http_info(self, namespace, **kwargs): # n path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -3845,11 +4922,16 @@ def list_namespaced_stateful_set_with_http_info(self, namespace, **kwargs): # n body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1StatefulSetList", + 401: None, + } + return self.api_client.call_api( '/apis/apps/v1/namespaces/{namespace}/statefulsets', 'GET', path_params, @@ -3858,13 +4940,14 @@ def list_namespaced_stateful_set_with_http_info(self, namespace, **kwargs): # n body=body_params, post_params=form_params, files=local_var_files, - response_type='V1StatefulSetList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_replica_set_for_all_namespaces(self, **kwargs): # noqa: E501 """list_replica_set_for_all_namespaces # noqa: E501 @@ -3872,31 +4955,46 @@ def list_replica_set_for_all_namespaces(self, **kwargs): # noqa: E501 list or watch objects of kind ReplicaSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_replica_set_for_all_namespaces(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ReplicaSetList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ReplicaSetList """ kwargs['_return_http_data_only'] = True return self.list_replica_set_for_all_namespaces_with_http_info(**kwargs) # noqa: E501 @@ -3907,33 +5005,54 @@ def list_replica_set_for_all_namespaces_with_http_info(self, **kwargs): # noqa: list or watch objects of kind ReplicaSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_replica_set_for_all_namespaces_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ReplicaSetList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ReplicaSetList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -3956,7 +5075,10 @@ def list_replica_set_for_all_namespaces_with_http_info(self, **kwargs): # noqa: 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -3974,30 +5096,30 @@ def list_replica_set_for_all_namespaces_with_http_info(self, **kwargs): # noqa: path_params = {} query_params = [] - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -4005,11 +5127,16 @@ def list_replica_set_for_all_namespaces_with_http_info(self, **kwargs): # noqa: body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ReplicaSetList", + 401: None, + } + return self.api_client.call_api( '/apis/apps/v1/replicasets', 'GET', path_params, @@ -4018,13 +5145,14 @@ def list_replica_set_for_all_namespaces_with_http_info(self, **kwargs): # noqa: body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ReplicaSetList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_stateful_set_for_all_namespaces(self, **kwargs): # noqa: E501 """list_stateful_set_for_all_namespaces # noqa: E501 @@ -4032,31 +5160,46 @@ def list_stateful_set_for_all_namespaces(self, **kwargs): # noqa: E501 list or watch objects of kind StatefulSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_stateful_set_for_all_namespaces(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1StatefulSetList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1StatefulSetList """ kwargs['_return_http_data_only'] = True return self.list_stateful_set_for_all_namespaces_with_http_info(**kwargs) # noqa: E501 @@ -4067,33 +5210,54 @@ def list_stateful_set_for_all_namespaces_with_http_info(self, **kwargs): # noqa list or watch objects of kind StatefulSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_stateful_set_for_all_namespaces_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1StatefulSetList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1StatefulSetList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -4116,7 +5280,10 @@ def list_stateful_set_for_all_namespaces_with_http_info(self, **kwargs): # noqa 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -4134,30 +5301,30 @@ def list_stateful_set_for_all_namespaces_with_http_info(self, **kwargs): # noqa path_params = {} query_params = [] - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -4165,11 +5332,16 @@ def list_stateful_set_for_all_namespaces_with_http_info(self, **kwargs): # noqa body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1StatefulSetList", + 401: None, + } + return self.api_client.call_api( '/apis/apps/v1/statefulsets', 'GET', path_params, @@ -4178,13 +5350,14 @@ def list_stateful_set_for_all_namespaces_with_http_info(self, **kwargs): # noqa body=body_params, post_params=form_params, files=local_var_files, - response_type='V1StatefulSetList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_namespaced_controller_revision(self, name, namespace, body, **kwargs): # noqa: E501 """patch_namespaced_controller_revision # noqa: E501 @@ -4192,28 +5365,40 @@ def patch_namespaced_controller_revision(self, name, namespace, body, **kwargs): partially update the specified ControllerRevision # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_controller_revision(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ControllerRevision (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the ControllerRevision (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ControllerRevision + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ControllerRevision """ kwargs['_return_http_data_only'] = True return self.patch_namespaced_controller_revision_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -4224,30 +5409,48 @@ def patch_namespaced_controller_revision_with_http_info(self, name, namespace, b partially update the specified ControllerRevision # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_controller_revision_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ControllerRevision (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the ControllerRevision (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ControllerRevision, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ControllerRevision, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -4267,7 +5470,10 @@ def patch_namespaced_controller_revision_with_http_info(self, name, namespace, b 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -4280,16 +5486,13 @@ def patch_namespaced_controller_revision_with_http_info(self, name, namespace, b local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_controller_revision`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_controller_revision`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_controller_revision`") # noqa: E501 collection_formats = {} @@ -4301,18 +5504,18 @@ def patch_namespaced_controller_revision_with_http_info(self, name, namespace, b path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -4322,15 +5525,25 @@ def patch_namespaced_controller_revision_with_http_info(self, name, namespace, b body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ControllerRevision", + 201: "V1ControllerRevision", + 401: None, + } + return self.api_client.call_api( '/apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}', 'PATCH', path_params, @@ -4339,13 +5552,14 @@ def patch_namespaced_controller_revision_with_http_info(self, name, namespace, b body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ControllerRevision', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_namespaced_daemon_set(self, name, namespace, body, **kwargs): # noqa: E501 """patch_namespaced_daemon_set # noqa: E501 @@ -4353,28 +5567,40 @@ def patch_namespaced_daemon_set(self, name, namespace, body, **kwargs): # noqa: partially update the specified DaemonSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_daemon_set(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the DaemonSet (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the DaemonSet (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1DaemonSet + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1DaemonSet """ kwargs['_return_http_data_only'] = True return self.patch_namespaced_daemon_set_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -4385,30 +5611,48 @@ def patch_namespaced_daemon_set_with_http_info(self, name, namespace, body, **kw partially update the specified DaemonSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_daemon_set_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the DaemonSet (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the DaemonSet (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1DaemonSet, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1DaemonSet, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -4428,7 +5672,10 @@ def patch_namespaced_daemon_set_with_http_info(self, name, namespace, body, **kw 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -4441,16 +5688,13 @@ def patch_namespaced_daemon_set_with_http_info(self, name, namespace, body, **kw local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_daemon_set`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_daemon_set`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_daemon_set`") # noqa: E501 collection_formats = {} @@ -4462,18 +5706,18 @@ def patch_namespaced_daemon_set_with_http_info(self, name, namespace, body, **kw path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -4483,15 +5727,25 @@ def patch_namespaced_daemon_set_with_http_info(self, name, namespace, body, **kw body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1DaemonSet", + 201: "V1DaemonSet", + 401: None, + } + return self.api_client.call_api( '/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}', 'PATCH', path_params, @@ -4500,13 +5754,14 @@ def patch_namespaced_daemon_set_with_http_info(self, name, namespace, body, **kw body=body_params, post_params=form_params, files=local_var_files, - response_type='V1DaemonSet', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_namespaced_daemon_set_status(self, name, namespace, body, **kwargs): # noqa: E501 """patch_namespaced_daemon_set_status # noqa: E501 @@ -4514,28 +5769,40 @@ def patch_namespaced_daemon_set_status(self, name, namespace, body, **kwargs): partially update status of the specified DaemonSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_daemon_set_status(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the DaemonSet (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the DaemonSet (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1DaemonSet + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1DaemonSet """ kwargs['_return_http_data_only'] = True return self.patch_namespaced_daemon_set_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -4546,30 +5813,48 @@ def patch_namespaced_daemon_set_status_with_http_info(self, name, namespace, bod partially update status of the specified DaemonSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_daemon_set_status_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the DaemonSet (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the DaemonSet (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1DaemonSet, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1DaemonSet, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -4589,7 +5874,10 @@ def patch_namespaced_daemon_set_status_with_http_info(self, name, namespace, bod 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -4602,16 +5890,13 @@ def patch_namespaced_daemon_set_status_with_http_info(self, name, namespace, bod local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_daemon_set_status`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_daemon_set_status`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_daemon_set_status`") # noqa: E501 collection_formats = {} @@ -4623,18 +5908,18 @@ def patch_namespaced_daemon_set_status_with_http_info(self, name, namespace, bod path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -4644,15 +5929,25 @@ def patch_namespaced_daemon_set_status_with_http_info(self, name, namespace, bod body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1DaemonSet", + 201: "V1DaemonSet", + 401: None, + } + return self.api_client.call_api( '/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}/status', 'PATCH', path_params, @@ -4661,13 +5956,14 @@ def patch_namespaced_daemon_set_status_with_http_info(self, name, namespace, bod body=body_params, post_params=form_params, files=local_var_files, - response_type='V1DaemonSet', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_namespaced_deployment(self, name, namespace, body, **kwargs): # noqa: E501 """patch_namespaced_deployment # noqa: E501 @@ -4675,28 +5971,40 @@ def patch_namespaced_deployment(self, name, namespace, body, **kwargs): # noqa: partially update the specified Deployment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_deployment(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Deployment (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the Deployment (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Deployment + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Deployment """ kwargs['_return_http_data_only'] = True return self.patch_namespaced_deployment_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -4707,30 +6015,48 @@ def patch_namespaced_deployment_with_http_info(self, name, namespace, body, **kw partially update the specified Deployment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_deployment_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Deployment (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the Deployment (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Deployment, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Deployment, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -4750,7 +6076,10 @@ def patch_namespaced_deployment_with_http_info(self, name, namespace, body, **kw 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -4763,16 +6092,13 @@ def patch_namespaced_deployment_with_http_info(self, name, namespace, body, **kw local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_deployment`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_deployment`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_deployment`") # noqa: E501 collection_formats = {} @@ -4784,18 +6110,18 @@ def patch_namespaced_deployment_with_http_info(self, name, namespace, body, **kw path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -4805,15 +6131,25 @@ def patch_namespaced_deployment_with_http_info(self, name, namespace, body, **kw body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Deployment", + 201: "V1Deployment", + 401: None, + } + return self.api_client.call_api( '/apis/apps/v1/namespaces/{namespace}/deployments/{name}', 'PATCH', path_params, @@ -4822,13 +6158,14 @@ def patch_namespaced_deployment_with_http_info(self, name, namespace, body, **kw body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Deployment', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_namespaced_deployment_scale(self, name, namespace, body, **kwargs): # noqa: E501 """patch_namespaced_deployment_scale # noqa: E501 @@ -4836,28 +6173,40 @@ def patch_namespaced_deployment_scale(self, name, namespace, body, **kwargs): # partially update scale of the specified Deployment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_deployment_scale(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Scale (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the Scale (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Scale + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Scale """ kwargs['_return_http_data_only'] = True return self.patch_namespaced_deployment_scale_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -4868,30 +6217,48 @@ def patch_namespaced_deployment_scale_with_http_info(self, name, namespace, body partially update scale of the specified Deployment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_deployment_scale_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Scale (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the Scale (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Scale, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Scale, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -4911,7 +6278,10 @@ def patch_namespaced_deployment_scale_with_http_info(self, name, namespace, body 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -4924,16 +6294,13 @@ def patch_namespaced_deployment_scale_with_http_info(self, name, namespace, body local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_deployment_scale`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_deployment_scale`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_deployment_scale`") # noqa: E501 collection_formats = {} @@ -4945,18 +6312,18 @@ def patch_namespaced_deployment_scale_with_http_info(self, name, namespace, body path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -4966,15 +6333,25 @@ def patch_namespaced_deployment_scale_with_http_info(self, name, namespace, body body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Scale", + 201: "V1Scale", + 401: None, + } + return self.api_client.call_api( '/apis/apps/v1/namespaces/{namespace}/deployments/{name}/scale', 'PATCH', path_params, @@ -4983,13 +6360,14 @@ def patch_namespaced_deployment_scale_with_http_info(self, name, namespace, body body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Scale', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_namespaced_deployment_status(self, name, namespace, body, **kwargs): # noqa: E501 """patch_namespaced_deployment_status # noqa: E501 @@ -4997,28 +6375,40 @@ def patch_namespaced_deployment_status(self, name, namespace, body, **kwargs): partially update status of the specified Deployment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_deployment_status(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Deployment (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the Deployment (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Deployment + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Deployment """ kwargs['_return_http_data_only'] = True return self.patch_namespaced_deployment_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -5029,30 +6419,48 @@ def patch_namespaced_deployment_status_with_http_info(self, name, namespace, bod partially update status of the specified Deployment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_deployment_status_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Deployment (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the Deployment (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Deployment, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Deployment, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -5072,7 +6480,10 @@ def patch_namespaced_deployment_status_with_http_info(self, name, namespace, bod 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -5085,16 +6496,13 @@ def patch_namespaced_deployment_status_with_http_info(self, name, namespace, bod local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_deployment_status`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_deployment_status`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_deployment_status`") # noqa: E501 collection_formats = {} @@ -5106,18 +6514,18 @@ def patch_namespaced_deployment_status_with_http_info(self, name, namespace, bod path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -5127,15 +6535,25 @@ def patch_namespaced_deployment_status_with_http_info(self, name, namespace, bod body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Deployment", + 201: "V1Deployment", + 401: None, + } + return self.api_client.call_api( '/apis/apps/v1/namespaces/{namespace}/deployments/{name}/status', 'PATCH', path_params, @@ -5144,13 +6562,14 @@ def patch_namespaced_deployment_status_with_http_info(self, name, namespace, bod body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Deployment', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_namespaced_replica_set(self, name, namespace, body, **kwargs): # noqa: E501 """patch_namespaced_replica_set # noqa: E501 @@ -5158,28 +6577,40 @@ def patch_namespaced_replica_set(self, name, namespace, body, **kwargs): # noqa partially update the specified ReplicaSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_replica_set(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ReplicaSet (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the ReplicaSet (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ReplicaSet + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ReplicaSet """ kwargs['_return_http_data_only'] = True return self.patch_namespaced_replica_set_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -5190,30 +6621,48 @@ def patch_namespaced_replica_set_with_http_info(self, name, namespace, body, **k partially update the specified ReplicaSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_replica_set_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ReplicaSet (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the ReplicaSet (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ReplicaSet, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ReplicaSet, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -5233,7 +6682,10 @@ def patch_namespaced_replica_set_with_http_info(self, name, namespace, body, **k 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -5246,16 +6698,13 @@ def patch_namespaced_replica_set_with_http_info(self, name, namespace, body, **k local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_replica_set`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_replica_set`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_replica_set`") # noqa: E501 collection_formats = {} @@ -5267,18 +6716,18 @@ def patch_namespaced_replica_set_with_http_info(self, name, namespace, body, **k path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -5288,15 +6737,25 @@ def patch_namespaced_replica_set_with_http_info(self, name, namespace, body, **k body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ReplicaSet", + 201: "V1ReplicaSet", + 401: None, + } + return self.api_client.call_api( '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}', 'PATCH', path_params, @@ -5305,13 +6764,14 @@ def patch_namespaced_replica_set_with_http_info(self, name, namespace, body, **k body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ReplicaSet', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_namespaced_replica_set_scale(self, name, namespace, body, **kwargs): # noqa: E501 """patch_namespaced_replica_set_scale # noqa: E501 @@ -5319,28 +6779,40 @@ def patch_namespaced_replica_set_scale(self, name, namespace, body, **kwargs): partially update scale of the specified ReplicaSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_replica_set_scale(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Scale (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the Scale (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Scale + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Scale """ kwargs['_return_http_data_only'] = True return self.patch_namespaced_replica_set_scale_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -5351,30 +6823,48 @@ def patch_namespaced_replica_set_scale_with_http_info(self, name, namespace, bod partially update scale of the specified ReplicaSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_replica_set_scale_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Scale (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the Scale (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Scale, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Scale, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -5394,7 +6884,10 @@ def patch_namespaced_replica_set_scale_with_http_info(self, name, namespace, bod 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -5407,16 +6900,13 @@ def patch_namespaced_replica_set_scale_with_http_info(self, name, namespace, bod local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_replica_set_scale`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_replica_set_scale`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_replica_set_scale`") # noqa: E501 collection_formats = {} @@ -5428,18 +6918,18 @@ def patch_namespaced_replica_set_scale_with_http_info(self, name, namespace, bod path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -5449,15 +6939,25 @@ def patch_namespaced_replica_set_scale_with_http_info(self, name, namespace, bod body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Scale", + 201: "V1Scale", + 401: None, + } + return self.api_client.call_api( '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/scale', 'PATCH', path_params, @@ -5466,13 +6966,14 @@ def patch_namespaced_replica_set_scale_with_http_info(self, name, namespace, bod body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Scale', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_namespaced_replica_set_status(self, name, namespace, body, **kwargs): # noqa: E501 """patch_namespaced_replica_set_status # noqa: E501 @@ -5480,28 +6981,40 @@ def patch_namespaced_replica_set_status(self, name, namespace, body, **kwargs): partially update status of the specified ReplicaSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_replica_set_status(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ReplicaSet (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the ReplicaSet (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ReplicaSet + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ReplicaSet """ kwargs['_return_http_data_only'] = True return self.patch_namespaced_replica_set_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -5512,30 +7025,48 @@ def patch_namespaced_replica_set_status_with_http_info(self, name, namespace, bo partially update status of the specified ReplicaSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_replica_set_status_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ReplicaSet (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the ReplicaSet (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ReplicaSet, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ReplicaSet, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -5555,7 +7086,10 @@ def patch_namespaced_replica_set_status_with_http_info(self, name, namespace, bo 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -5568,16 +7102,13 @@ def patch_namespaced_replica_set_status_with_http_info(self, name, namespace, bo local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_replica_set_status`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_replica_set_status`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_replica_set_status`") # noqa: E501 collection_formats = {} @@ -5589,18 +7120,18 @@ def patch_namespaced_replica_set_status_with_http_info(self, name, namespace, bo path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -5610,15 +7141,25 @@ def patch_namespaced_replica_set_status_with_http_info(self, name, namespace, bo body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ReplicaSet", + 201: "V1ReplicaSet", + 401: None, + } + return self.api_client.call_api( '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/status', 'PATCH', path_params, @@ -5627,13 +7168,14 @@ def patch_namespaced_replica_set_status_with_http_info(self, name, namespace, bo body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ReplicaSet', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_namespaced_stateful_set(self, name, namespace, body, **kwargs): # noqa: E501 """patch_namespaced_stateful_set # noqa: E501 @@ -5641,28 +7183,40 @@ def patch_namespaced_stateful_set(self, name, namespace, body, **kwargs): # noq partially update the specified StatefulSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_stateful_set(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the StatefulSet (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the StatefulSet (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1StatefulSet + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1StatefulSet """ kwargs['_return_http_data_only'] = True return self.patch_namespaced_stateful_set_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -5673,30 +7227,48 @@ def patch_namespaced_stateful_set_with_http_info(self, name, namespace, body, ** partially update the specified StatefulSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_stateful_set_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the StatefulSet (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the StatefulSet (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1StatefulSet, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1StatefulSet, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -5716,7 +7288,10 @@ def patch_namespaced_stateful_set_with_http_info(self, name, namespace, body, ** 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -5729,16 +7304,13 @@ def patch_namespaced_stateful_set_with_http_info(self, name, namespace, body, ** local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_stateful_set`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_stateful_set`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_stateful_set`") # noqa: E501 collection_formats = {} @@ -5750,18 +7322,18 @@ def patch_namespaced_stateful_set_with_http_info(self, name, namespace, body, ** path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -5771,15 +7343,25 @@ def patch_namespaced_stateful_set_with_http_info(self, name, namespace, body, ** body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1StatefulSet", + 201: "V1StatefulSet", + 401: None, + } + return self.api_client.call_api( '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}', 'PATCH', path_params, @@ -5788,13 +7370,14 @@ def patch_namespaced_stateful_set_with_http_info(self, name, namespace, body, ** body=body_params, post_params=form_params, files=local_var_files, - response_type='V1StatefulSet', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_namespaced_stateful_set_scale(self, name, namespace, body, **kwargs): # noqa: E501 """patch_namespaced_stateful_set_scale # noqa: E501 @@ -5802,28 +7385,40 @@ def patch_namespaced_stateful_set_scale(self, name, namespace, body, **kwargs): partially update scale of the specified StatefulSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_stateful_set_scale(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Scale (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the Scale (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Scale + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Scale """ kwargs['_return_http_data_only'] = True return self.patch_namespaced_stateful_set_scale_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -5834,30 +7429,48 @@ def patch_namespaced_stateful_set_scale_with_http_info(self, name, namespace, bo partially update scale of the specified StatefulSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_stateful_set_scale_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Scale (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the Scale (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Scale, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Scale, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -5877,7 +7490,10 @@ def patch_namespaced_stateful_set_scale_with_http_info(self, name, namespace, bo 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -5890,16 +7506,13 @@ def patch_namespaced_stateful_set_scale_with_http_info(self, name, namespace, bo local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_stateful_set_scale`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_stateful_set_scale`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_stateful_set_scale`") # noqa: E501 collection_formats = {} @@ -5911,18 +7524,18 @@ def patch_namespaced_stateful_set_scale_with_http_info(self, name, namespace, bo path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -5932,15 +7545,25 @@ def patch_namespaced_stateful_set_scale_with_http_info(self, name, namespace, bo body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Scale", + 201: "V1Scale", + 401: None, + } + return self.api_client.call_api( '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/scale', 'PATCH', path_params, @@ -5949,13 +7572,14 @@ def patch_namespaced_stateful_set_scale_with_http_info(self, name, namespace, bo body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Scale', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_namespaced_stateful_set_status(self, name, namespace, body, **kwargs): # noqa: E501 """patch_namespaced_stateful_set_status # noqa: E501 @@ -5963,28 +7587,40 @@ def patch_namespaced_stateful_set_status(self, name, namespace, body, **kwargs): partially update status of the specified StatefulSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_stateful_set_status(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the StatefulSet (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the StatefulSet (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1StatefulSet + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1StatefulSet """ kwargs['_return_http_data_only'] = True return self.patch_namespaced_stateful_set_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -5995,30 +7631,48 @@ def patch_namespaced_stateful_set_status_with_http_info(self, name, namespace, b partially update status of the specified StatefulSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_stateful_set_status_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the StatefulSet (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the StatefulSet (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1StatefulSet, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1StatefulSet, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -6038,7 +7692,10 @@ def patch_namespaced_stateful_set_status_with_http_info(self, name, namespace, b 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -6051,16 +7708,13 @@ def patch_namespaced_stateful_set_status_with_http_info(self, name, namespace, b local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_stateful_set_status`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_stateful_set_status`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_stateful_set_status`") # noqa: E501 collection_formats = {} @@ -6072,18 +7726,18 @@ def patch_namespaced_stateful_set_status_with_http_info(self, name, namespace, b path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -6093,15 +7747,25 @@ def patch_namespaced_stateful_set_status_with_http_info(self, name, namespace, b body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1StatefulSet", + 201: "V1StatefulSet", + 401: None, + } + return self.api_client.call_api( '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/status', 'PATCH', path_params, @@ -6110,13 +7774,14 @@ def patch_namespaced_stateful_set_status_with_http_info(self, name, namespace, b body=body_params, post_params=form_params, files=local_var_files, - response_type='V1StatefulSet', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_namespaced_controller_revision(self, name, namespace, **kwargs): # noqa: E501 """read_namespaced_controller_revision # noqa: E501 @@ -6124,23 +7789,30 @@ def read_namespaced_controller_revision(self, name, namespace, **kwargs): # noq read the specified ControllerRevision # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_controller_revision(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ControllerRevision (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the ControllerRevision (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ControllerRevision + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ControllerRevision """ kwargs['_return_http_data_only'] = True return self.read_namespaced_controller_revision_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -6151,25 +7823,38 @@ def read_namespaced_controller_revision_with_http_info(self, name, namespace, ** read the specified ControllerRevision # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_controller_revision_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ControllerRevision (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the ControllerRevision (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ControllerRevision, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ControllerRevision, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -6184,7 +7869,10 @@ def read_namespaced_controller_revision_with_http_info(self, name, namespace, ** 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -6197,12 +7885,10 @@ def read_namespaced_controller_revision_with_http_info(self, name, namespace, ** local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_controller_revision`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_controller_revision`") # noqa: E501 collection_formats = {} @@ -6214,10 +7900,10 @@ def read_namespaced_controller_revision_with_http_info(self, name, namespace, ** path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -6225,11 +7911,16 @@ def read_namespaced_controller_revision_with_http_info(self, name, namespace, ** body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ControllerRevision", + 401: None, + } + return self.api_client.call_api( '/apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}', 'GET', path_params, @@ -6238,13 +7929,14 @@ def read_namespaced_controller_revision_with_http_info(self, name, namespace, ** body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ControllerRevision', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_namespaced_daemon_set(self, name, namespace, **kwargs): # noqa: E501 """read_namespaced_daemon_set # noqa: E501 @@ -6252,23 +7944,30 @@ def read_namespaced_daemon_set(self, name, namespace, **kwargs): # noqa: E501 read the specified DaemonSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_daemon_set(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the DaemonSet (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the DaemonSet (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1DaemonSet + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1DaemonSet """ kwargs['_return_http_data_only'] = True return self.read_namespaced_daemon_set_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -6279,25 +7978,38 @@ def read_namespaced_daemon_set_with_http_info(self, name, namespace, **kwargs): read the specified DaemonSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_daemon_set_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the DaemonSet (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the DaemonSet (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1DaemonSet, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1DaemonSet, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -6312,7 +8024,10 @@ def read_namespaced_daemon_set_with_http_info(self, name, namespace, **kwargs): 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -6325,12 +8040,10 @@ def read_namespaced_daemon_set_with_http_info(self, name, namespace, **kwargs): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_daemon_set`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_daemon_set`") # noqa: E501 collection_formats = {} @@ -6342,10 +8055,10 @@ def read_namespaced_daemon_set_with_http_info(self, name, namespace, **kwargs): path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -6353,11 +8066,16 @@ def read_namespaced_daemon_set_with_http_info(self, name, namespace, **kwargs): body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1DaemonSet", + 401: None, + } + return self.api_client.call_api( '/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}', 'GET', path_params, @@ -6366,13 +8084,14 @@ def read_namespaced_daemon_set_with_http_info(self, name, namespace, **kwargs): body=body_params, post_params=form_params, files=local_var_files, - response_type='V1DaemonSet', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_namespaced_daemon_set_status(self, name, namespace, **kwargs): # noqa: E501 """read_namespaced_daemon_set_status # noqa: E501 @@ -6380,23 +8099,30 @@ def read_namespaced_daemon_set_status(self, name, namespace, **kwargs): # noqa: read status of the specified DaemonSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_daemon_set_status(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the DaemonSet (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the DaemonSet (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1DaemonSet + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1DaemonSet """ kwargs['_return_http_data_only'] = True return self.read_namespaced_daemon_set_status_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -6407,25 +8133,38 @@ def read_namespaced_daemon_set_status_with_http_info(self, name, namespace, **kw read status of the specified DaemonSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_daemon_set_status_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the DaemonSet (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the DaemonSet (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1DaemonSet, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1DaemonSet, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -6440,7 +8179,10 @@ def read_namespaced_daemon_set_status_with_http_info(self, name, namespace, **kw 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -6453,12 +8195,10 @@ def read_namespaced_daemon_set_status_with_http_info(self, name, namespace, **kw local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_daemon_set_status`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_daemon_set_status`") # noqa: E501 collection_formats = {} @@ -6470,10 +8210,10 @@ def read_namespaced_daemon_set_status_with_http_info(self, name, namespace, **kw path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -6481,11 +8221,16 @@ def read_namespaced_daemon_set_status_with_http_info(self, name, namespace, **kw body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1DaemonSet", + 401: None, + } + return self.api_client.call_api( '/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}/status', 'GET', path_params, @@ -6494,13 +8239,14 @@ def read_namespaced_daemon_set_status_with_http_info(self, name, namespace, **kw body=body_params, post_params=form_params, files=local_var_files, - response_type='V1DaemonSet', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_namespaced_deployment(self, name, namespace, **kwargs): # noqa: E501 """read_namespaced_deployment # noqa: E501 @@ -6508,23 +8254,30 @@ def read_namespaced_deployment(self, name, namespace, **kwargs): # noqa: E501 read the specified Deployment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_deployment(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Deployment (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the Deployment (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Deployment + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Deployment """ kwargs['_return_http_data_only'] = True return self.read_namespaced_deployment_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -6535,25 +8288,38 @@ def read_namespaced_deployment_with_http_info(self, name, namespace, **kwargs): read the specified Deployment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_deployment_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Deployment (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the Deployment (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Deployment, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Deployment, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -6568,7 +8334,10 @@ def read_namespaced_deployment_with_http_info(self, name, namespace, **kwargs): 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -6581,12 +8350,10 @@ def read_namespaced_deployment_with_http_info(self, name, namespace, **kwargs): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_deployment`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_deployment`") # noqa: E501 collection_formats = {} @@ -6598,10 +8365,10 @@ def read_namespaced_deployment_with_http_info(self, name, namespace, **kwargs): path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -6609,11 +8376,16 @@ def read_namespaced_deployment_with_http_info(self, name, namespace, **kwargs): body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Deployment", + 401: None, + } + return self.api_client.call_api( '/apis/apps/v1/namespaces/{namespace}/deployments/{name}', 'GET', path_params, @@ -6622,13 +8394,14 @@ def read_namespaced_deployment_with_http_info(self, name, namespace, **kwargs): body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Deployment', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_namespaced_deployment_scale(self, name, namespace, **kwargs): # noqa: E501 """read_namespaced_deployment_scale # noqa: E501 @@ -6636,23 +8409,30 @@ def read_namespaced_deployment_scale(self, name, namespace, **kwargs): # noqa: read scale of the specified Deployment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_deployment_scale(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Scale (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the Scale (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Scale + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Scale """ kwargs['_return_http_data_only'] = True return self.read_namespaced_deployment_scale_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -6663,25 +8443,38 @@ def read_namespaced_deployment_scale_with_http_info(self, name, namespace, **kwa read scale of the specified Deployment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_deployment_scale_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Scale (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the Scale (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Scale, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Scale, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -6696,7 +8489,10 @@ def read_namespaced_deployment_scale_with_http_info(self, name, namespace, **kwa 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -6709,12 +8505,10 @@ def read_namespaced_deployment_scale_with_http_info(self, name, namespace, **kwa local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_deployment_scale`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_deployment_scale`") # noqa: E501 collection_formats = {} @@ -6726,10 +8520,10 @@ def read_namespaced_deployment_scale_with_http_info(self, name, namespace, **kwa path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -6737,11 +8531,16 @@ def read_namespaced_deployment_scale_with_http_info(self, name, namespace, **kwa body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Scale", + 401: None, + } + return self.api_client.call_api( '/apis/apps/v1/namespaces/{namespace}/deployments/{name}/scale', 'GET', path_params, @@ -6750,13 +8549,14 @@ def read_namespaced_deployment_scale_with_http_info(self, name, namespace, **kwa body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Scale', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_namespaced_deployment_status(self, name, namespace, **kwargs): # noqa: E501 """read_namespaced_deployment_status # noqa: E501 @@ -6764,23 +8564,30 @@ def read_namespaced_deployment_status(self, name, namespace, **kwargs): # noqa: read status of the specified Deployment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_deployment_status(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Deployment (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the Deployment (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Deployment + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Deployment """ kwargs['_return_http_data_only'] = True return self.read_namespaced_deployment_status_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -6791,25 +8598,38 @@ def read_namespaced_deployment_status_with_http_info(self, name, namespace, **kw read status of the specified Deployment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_deployment_status_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Deployment (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the Deployment (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Deployment, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Deployment, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -6824,7 +8644,10 @@ def read_namespaced_deployment_status_with_http_info(self, name, namespace, **kw 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -6837,12 +8660,10 @@ def read_namespaced_deployment_status_with_http_info(self, name, namespace, **kw local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_deployment_status`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_deployment_status`") # noqa: E501 collection_formats = {} @@ -6854,10 +8675,10 @@ def read_namespaced_deployment_status_with_http_info(self, name, namespace, **kw path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -6865,11 +8686,16 @@ def read_namespaced_deployment_status_with_http_info(self, name, namespace, **kw body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Deployment", + 401: None, + } + return self.api_client.call_api( '/apis/apps/v1/namespaces/{namespace}/deployments/{name}/status', 'GET', path_params, @@ -6878,13 +8704,14 @@ def read_namespaced_deployment_status_with_http_info(self, name, namespace, **kw body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Deployment', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_namespaced_replica_set(self, name, namespace, **kwargs): # noqa: E501 """read_namespaced_replica_set # noqa: E501 @@ -6892,23 +8719,30 @@ def read_namespaced_replica_set(self, name, namespace, **kwargs): # noqa: E501 read the specified ReplicaSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_replica_set(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ReplicaSet (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the ReplicaSet (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ReplicaSet + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ReplicaSet """ kwargs['_return_http_data_only'] = True return self.read_namespaced_replica_set_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -6919,25 +8753,38 @@ def read_namespaced_replica_set_with_http_info(self, name, namespace, **kwargs): read the specified ReplicaSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_replica_set_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ReplicaSet (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the ReplicaSet (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ReplicaSet, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ReplicaSet, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -6952,7 +8799,10 @@ def read_namespaced_replica_set_with_http_info(self, name, namespace, **kwargs): 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -6965,12 +8815,10 @@ def read_namespaced_replica_set_with_http_info(self, name, namespace, **kwargs): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_replica_set`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_replica_set`") # noqa: E501 collection_formats = {} @@ -6982,10 +8830,10 @@ def read_namespaced_replica_set_with_http_info(self, name, namespace, **kwargs): path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -6993,11 +8841,16 @@ def read_namespaced_replica_set_with_http_info(self, name, namespace, **kwargs): body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ReplicaSet", + 401: None, + } + return self.api_client.call_api( '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}', 'GET', path_params, @@ -7006,13 +8859,14 @@ def read_namespaced_replica_set_with_http_info(self, name, namespace, **kwargs): body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ReplicaSet', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_namespaced_replica_set_scale(self, name, namespace, **kwargs): # noqa: E501 """read_namespaced_replica_set_scale # noqa: E501 @@ -7020,23 +8874,30 @@ def read_namespaced_replica_set_scale(self, name, namespace, **kwargs): # noqa: read scale of the specified ReplicaSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_replica_set_scale(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Scale (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the Scale (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Scale + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Scale """ kwargs['_return_http_data_only'] = True return self.read_namespaced_replica_set_scale_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -7047,25 +8908,38 @@ def read_namespaced_replica_set_scale_with_http_info(self, name, namespace, **kw read scale of the specified ReplicaSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_replica_set_scale_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Scale (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the Scale (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Scale, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Scale, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -7080,7 +8954,10 @@ def read_namespaced_replica_set_scale_with_http_info(self, name, namespace, **kw 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -7093,12 +8970,10 @@ def read_namespaced_replica_set_scale_with_http_info(self, name, namespace, **kw local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_replica_set_scale`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_replica_set_scale`") # noqa: E501 collection_formats = {} @@ -7110,10 +8985,10 @@ def read_namespaced_replica_set_scale_with_http_info(self, name, namespace, **kw path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -7121,11 +8996,16 @@ def read_namespaced_replica_set_scale_with_http_info(self, name, namespace, **kw body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Scale", + 401: None, + } + return self.api_client.call_api( '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/scale', 'GET', path_params, @@ -7134,13 +9014,14 @@ def read_namespaced_replica_set_scale_with_http_info(self, name, namespace, **kw body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Scale', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_namespaced_replica_set_status(self, name, namespace, **kwargs): # noqa: E501 """read_namespaced_replica_set_status # noqa: E501 @@ -7148,23 +9029,30 @@ def read_namespaced_replica_set_status(self, name, namespace, **kwargs): # noqa read status of the specified ReplicaSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_replica_set_status(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ReplicaSet (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the ReplicaSet (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ReplicaSet + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ReplicaSet """ kwargs['_return_http_data_only'] = True return self.read_namespaced_replica_set_status_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -7175,25 +9063,38 @@ def read_namespaced_replica_set_status_with_http_info(self, name, namespace, **k read status of the specified ReplicaSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_replica_set_status_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ReplicaSet (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the ReplicaSet (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ReplicaSet, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ReplicaSet, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -7208,7 +9109,10 @@ def read_namespaced_replica_set_status_with_http_info(self, name, namespace, **k 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -7221,12 +9125,10 @@ def read_namespaced_replica_set_status_with_http_info(self, name, namespace, **k local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_replica_set_status`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_replica_set_status`") # noqa: E501 collection_formats = {} @@ -7238,10 +9140,10 @@ def read_namespaced_replica_set_status_with_http_info(self, name, namespace, **k path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -7249,11 +9151,16 @@ def read_namespaced_replica_set_status_with_http_info(self, name, namespace, **k body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ReplicaSet", + 401: None, + } + return self.api_client.call_api( '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/status', 'GET', path_params, @@ -7262,13 +9169,14 @@ def read_namespaced_replica_set_status_with_http_info(self, name, namespace, **k body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ReplicaSet', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_namespaced_stateful_set(self, name, namespace, **kwargs): # noqa: E501 """read_namespaced_stateful_set # noqa: E501 @@ -7276,23 +9184,30 @@ def read_namespaced_stateful_set(self, name, namespace, **kwargs): # noqa: E501 read the specified StatefulSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_stateful_set(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the StatefulSet (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the StatefulSet (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1StatefulSet + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1StatefulSet """ kwargs['_return_http_data_only'] = True return self.read_namespaced_stateful_set_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -7303,25 +9218,38 @@ def read_namespaced_stateful_set_with_http_info(self, name, namespace, **kwargs) read the specified StatefulSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_stateful_set_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the StatefulSet (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the StatefulSet (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1StatefulSet, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1StatefulSet, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -7336,7 +9264,10 @@ def read_namespaced_stateful_set_with_http_info(self, name, namespace, **kwargs) 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -7349,12 +9280,10 @@ def read_namespaced_stateful_set_with_http_info(self, name, namespace, **kwargs) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_stateful_set`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_stateful_set`") # noqa: E501 collection_formats = {} @@ -7366,10 +9295,10 @@ def read_namespaced_stateful_set_with_http_info(self, name, namespace, **kwargs) path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -7377,11 +9306,16 @@ def read_namespaced_stateful_set_with_http_info(self, name, namespace, **kwargs) body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1StatefulSet", + 401: None, + } + return self.api_client.call_api( '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}', 'GET', path_params, @@ -7390,13 +9324,14 @@ def read_namespaced_stateful_set_with_http_info(self, name, namespace, **kwargs) body=body_params, post_params=form_params, files=local_var_files, - response_type='V1StatefulSet', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_namespaced_stateful_set_scale(self, name, namespace, **kwargs): # noqa: E501 """read_namespaced_stateful_set_scale # noqa: E501 @@ -7404,23 +9339,30 @@ def read_namespaced_stateful_set_scale(self, name, namespace, **kwargs): # noqa read scale of the specified StatefulSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_stateful_set_scale(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Scale (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the Scale (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Scale + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Scale """ kwargs['_return_http_data_only'] = True return self.read_namespaced_stateful_set_scale_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -7431,25 +9373,38 @@ def read_namespaced_stateful_set_scale_with_http_info(self, name, namespace, **k read scale of the specified StatefulSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_stateful_set_scale_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Scale (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the Scale (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Scale, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Scale, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -7464,7 +9419,10 @@ def read_namespaced_stateful_set_scale_with_http_info(self, name, namespace, **k 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -7477,12 +9435,10 @@ def read_namespaced_stateful_set_scale_with_http_info(self, name, namespace, **k local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_stateful_set_scale`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_stateful_set_scale`") # noqa: E501 collection_formats = {} @@ -7494,10 +9450,10 @@ def read_namespaced_stateful_set_scale_with_http_info(self, name, namespace, **k path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -7505,11 +9461,16 @@ def read_namespaced_stateful_set_scale_with_http_info(self, name, namespace, **k body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Scale", + 401: None, + } + return self.api_client.call_api( '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/scale', 'GET', path_params, @@ -7518,13 +9479,14 @@ def read_namespaced_stateful_set_scale_with_http_info(self, name, namespace, **k body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Scale', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_namespaced_stateful_set_status(self, name, namespace, **kwargs): # noqa: E501 """read_namespaced_stateful_set_status # noqa: E501 @@ -7532,23 +9494,30 @@ def read_namespaced_stateful_set_status(self, name, namespace, **kwargs): # noq read status of the specified StatefulSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_stateful_set_status(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the StatefulSet (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the StatefulSet (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1StatefulSet + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1StatefulSet """ kwargs['_return_http_data_only'] = True return self.read_namespaced_stateful_set_status_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -7559,25 +9528,38 @@ def read_namespaced_stateful_set_status_with_http_info(self, name, namespace, ** read status of the specified StatefulSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_stateful_set_status_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the StatefulSet (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the StatefulSet (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1StatefulSet, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1StatefulSet, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -7592,7 +9574,10 @@ def read_namespaced_stateful_set_status_with_http_info(self, name, namespace, ** 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -7605,12 +9590,10 @@ def read_namespaced_stateful_set_status_with_http_info(self, name, namespace, ** local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_stateful_set_status`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_stateful_set_status`") # noqa: E501 collection_formats = {} @@ -7622,10 +9605,10 @@ def read_namespaced_stateful_set_status_with_http_info(self, name, namespace, ** path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -7633,11 +9616,16 @@ def read_namespaced_stateful_set_status_with_http_info(self, name, namespace, ** body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1StatefulSet", + 401: None, + } + return self.api_client.call_api( '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/status', 'GET', path_params, @@ -7646,13 +9634,14 @@ def read_namespaced_stateful_set_status_with_http_info(self, name, namespace, ** body=body_params, post_params=form_params, files=local_var_files, - response_type='V1StatefulSet', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_namespaced_controller_revision(self, name, namespace, body, **kwargs): # noqa: E501 """replace_namespaced_controller_revision # noqa: E501 @@ -7660,27 +9649,38 @@ def replace_namespaced_controller_revision(self, name, namespace, body, **kwargs replace the specified ControllerRevision # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_controller_revision(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ControllerRevision (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1ControllerRevision body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the ControllerRevision (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1ControllerRevision + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ControllerRevision + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ControllerRevision """ kwargs['_return_http_data_only'] = True return self.replace_namespaced_controller_revision_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -7691,29 +9691,46 @@ def replace_namespaced_controller_revision_with_http_info(self, name, namespace, replace the specified ControllerRevision # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_controller_revision_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ControllerRevision (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1ControllerRevision body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the ControllerRevision (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1ControllerRevision + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ControllerRevision, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ControllerRevision, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -7732,7 +9749,10 @@ def replace_namespaced_controller_revision_with_http_info(self, name, namespace, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -7745,16 +9765,13 @@ def replace_namespaced_controller_revision_with_http_info(self, name, namespace, local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_controller_revision`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_controller_revision`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_controller_revision`") # noqa: E501 collection_formats = {} @@ -7766,16 +9783,16 @@ def replace_namespaced_controller_revision_with_http_info(self, name, namespace, path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -7785,11 +9802,17 @@ def replace_namespaced_controller_revision_with_http_info(self, name, namespace, body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ControllerRevision", + 201: "V1ControllerRevision", + 401: None, + } + return self.api_client.call_api( '/apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}', 'PUT', path_params, @@ -7798,13 +9821,14 @@ def replace_namespaced_controller_revision_with_http_info(self, name, namespace, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ControllerRevision', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_namespaced_daemon_set(self, name, namespace, body, **kwargs): # noqa: E501 """replace_namespaced_daemon_set # noqa: E501 @@ -7812,27 +9836,38 @@ def replace_namespaced_daemon_set(self, name, namespace, body, **kwargs): # noq replace the specified DaemonSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_daemon_set(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the DaemonSet (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1DaemonSet body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the DaemonSet (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1DaemonSet + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1DaemonSet + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1DaemonSet """ kwargs['_return_http_data_only'] = True return self.replace_namespaced_daemon_set_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -7843,29 +9878,46 @@ def replace_namespaced_daemon_set_with_http_info(self, name, namespace, body, ** replace the specified DaemonSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_daemon_set_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the DaemonSet (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1DaemonSet body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the DaemonSet (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1DaemonSet + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1DaemonSet, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1DaemonSet, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -7884,7 +9936,10 @@ def replace_namespaced_daemon_set_with_http_info(self, name, namespace, body, ** 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -7897,16 +9952,13 @@ def replace_namespaced_daemon_set_with_http_info(self, name, namespace, body, ** local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_daemon_set`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_daemon_set`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_daemon_set`") # noqa: E501 collection_formats = {} @@ -7918,16 +9970,16 @@ def replace_namespaced_daemon_set_with_http_info(self, name, namespace, body, ** path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -7937,11 +9989,17 @@ def replace_namespaced_daemon_set_with_http_info(self, name, namespace, body, ** body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1DaemonSet", + 201: "V1DaemonSet", + 401: None, + } + return self.api_client.call_api( '/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}', 'PUT', path_params, @@ -7950,13 +10008,14 @@ def replace_namespaced_daemon_set_with_http_info(self, name, namespace, body, ** body=body_params, post_params=form_params, files=local_var_files, - response_type='V1DaemonSet', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_namespaced_daemon_set_status(self, name, namespace, body, **kwargs): # noqa: E501 """replace_namespaced_daemon_set_status # noqa: E501 @@ -7964,27 +10023,38 @@ def replace_namespaced_daemon_set_status(self, name, namespace, body, **kwargs): replace status of the specified DaemonSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_daemon_set_status(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the DaemonSet (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1DaemonSet body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the DaemonSet (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1DaemonSet + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1DaemonSet + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1DaemonSet """ kwargs['_return_http_data_only'] = True return self.replace_namespaced_daemon_set_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -7995,29 +10065,46 @@ def replace_namespaced_daemon_set_status_with_http_info(self, name, namespace, b replace status of the specified DaemonSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_daemon_set_status_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the DaemonSet (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1DaemonSet body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the DaemonSet (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1DaemonSet + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1DaemonSet, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1DaemonSet, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -8036,7 +10123,10 @@ def replace_namespaced_daemon_set_status_with_http_info(self, name, namespace, b 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -8049,16 +10139,13 @@ def replace_namespaced_daemon_set_status_with_http_info(self, name, namespace, b local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_daemon_set_status`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_daemon_set_status`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_daemon_set_status`") # noqa: E501 collection_formats = {} @@ -8070,16 +10157,16 @@ def replace_namespaced_daemon_set_status_with_http_info(self, name, namespace, b path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -8089,11 +10176,17 @@ def replace_namespaced_daemon_set_status_with_http_info(self, name, namespace, b body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1DaemonSet", + 201: "V1DaemonSet", + 401: None, + } + return self.api_client.call_api( '/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}/status', 'PUT', path_params, @@ -8102,13 +10195,14 @@ def replace_namespaced_daemon_set_status_with_http_info(self, name, namespace, b body=body_params, post_params=form_params, files=local_var_files, - response_type='V1DaemonSet', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_namespaced_deployment(self, name, namespace, body, **kwargs): # noqa: E501 """replace_namespaced_deployment # noqa: E501 @@ -8116,27 +10210,38 @@ def replace_namespaced_deployment(self, name, namespace, body, **kwargs): # noq replace the specified Deployment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_deployment(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Deployment (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1Deployment body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the Deployment (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1Deployment + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Deployment + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Deployment """ kwargs['_return_http_data_only'] = True return self.replace_namespaced_deployment_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -8147,29 +10252,46 @@ def replace_namespaced_deployment_with_http_info(self, name, namespace, body, ** replace the specified Deployment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_deployment_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Deployment (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1Deployment body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the Deployment (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1Deployment + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Deployment, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Deployment, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -8188,7 +10310,10 @@ def replace_namespaced_deployment_with_http_info(self, name, namespace, body, ** 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -8201,16 +10326,13 @@ def replace_namespaced_deployment_with_http_info(self, name, namespace, body, ** local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_deployment`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_deployment`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_deployment`") # noqa: E501 collection_formats = {} @@ -8222,16 +10344,16 @@ def replace_namespaced_deployment_with_http_info(self, name, namespace, body, ** path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -8241,11 +10363,17 @@ def replace_namespaced_deployment_with_http_info(self, name, namespace, body, ** body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Deployment", + 201: "V1Deployment", + 401: None, + } + return self.api_client.call_api( '/apis/apps/v1/namespaces/{namespace}/deployments/{name}', 'PUT', path_params, @@ -8254,13 +10382,14 @@ def replace_namespaced_deployment_with_http_info(self, name, namespace, body, ** body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Deployment', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_namespaced_deployment_scale(self, name, namespace, body, **kwargs): # noqa: E501 """replace_namespaced_deployment_scale # noqa: E501 @@ -8268,27 +10397,38 @@ def replace_namespaced_deployment_scale(self, name, namespace, body, **kwargs): replace scale of the specified Deployment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_deployment_scale(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Scale (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1Scale body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the Scale (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1Scale + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Scale + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Scale """ kwargs['_return_http_data_only'] = True return self.replace_namespaced_deployment_scale_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -8299,29 +10439,46 @@ def replace_namespaced_deployment_scale_with_http_info(self, name, namespace, bo replace scale of the specified Deployment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_deployment_scale_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Scale (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1Scale body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the Scale (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1Scale + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Scale, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Scale, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -8340,7 +10497,10 @@ def replace_namespaced_deployment_scale_with_http_info(self, name, namespace, bo 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -8353,16 +10513,13 @@ def replace_namespaced_deployment_scale_with_http_info(self, name, namespace, bo local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_deployment_scale`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_deployment_scale`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_deployment_scale`") # noqa: E501 collection_formats = {} @@ -8374,16 +10531,16 @@ def replace_namespaced_deployment_scale_with_http_info(self, name, namespace, bo path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -8393,11 +10550,17 @@ def replace_namespaced_deployment_scale_with_http_info(self, name, namespace, bo body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Scale", + 201: "V1Scale", + 401: None, + } + return self.api_client.call_api( '/apis/apps/v1/namespaces/{namespace}/deployments/{name}/scale', 'PUT', path_params, @@ -8406,13 +10569,14 @@ def replace_namespaced_deployment_scale_with_http_info(self, name, namespace, bo body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Scale', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_namespaced_deployment_status(self, name, namespace, body, **kwargs): # noqa: E501 """replace_namespaced_deployment_status # noqa: E501 @@ -8420,27 +10584,38 @@ def replace_namespaced_deployment_status(self, name, namespace, body, **kwargs): replace status of the specified Deployment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_deployment_status(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Deployment (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1Deployment body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the Deployment (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1Deployment + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Deployment + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Deployment """ kwargs['_return_http_data_only'] = True return self.replace_namespaced_deployment_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -8451,29 +10626,46 @@ def replace_namespaced_deployment_status_with_http_info(self, name, namespace, b replace status of the specified Deployment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_deployment_status_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Deployment (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1Deployment body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the Deployment (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1Deployment + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Deployment, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Deployment, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -8492,7 +10684,10 @@ def replace_namespaced_deployment_status_with_http_info(self, name, namespace, b 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -8505,16 +10700,13 @@ def replace_namespaced_deployment_status_with_http_info(self, name, namespace, b local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_deployment_status`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_deployment_status`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_deployment_status`") # noqa: E501 collection_formats = {} @@ -8526,16 +10718,16 @@ def replace_namespaced_deployment_status_with_http_info(self, name, namespace, b path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -8545,11 +10737,17 @@ def replace_namespaced_deployment_status_with_http_info(self, name, namespace, b body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Deployment", + 201: "V1Deployment", + 401: None, + } + return self.api_client.call_api( '/apis/apps/v1/namespaces/{namespace}/deployments/{name}/status', 'PUT', path_params, @@ -8558,13 +10756,14 @@ def replace_namespaced_deployment_status_with_http_info(self, name, namespace, b body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Deployment', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_namespaced_replica_set(self, name, namespace, body, **kwargs): # noqa: E501 """replace_namespaced_replica_set # noqa: E501 @@ -8572,27 +10771,38 @@ def replace_namespaced_replica_set(self, name, namespace, body, **kwargs): # no replace the specified ReplicaSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_replica_set(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ReplicaSet (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1ReplicaSet body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the ReplicaSet (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1ReplicaSet + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ReplicaSet + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ReplicaSet """ kwargs['_return_http_data_only'] = True return self.replace_namespaced_replica_set_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -8603,29 +10813,46 @@ def replace_namespaced_replica_set_with_http_info(self, name, namespace, body, * replace the specified ReplicaSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_replica_set_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ReplicaSet (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1ReplicaSet body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the ReplicaSet (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1ReplicaSet + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ReplicaSet, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ReplicaSet, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -8644,7 +10871,10 @@ def replace_namespaced_replica_set_with_http_info(self, name, namespace, body, * 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -8657,16 +10887,13 @@ def replace_namespaced_replica_set_with_http_info(self, name, namespace, body, * local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_replica_set`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_replica_set`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_replica_set`") # noqa: E501 collection_formats = {} @@ -8678,16 +10905,16 @@ def replace_namespaced_replica_set_with_http_info(self, name, namespace, body, * path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -8697,11 +10924,17 @@ def replace_namespaced_replica_set_with_http_info(self, name, namespace, body, * body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ReplicaSet", + 201: "V1ReplicaSet", + 401: None, + } + return self.api_client.call_api( '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}', 'PUT', path_params, @@ -8710,13 +10943,14 @@ def replace_namespaced_replica_set_with_http_info(self, name, namespace, body, * body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ReplicaSet', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_namespaced_replica_set_scale(self, name, namespace, body, **kwargs): # noqa: E501 """replace_namespaced_replica_set_scale # noqa: E501 @@ -8724,27 +10958,38 @@ def replace_namespaced_replica_set_scale(self, name, namespace, body, **kwargs): replace scale of the specified ReplicaSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_replica_set_scale(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Scale (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1Scale body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the Scale (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1Scale + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Scale + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Scale """ kwargs['_return_http_data_only'] = True return self.replace_namespaced_replica_set_scale_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -8755,29 +11000,46 @@ def replace_namespaced_replica_set_scale_with_http_info(self, name, namespace, b replace scale of the specified ReplicaSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_replica_set_scale_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Scale (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1Scale body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the Scale (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1Scale + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Scale, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Scale, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -8796,7 +11058,10 @@ def replace_namespaced_replica_set_scale_with_http_info(self, name, namespace, b 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -8809,16 +11074,13 @@ def replace_namespaced_replica_set_scale_with_http_info(self, name, namespace, b local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_replica_set_scale`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_replica_set_scale`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_replica_set_scale`") # noqa: E501 collection_formats = {} @@ -8830,16 +11092,16 @@ def replace_namespaced_replica_set_scale_with_http_info(self, name, namespace, b path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -8849,11 +11111,17 @@ def replace_namespaced_replica_set_scale_with_http_info(self, name, namespace, b body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Scale", + 201: "V1Scale", + 401: None, + } + return self.api_client.call_api( '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/scale', 'PUT', path_params, @@ -8862,13 +11130,14 @@ def replace_namespaced_replica_set_scale_with_http_info(self, name, namespace, b body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Scale', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_namespaced_replica_set_status(self, name, namespace, body, **kwargs): # noqa: E501 """replace_namespaced_replica_set_status # noqa: E501 @@ -8876,27 +11145,38 @@ def replace_namespaced_replica_set_status(self, name, namespace, body, **kwargs) replace status of the specified ReplicaSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_replica_set_status(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ReplicaSet (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1ReplicaSet body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the ReplicaSet (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1ReplicaSet + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ReplicaSet + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ReplicaSet """ kwargs['_return_http_data_only'] = True return self.replace_namespaced_replica_set_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -8907,29 +11187,46 @@ def replace_namespaced_replica_set_status_with_http_info(self, name, namespace, replace status of the specified ReplicaSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_replica_set_status_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ReplicaSet (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1ReplicaSet body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the ReplicaSet (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1ReplicaSet + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ReplicaSet, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ReplicaSet, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -8948,7 +11245,10 @@ def replace_namespaced_replica_set_status_with_http_info(self, name, namespace, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -8961,16 +11261,13 @@ def replace_namespaced_replica_set_status_with_http_info(self, name, namespace, local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_replica_set_status`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_replica_set_status`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_replica_set_status`") # noqa: E501 collection_formats = {} @@ -8982,16 +11279,16 @@ def replace_namespaced_replica_set_status_with_http_info(self, name, namespace, path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -9001,11 +11298,17 @@ def replace_namespaced_replica_set_status_with_http_info(self, name, namespace, body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ReplicaSet", + 201: "V1ReplicaSet", + 401: None, + } + return self.api_client.call_api( '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/status', 'PUT', path_params, @@ -9014,13 +11317,14 @@ def replace_namespaced_replica_set_status_with_http_info(self, name, namespace, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ReplicaSet', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_namespaced_stateful_set(self, name, namespace, body, **kwargs): # noqa: E501 """replace_namespaced_stateful_set # noqa: E501 @@ -9028,27 +11332,38 @@ def replace_namespaced_stateful_set(self, name, namespace, body, **kwargs): # n replace the specified StatefulSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_stateful_set(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the StatefulSet (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1StatefulSet body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the StatefulSet (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1StatefulSet + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1StatefulSet + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1StatefulSet """ kwargs['_return_http_data_only'] = True return self.replace_namespaced_stateful_set_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -9059,29 +11374,46 @@ def replace_namespaced_stateful_set_with_http_info(self, name, namespace, body, replace the specified StatefulSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_stateful_set_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the StatefulSet (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1StatefulSet body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the StatefulSet (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1StatefulSet + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1StatefulSet, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1StatefulSet, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -9100,7 +11432,10 @@ def replace_namespaced_stateful_set_with_http_info(self, name, namespace, body, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -9113,16 +11448,13 @@ def replace_namespaced_stateful_set_with_http_info(self, name, namespace, body, local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_stateful_set`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_stateful_set`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_stateful_set`") # noqa: E501 collection_formats = {} @@ -9134,16 +11466,16 @@ def replace_namespaced_stateful_set_with_http_info(self, name, namespace, body, path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -9153,11 +11485,17 @@ def replace_namespaced_stateful_set_with_http_info(self, name, namespace, body, body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1StatefulSet", + 201: "V1StatefulSet", + 401: None, + } + return self.api_client.call_api( '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}', 'PUT', path_params, @@ -9166,13 +11504,14 @@ def replace_namespaced_stateful_set_with_http_info(self, name, namespace, body, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1StatefulSet', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_namespaced_stateful_set_scale(self, name, namespace, body, **kwargs): # noqa: E501 """replace_namespaced_stateful_set_scale # noqa: E501 @@ -9180,27 +11519,38 @@ def replace_namespaced_stateful_set_scale(self, name, namespace, body, **kwargs) replace scale of the specified StatefulSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_stateful_set_scale(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Scale (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1Scale body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the Scale (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1Scale + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Scale + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Scale """ kwargs['_return_http_data_only'] = True return self.replace_namespaced_stateful_set_scale_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -9211,29 +11561,46 @@ def replace_namespaced_stateful_set_scale_with_http_info(self, name, namespace, replace scale of the specified StatefulSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_stateful_set_scale_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Scale (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1Scale body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the Scale (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1Scale + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Scale, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Scale, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -9252,7 +11619,10 @@ def replace_namespaced_stateful_set_scale_with_http_info(self, name, namespace, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -9265,16 +11635,13 @@ def replace_namespaced_stateful_set_scale_with_http_info(self, name, namespace, local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_stateful_set_scale`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_stateful_set_scale`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_stateful_set_scale`") # noqa: E501 collection_formats = {} @@ -9286,16 +11653,16 @@ def replace_namespaced_stateful_set_scale_with_http_info(self, name, namespace, path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -9305,11 +11672,17 @@ def replace_namespaced_stateful_set_scale_with_http_info(self, name, namespace, body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Scale", + 201: "V1Scale", + 401: None, + } + return self.api_client.call_api( '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/scale', 'PUT', path_params, @@ -9318,13 +11691,14 @@ def replace_namespaced_stateful_set_scale_with_http_info(self, name, namespace, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Scale', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_namespaced_stateful_set_status(self, name, namespace, body, **kwargs): # noqa: E501 """replace_namespaced_stateful_set_status # noqa: E501 @@ -9332,27 +11706,38 @@ def replace_namespaced_stateful_set_status(self, name, namespace, body, **kwargs replace status of the specified StatefulSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_stateful_set_status(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the StatefulSet (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1StatefulSet body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the StatefulSet (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1StatefulSet + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1StatefulSet + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1StatefulSet """ kwargs['_return_http_data_only'] = True return self.replace_namespaced_stateful_set_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -9363,29 +11748,46 @@ def replace_namespaced_stateful_set_status_with_http_info(self, name, namespace, replace status of the specified StatefulSet # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_stateful_set_status_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the StatefulSet (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1StatefulSet body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the StatefulSet (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1StatefulSet + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1StatefulSet, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1StatefulSet, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -9404,7 +11806,10 @@ def replace_namespaced_stateful_set_status_with_http_info(self, name, namespace, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -9417,16 +11822,13 @@ def replace_namespaced_stateful_set_status_with_http_info(self, name, namespace, local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_stateful_set_status`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_stateful_set_status`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_stateful_set_status`") # noqa: E501 collection_formats = {} @@ -9438,16 +11840,16 @@ def replace_namespaced_stateful_set_status_with_http_info(self, name, namespace, path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -9457,11 +11859,17 @@ def replace_namespaced_stateful_set_status_with_http_info(self, name, namespace, body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1StatefulSet", + 201: "V1StatefulSet", + 401: None, + } + return self.api_client.call_api( '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/status', 'PUT', path_params, @@ -9470,10 +11878,11 @@ def replace_namespaced_stateful_set_status_with_http_info(self, name, namespace, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1StatefulSet', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) diff --git a/kubernetes/client/api/authentication_api.py b/kubernetes/client/api/authentication_api.py index 11e9e1c58e..940d2e27d3 100644 --- a/kubernetes/client/api/authentication_api.py +++ b/kubernetes/client/api/authentication_api.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ @@ -42,20 +42,24 @@ def get_api_group(self, **kwargs): # noqa: E501 get information of a group # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_group(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1APIGroup + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1APIGroup """ kwargs['_return_http_data_only'] = True return self.get_api_group_with_http_info(**kwargs) # noqa: E501 @@ -66,22 +70,32 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 get information of a group # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_group_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1APIGroup, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1APIGroup, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -93,7 +107,10 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -112,7 +129,7 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -125,6 +142,11 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1APIGroup", + 401: None, + } + return self.api_client.call_api( '/apis/authentication.k8s.io/', 'GET', path_params, @@ -133,10 +155,11 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1APIGroup', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) diff --git a/kubernetes/client/api/authentication_v1_api.py b/kubernetes/client/api/authentication_v1_api.py index b22e5f0f48..93941360f3 100644 --- a/kubernetes/client/api/authentication_v1_api.py +++ b/kubernetes/client/api/authentication_v1_api.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ @@ -42,25 +42,34 @@ def create_self_subject_review(self, body, **kwargs): # noqa: E501 create a SelfSubjectReview # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_self_subject_review(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param V1SelfSubjectReview body: (required) - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param body: (required) + :type body: V1SelfSubjectReview + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1SelfSubjectReview + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1SelfSubjectReview """ kwargs['_return_http_data_only'] = True return self.create_self_subject_review_with_http_info(body, **kwargs) # noqa: E501 @@ -71,27 +80,42 @@ def create_self_subject_review_with_http_info(self, body, **kwargs): # noqa: E5 create a SelfSubjectReview # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_self_subject_review_with_http_info(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param V1SelfSubjectReview body: (required) - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param body: (required) + :type body: V1SelfSubjectReview + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1SelfSubjectReview, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1SelfSubjectReview, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -108,7 +132,10 @@ def create_self_subject_review_with_http_info(self, body, **kwargs): # noqa: E5 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -121,8 +148,7 @@ def create_self_subject_review_with_http_info(self, body, **kwargs): # noqa: E5 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_self_subject_review`") # noqa: E501 collection_formats = {} @@ -130,16 +156,16 @@ def create_self_subject_review_with_http_info(self, body, **kwargs): # noqa: E5 path_params = {} query_params = [] - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -149,11 +175,18 @@ def create_self_subject_review_with_http_info(self, body, **kwargs): # noqa: E5 body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1SelfSubjectReview", + 201: "V1SelfSubjectReview", + 202: "V1SelfSubjectReview", + 401: None, + } + return self.api_client.call_api( '/apis/authentication.k8s.io/v1/selfsubjectreviews', 'POST', path_params, @@ -162,13 +195,14 @@ def create_self_subject_review_with_http_info(self, body, **kwargs): # noqa: E5 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1SelfSubjectReview', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def create_token_review(self, body, **kwargs): # noqa: E501 """create_token_review # noqa: E501 @@ -176,25 +210,34 @@ def create_token_review(self, body, **kwargs): # noqa: E501 create a TokenReview # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_token_review(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param V1TokenReview body: (required) - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param body: (required) + :type body: V1TokenReview + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1TokenReview + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1TokenReview """ kwargs['_return_http_data_only'] = True return self.create_token_review_with_http_info(body, **kwargs) # noqa: E501 @@ -205,27 +248,42 @@ def create_token_review_with_http_info(self, body, **kwargs): # noqa: E501 create a TokenReview # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_token_review_with_http_info(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param V1TokenReview body: (required) - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param body: (required) + :type body: V1TokenReview + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1TokenReview, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1TokenReview, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -242,7 +300,10 @@ def create_token_review_with_http_info(self, body, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -255,8 +316,7 @@ def create_token_review_with_http_info(self, body, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_token_review`") # noqa: E501 collection_formats = {} @@ -264,16 +324,16 @@ def create_token_review_with_http_info(self, body, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -283,11 +343,18 @@ def create_token_review_with_http_info(self, body, **kwargs): # noqa: E501 body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1TokenReview", + 201: "V1TokenReview", + 202: "V1TokenReview", + 401: None, + } + return self.api_client.call_api( '/apis/authentication.k8s.io/v1/tokenreviews', 'POST', path_params, @@ -296,13 +363,14 @@ def create_token_review_with_http_info(self, body, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1TokenReview', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def get_api_resources(self, **kwargs): # noqa: E501 """get_api_resources # noqa: E501 @@ -310,20 +378,24 @@ def get_api_resources(self, **kwargs): # noqa: E501 get available resources # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_resources(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1APIResourceList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1APIResourceList """ kwargs['_return_http_data_only'] = True return self.get_api_resources_with_http_info(**kwargs) # noqa: E501 @@ -334,22 +406,32 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 get available resources # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_resources_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -361,7 +443,10 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -380,7 +465,7 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -388,11 +473,16 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1APIResourceList", + 401: None, + } + return self.api_client.call_api( '/apis/authentication.k8s.io/v1/', 'GET', path_params, @@ -401,10 +491,11 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1APIResourceList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) diff --git a/kubernetes/client/api/authentication_v1alpha1_api.py b/kubernetes/client/api/authentication_v1alpha1_api.py deleted file mode 100644 index 8ef5315624..0000000000 --- a/kubernetes/client/api/authentication_v1alpha1_api.py +++ /dev/null @@ -1,276 +0,0 @@ -# coding: utf-8 - -""" - Kubernetes - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - - The version of the OpenAPI document: release-1.30 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from kubernetes.client.api_client import ApiClient -from kubernetes.client.exceptions import ( # noqa: F401 - ApiTypeError, - ApiValueError -) - - -class AuthenticationV1alpha1Api(object): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def create_self_subject_review(self, body, **kwargs): # noqa: E501 - """create_self_subject_review # noqa: E501 - - create a SelfSubjectReview # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_self_subject_review(body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param V1alpha1SelfSubjectReview body: (required) - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha1SelfSubjectReview - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.create_self_subject_review_with_http_info(body, **kwargs) # noqa: E501 - - def create_self_subject_review_with_http_info(self, body, **kwargs): # noqa: E501 - """create_self_subject_review # noqa: E501 - - create a SelfSubjectReview # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_self_subject_review_with_http_info(body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param V1alpha1SelfSubjectReview body: (required) - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha1SelfSubjectReview, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'body', - 'dry_run', - 'field_manager', - 'field_validation', - 'pretty' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method create_self_subject_review" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `create_self_subject_review`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 - query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 - query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/authentication.k8s.io/v1alpha1/selfsubjectreviews', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha1SelfSubjectReview', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_api_resources(self, **kwargs): # noqa: E501 - """get_api_resources # noqa: E501 - - get available resources # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_api_resources(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1APIResourceList - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_api_resources_with_http_info(**kwargs) # noqa: E501 - - def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 - """get_api_resources # noqa: E501 - - get available resources # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_api_resources_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_api_resources" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/authentication.k8s.io/v1alpha1/', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1APIResourceList', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) diff --git a/kubernetes/client/api/authentication_v1beta1_api.py b/kubernetes/client/api/authentication_v1beta1_api.py deleted file mode 100644 index 5271de544c..0000000000 --- a/kubernetes/client/api/authentication_v1beta1_api.py +++ /dev/null @@ -1,276 +0,0 @@ -# coding: utf-8 - -""" - Kubernetes - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - - The version of the OpenAPI document: release-1.30 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from kubernetes.client.api_client import ApiClient -from kubernetes.client.exceptions import ( # noqa: F401 - ApiTypeError, - ApiValueError -) - - -class AuthenticationV1beta1Api(object): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def create_self_subject_review(self, body, **kwargs): # noqa: E501 - """create_self_subject_review # noqa: E501 - - create a SelfSubjectReview # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_self_subject_review(body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param V1beta1SelfSubjectReview body: (required) - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1beta1SelfSubjectReview - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.create_self_subject_review_with_http_info(body, **kwargs) # noqa: E501 - - def create_self_subject_review_with_http_info(self, body, **kwargs): # noqa: E501 - """create_self_subject_review # noqa: E501 - - create a SelfSubjectReview # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_self_subject_review_with_http_info(body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param V1beta1SelfSubjectReview body: (required) - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1beta1SelfSubjectReview, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'body', - 'dry_run', - 'field_manager', - 'field_validation', - 'pretty' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method create_self_subject_review" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `create_self_subject_review`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 - query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 - query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/authentication.k8s.io/v1beta1/selfsubjectreviews', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1beta1SelfSubjectReview', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_api_resources(self, **kwargs): # noqa: E501 - """get_api_resources # noqa: E501 - - get available resources # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_api_resources(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1APIResourceList - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_api_resources_with_http_info(**kwargs) # noqa: E501 - - def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 - """get_api_resources # noqa: E501 - - get available resources # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_api_resources_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_api_resources" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/authentication.k8s.io/v1beta1/', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1APIResourceList', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) diff --git a/kubernetes/client/api/authorization_api.py b/kubernetes/client/api/authorization_api.py index 90bbfa8fd4..3273bbf074 100644 --- a/kubernetes/client/api/authorization_api.py +++ b/kubernetes/client/api/authorization_api.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ @@ -42,20 +42,24 @@ def get_api_group(self, **kwargs): # noqa: E501 get information of a group # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_group(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1APIGroup + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1APIGroup """ kwargs['_return_http_data_only'] = True return self.get_api_group_with_http_info(**kwargs) # noqa: E501 @@ -66,22 +70,32 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 get information of a group # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_group_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1APIGroup, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1APIGroup, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -93,7 +107,10 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -112,7 +129,7 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -125,6 +142,11 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1APIGroup", + 401: None, + } + return self.api_client.call_api( '/apis/authorization.k8s.io/', 'GET', path_params, @@ -133,10 +155,11 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1APIGroup', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) diff --git a/kubernetes/client/api/authorization_v1_api.py b/kubernetes/client/api/authorization_v1_api.py index ade2451a80..0d9a83e21b 100644 --- a/kubernetes/client/api/authorization_v1_api.py +++ b/kubernetes/client/api/authorization_v1_api.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ @@ -42,26 +42,36 @@ def create_namespaced_local_subject_access_review(self, namespace, body, **kwarg create a LocalSubjectAccessReview # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_namespaced_local_subject_access_review(namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1LocalSubjectAccessReview body: (required) - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1LocalSubjectAccessReview + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1LocalSubjectAccessReview + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1LocalSubjectAccessReview """ kwargs['_return_http_data_only'] = True return self.create_namespaced_local_subject_access_review_with_http_info(namespace, body, **kwargs) # noqa: E501 @@ -72,28 +82,44 @@ def create_namespaced_local_subject_access_review_with_http_info(self, namespace create a LocalSubjectAccessReview # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_namespaced_local_subject_access_review_with_http_info(namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1LocalSubjectAccessReview body: (required) - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1LocalSubjectAccessReview + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1LocalSubjectAccessReview, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1LocalSubjectAccessReview, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -111,7 +137,10 @@ def create_namespaced_local_subject_access_review_with_http_info(self, namespace 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -124,12 +153,10 @@ def create_namespaced_local_subject_access_review_with_http_info(self, namespace local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_local_subject_access_review`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_local_subject_access_review`") # noqa: E501 collection_formats = {} @@ -139,16 +166,16 @@ def create_namespaced_local_subject_access_review_with_http_info(self, namespace path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -158,11 +185,18 @@ def create_namespaced_local_subject_access_review_with_http_info(self, namespace body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1LocalSubjectAccessReview", + 201: "V1LocalSubjectAccessReview", + 202: "V1LocalSubjectAccessReview", + 401: None, + } + return self.api_client.call_api( '/apis/authorization.k8s.io/v1/namespaces/{namespace}/localsubjectaccessreviews', 'POST', path_params, @@ -171,13 +205,14 @@ def create_namespaced_local_subject_access_review_with_http_info(self, namespace body=body_params, post_params=form_params, files=local_var_files, - response_type='V1LocalSubjectAccessReview', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def create_self_subject_access_review(self, body, **kwargs): # noqa: E501 """create_self_subject_access_review # noqa: E501 @@ -185,25 +220,34 @@ def create_self_subject_access_review(self, body, **kwargs): # noqa: E501 create a SelfSubjectAccessReview # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_self_subject_access_review(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param V1SelfSubjectAccessReview body: (required) - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param body: (required) + :type body: V1SelfSubjectAccessReview + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1SelfSubjectAccessReview + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1SelfSubjectAccessReview """ kwargs['_return_http_data_only'] = True return self.create_self_subject_access_review_with_http_info(body, **kwargs) # noqa: E501 @@ -214,27 +258,42 @@ def create_self_subject_access_review_with_http_info(self, body, **kwargs): # n create a SelfSubjectAccessReview # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_self_subject_access_review_with_http_info(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param V1SelfSubjectAccessReview body: (required) - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param body: (required) + :type body: V1SelfSubjectAccessReview + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1SelfSubjectAccessReview, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1SelfSubjectAccessReview, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -251,7 +310,10 @@ def create_self_subject_access_review_with_http_info(self, body, **kwargs): # n 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -264,8 +326,7 @@ def create_self_subject_access_review_with_http_info(self, body, **kwargs): # n local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_self_subject_access_review`") # noqa: E501 collection_formats = {} @@ -273,16 +334,16 @@ def create_self_subject_access_review_with_http_info(self, body, **kwargs): # n path_params = {} query_params = [] - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -292,11 +353,18 @@ def create_self_subject_access_review_with_http_info(self, body, **kwargs): # n body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1SelfSubjectAccessReview", + 201: "V1SelfSubjectAccessReview", + 202: "V1SelfSubjectAccessReview", + 401: None, + } + return self.api_client.call_api( '/apis/authorization.k8s.io/v1/selfsubjectaccessreviews', 'POST', path_params, @@ -305,13 +373,14 @@ def create_self_subject_access_review_with_http_info(self, body, **kwargs): # n body=body_params, post_params=form_params, files=local_var_files, - response_type='V1SelfSubjectAccessReview', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def create_self_subject_rules_review(self, body, **kwargs): # noqa: E501 """create_self_subject_rules_review # noqa: E501 @@ -319,25 +388,34 @@ def create_self_subject_rules_review(self, body, **kwargs): # noqa: E501 create a SelfSubjectRulesReview # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_self_subject_rules_review(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param V1SelfSubjectRulesReview body: (required) - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param body: (required) + :type body: V1SelfSubjectRulesReview + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1SelfSubjectRulesReview + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1SelfSubjectRulesReview """ kwargs['_return_http_data_only'] = True return self.create_self_subject_rules_review_with_http_info(body, **kwargs) # noqa: E501 @@ -348,27 +426,42 @@ def create_self_subject_rules_review_with_http_info(self, body, **kwargs): # no create a SelfSubjectRulesReview # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_self_subject_rules_review_with_http_info(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param V1SelfSubjectRulesReview body: (required) - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param body: (required) + :type body: V1SelfSubjectRulesReview + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1SelfSubjectRulesReview, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1SelfSubjectRulesReview, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -385,7 +478,10 @@ def create_self_subject_rules_review_with_http_info(self, body, **kwargs): # no 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -398,8 +494,7 @@ def create_self_subject_rules_review_with_http_info(self, body, **kwargs): # no local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_self_subject_rules_review`") # noqa: E501 collection_formats = {} @@ -407,16 +502,16 @@ def create_self_subject_rules_review_with_http_info(self, body, **kwargs): # no path_params = {} query_params = [] - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -426,11 +521,18 @@ def create_self_subject_rules_review_with_http_info(self, body, **kwargs): # no body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1SelfSubjectRulesReview", + 201: "V1SelfSubjectRulesReview", + 202: "V1SelfSubjectRulesReview", + 401: None, + } + return self.api_client.call_api( '/apis/authorization.k8s.io/v1/selfsubjectrulesreviews', 'POST', path_params, @@ -439,13 +541,14 @@ def create_self_subject_rules_review_with_http_info(self, body, **kwargs): # no body=body_params, post_params=form_params, files=local_var_files, - response_type='V1SelfSubjectRulesReview', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def create_subject_access_review(self, body, **kwargs): # noqa: E501 """create_subject_access_review # noqa: E501 @@ -453,25 +556,34 @@ def create_subject_access_review(self, body, **kwargs): # noqa: E501 create a SubjectAccessReview # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_subject_access_review(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param V1SubjectAccessReview body: (required) - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param body: (required) + :type body: V1SubjectAccessReview + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1SubjectAccessReview + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1SubjectAccessReview """ kwargs['_return_http_data_only'] = True return self.create_subject_access_review_with_http_info(body, **kwargs) # noqa: E501 @@ -482,27 +594,42 @@ def create_subject_access_review_with_http_info(self, body, **kwargs): # noqa: create a SubjectAccessReview # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_subject_access_review_with_http_info(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param V1SubjectAccessReview body: (required) - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param body: (required) + :type body: V1SubjectAccessReview + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1SubjectAccessReview, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1SubjectAccessReview, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -519,7 +646,10 @@ def create_subject_access_review_with_http_info(self, body, **kwargs): # noqa: 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -532,8 +662,7 @@ def create_subject_access_review_with_http_info(self, body, **kwargs): # noqa: local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_subject_access_review`") # noqa: E501 collection_formats = {} @@ -541,16 +670,16 @@ def create_subject_access_review_with_http_info(self, body, **kwargs): # noqa: path_params = {} query_params = [] - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -560,11 +689,18 @@ def create_subject_access_review_with_http_info(self, body, **kwargs): # noqa: body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1SubjectAccessReview", + 201: "V1SubjectAccessReview", + 202: "V1SubjectAccessReview", + 401: None, + } + return self.api_client.call_api( '/apis/authorization.k8s.io/v1/subjectaccessreviews', 'POST', path_params, @@ -573,13 +709,14 @@ def create_subject_access_review_with_http_info(self, body, **kwargs): # noqa: body=body_params, post_params=form_params, files=local_var_files, - response_type='V1SubjectAccessReview', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def get_api_resources(self, **kwargs): # noqa: E501 """get_api_resources # noqa: E501 @@ -587,20 +724,24 @@ def get_api_resources(self, **kwargs): # noqa: E501 get available resources # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_resources(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1APIResourceList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1APIResourceList """ kwargs['_return_http_data_only'] = True return self.get_api_resources_with_http_info(**kwargs) # noqa: E501 @@ -611,22 +752,32 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 get available resources # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_resources_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -638,7 +789,10 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -657,7 +811,7 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -665,11 +819,16 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1APIResourceList", + 401: None, + } + return self.api_client.call_api( '/apis/authorization.k8s.io/v1/', 'GET', path_params, @@ -678,10 +837,11 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1APIResourceList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) diff --git a/kubernetes/client/api/autoscaling_api.py b/kubernetes/client/api/autoscaling_api.py index c0a1336bd6..23c1393e9a 100644 --- a/kubernetes/client/api/autoscaling_api.py +++ b/kubernetes/client/api/autoscaling_api.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ @@ -42,20 +42,24 @@ def get_api_group(self, **kwargs): # noqa: E501 get information of a group # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_group(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1APIGroup + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1APIGroup """ kwargs['_return_http_data_only'] = True return self.get_api_group_with_http_info(**kwargs) # noqa: E501 @@ -66,22 +70,32 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 get information of a group # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_group_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1APIGroup, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1APIGroup, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -93,7 +107,10 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -112,7 +129,7 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -125,6 +142,11 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1APIGroup", + 401: None, + } + return self.api_client.call_api( '/apis/autoscaling/', 'GET', path_params, @@ -133,10 +155,11 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1APIGroup', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) diff --git a/kubernetes/client/api/autoscaling_v1_api.py b/kubernetes/client/api/autoscaling_v1_api.py index fc2130bf14..8d55106130 100644 --- a/kubernetes/client/api/autoscaling_v1_api.py +++ b/kubernetes/client/api/autoscaling_v1_api.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ @@ -42,26 +42,36 @@ def create_namespaced_horizontal_pod_autoscaler(self, namespace, body, **kwargs) create a HorizontalPodAutoscaler # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_namespaced_horizontal_pod_autoscaler(namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1HorizontalPodAutoscaler body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1HorizontalPodAutoscaler + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1HorizontalPodAutoscaler + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1HorizontalPodAutoscaler """ kwargs['_return_http_data_only'] = True return self.create_namespaced_horizontal_pod_autoscaler_with_http_info(namespace, body, **kwargs) # noqa: E501 @@ -72,28 +82,44 @@ def create_namespaced_horizontal_pod_autoscaler_with_http_info(self, namespace, create a HorizontalPodAutoscaler # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_namespaced_horizontal_pod_autoscaler_with_http_info(namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1HorizontalPodAutoscaler body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1HorizontalPodAutoscaler + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1HorizontalPodAutoscaler, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1HorizontalPodAutoscaler, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -111,7 +137,10 @@ def create_namespaced_horizontal_pod_autoscaler_with_http_info(self, namespace, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -124,12 +153,10 @@ def create_namespaced_horizontal_pod_autoscaler_with_http_info(self, namespace, local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_horizontal_pod_autoscaler`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_horizontal_pod_autoscaler`") # noqa: E501 collection_formats = {} @@ -139,16 +166,16 @@ def create_namespaced_horizontal_pod_autoscaler_with_http_info(self, namespace, path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -158,11 +185,18 @@ def create_namespaced_horizontal_pod_autoscaler_with_http_info(self, namespace, body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1HorizontalPodAutoscaler", + 201: "V1HorizontalPodAutoscaler", + 202: "V1HorizontalPodAutoscaler", + 401: None, + } + return self.api_client.call_api( '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers', 'POST', path_params, @@ -171,13 +205,14 @@ def create_namespaced_horizontal_pod_autoscaler_with_http_info(self, namespace, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1HorizontalPodAutoscaler', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_collection_namespaced_horizontal_pod_autoscaler(self, namespace, **kwargs): # noqa: E501 """delete_collection_namespaced_horizontal_pod_autoscaler # noqa: E501 @@ -185,35 +220,56 @@ def delete_collection_namespaced_horizontal_pod_autoscaler(self, namespace, **kw delete collection of HorizontalPodAutoscaler # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_namespaced_horizontal_pod_autoscaler(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_collection_namespaced_horizontal_pod_autoscaler_with_http_info(namespace, **kwargs) # noqa: E501 @@ -224,37 +280,64 @@ def delete_collection_namespaced_horizontal_pod_autoscaler_with_http_info(self, delete collection of HorizontalPodAutoscaler # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_namespaced_horizontal_pod_autoscaler_with_http_info(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -266,6 +349,7 @@ def delete_collection_namespaced_horizontal_pod_autoscaler_with_http_info(self, 'dry_run', 'field_selector', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'label_selector', 'limit', 'orphan_dependents', @@ -281,7 +365,10 @@ def delete_collection_namespaced_horizontal_pod_autoscaler_with_http_info(self, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -294,8 +381,7 @@ def delete_collection_namespaced_horizontal_pod_autoscaler_with_http_info(self, local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_horizontal_pod_autoscaler`") # noqa: E501 collection_formats = {} @@ -305,34 +391,36 @@ def delete_collection_namespaced_horizontal_pod_autoscaler_with_http_info(self, path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -342,11 +430,16 @@ def delete_collection_namespaced_horizontal_pod_autoscaler_with_http_info(self, body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 401: None, + } + return self.api_client.call_api( '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers', 'DELETE', path_params, @@ -355,13 +448,14 @@ def delete_collection_namespaced_horizontal_pod_autoscaler_with_http_info(self, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_namespaced_horizontal_pod_autoscaler(self, name, namespace, **kwargs): # noqa: E501 """delete_namespaced_horizontal_pod_autoscaler # noqa: E501 @@ -369,28 +463,42 @@ def delete_namespaced_horizontal_pod_autoscaler(self, name, namespace, **kwargs) delete a HorizontalPodAutoscaler # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_namespaced_horizontal_pod_autoscaler(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the HorizontalPodAutoscaler (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the HorizontalPodAutoscaler (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_namespaced_horizontal_pod_autoscaler_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -401,30 +509,50 @@ def delete_namespaced_horizontal_pod_autoscaler_with_http_info(self, name, names delete a HorizontalPodAutoscaler # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_namespaced_horizontal_pod_autoscaler_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the HorizontalPodAutoscaler (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the HorizontalPodAutoscaler (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -435,6 +563,7 @@ def delete_namespaced_horizontal_pod_autoscaler_with_http_info(self, name, names 'pretty', 'dry_run', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'orphan_dependents', 'propagation_policy', 'body' @@ -444,7 +573,10 @@ def delete_namespaced_horizontal_pod_autoscaler_with_http_info(self, name, names 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -457,12 +589,10 @@ def delete_namespaced_horizontal_pod_autoscaler_with_http_info(self, name, names local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_horizontal_pod_autoscaler`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_horizontal_pod_autoscaler`") # noqa: E501 collection_formats = {} @@ -474,18 +604,20 @@ def delete_namespaced_horizontal_pod_autoscaler_with_http_info(self, name, names path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -495,11 +627,17 @@ def delete_namespaced_horizontal_pod_autoscaler_with_http_info(self, name, names body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 202: "V1Status", + 401: None, + } + return self.api_client.call_api( '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}', 'DELETE', path_params, @@ -508,13 +646,14 @@ def delete_namespaced_horizontal_pod_autoscaler_with_http_info(self, name, names body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def get_api_resources(self, **kwargs): # noqa: E501 """get_api_resources # noqa: E501 @@ -522,20 +661,24 @@ def get_api_resources(self, **kwargs): # noqa: E501 get available resources # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_resources(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1APIResourceList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1APIResourceList """ kwargs['_return_http_data_only'] = True return self.get_api_resources_with_http_info(**kwargs) # noqa: E501 @@ -546,22 +689,32 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 get available resources # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_resources_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -573,7 +726,10 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -592,7 +748,7 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -600,11 +756,16 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1APIResourceList", + 401: None, + } + return self.api_client.call_api( '/apis/autoscaling/v1/', 'GET', path_params, @@ -613,13 +774,14 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1APIResourceList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_horizontal_pod_autoscaler_for_all_namespaces(self, **kwargs): # noqa: E501 """list_horizontal_pod_autoscaler_for_all_namespaces # noqa: E501 @@ -627,31 +789,46 @@ def list_horizontal_pod_autoscaler_for_all_namespaces(self, **kwargs): # noqa: list or watch objects of kind HorizontalPodAutoscaler # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_horizontal_pod_autoscaler_for_all_namespaces(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1HorizontalPodAutoscalerList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1HorizontalPodAutoscalerList """ kwargs['_return_http_data_only'] = True return self.list_horizontal_pod_autoscaler_for_all_namespaces_with_http_info(**kwargs) # noqa: E501 @@ -662,33 +839,54 @@ def list_horizontal_pod_autoscaler_for_all_namespaces_with_http_info(self, **kwa list or watch objects of kind HorizontalPodAutoscaler # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_horizontal_pod_autoscaler_for_all_namespaces_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1HorizontalPodAutoscalerList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1HorizontalPodAutoscalerList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -711,7 +909,10 @@ def list_horizontal_pod_autoscaler_for_all_namespaces_with_http_info(self, **kwa 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -729,30 +930,30 @@ def list_horizontal_pod_autoscaler_for_all_namespaces_with_http_info(self, **kwa path_params = {} query_params = [] - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -760,11 +961,16 @@ def list_horizontal_pod_autoscaler_for_all_namespaces_with_http_info(self, **kwa body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1HorizontalPodAutoscalerList", + 401: None, + } + return self.api_client.call_api( '/apis/autoscaling/v1/horizontalpodautoscalers', 'GET', path_params, @@ -773,13 +979,14 @@ def list_horizontal_pod_autoscaler_for_all_namespaces_with_http_info(self, **kwa body=body_params, post_params=form_params, files=local_var_files, - response_type='V1HorizontalPodAutoscalerList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_namespaced_horizontal_pod_autoscaler(self, namespace, **kwargs): # noqa: E501 """list_namespaced_horizontal_pod_autoscaler # noqa: E501 @@ -787,32 +994,48 @@ def list_namespaced_horizontal_pod_autoscaler(self, namespace, **kwargs): # noq list or watch objects of kind HorizontalPodAutoscaler # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_namespaced_horizontal_pod_autoscaler(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1HorizontalPodAutoscalerList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1HorizontalPodAutoscalerList """ kwargs['_return_http_data_only'] = True return self.list_namespaced_horizontal_pod_autoscaler_with_http_info(namespace, **kwargs) # noqa: E501 @@ -823,34 +1046,56 @@ def list_namespaced_horizontal_pod_autoscaler_with_http_info(self, namespace, ** list or watch objects of kind HorizontalPodAutoscaler # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_namespaced_horizontal_pod_autoscaler_with_http_info(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1HorizontalPodAutoscalerList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1HorizontalPodAutoscalerList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -874,7 +1119,10 @@ def list_namespaced_horizontal_pod_autoscaler_with_http_info(self, namespace, ** 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -887,8 +1135,7 @@ def list_namespaced_horizontal_pod_autoscaler_with_http_info(self, namespace, ** local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_horizontal_pod_autoscaler`") # noqa: E501 collection_formats = {} @@ -898,30 +1145,30 @@ def list_namespaced_horizontal_pod_autoscaler_with_http_info(self, namespace, ** path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -929,11 +1176,16 @@ def list_namespaced_horizontal_pod_autoscaler_with_http_info(self, namespace, ** body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1HorizontalPodAutoscalerList", + 401: None, + } + return self.api_client.call_api( '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers', 'GET', path_params, @@ -942,13 +1194,14 @@ def list_namespaced_horizontal_pod_autoscaler_with_http_info(self, namespace, ** body=body_params, post_params=form_params, files=local_var_files, - response_type='V1HorizontalPodAutoscalerList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_namespaced_horizontal_pod_autoscaler(self, name, namespace, body, **kwargs): # noqa: E501 """patch_namespaced_horizontal_pod_autoscaler # noqa: E501 @@ -956,28 +1209,40 @@ def patch_namespaced_horizontal_pod_autoscaler(self, name, namespace, body, **kw partially update the specified HorizontalPodAutoscaler # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_horizontal_pod_autoscaler(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the HorizontalPodAutoscaler (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the HorizontalPodAutoscaler (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1HorizontalPodAutoscaler + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1HorizontalPodAutoscaler """ kwargs['_return_http_data_only'] = True return self.patch_namespaced_horizontal_pod_autoscaler_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -988,30 +1253,48 @@ def patch_namespaced_horizontal_pod_autoscaler_with_http_info(self, name, namesp partially update the specified HorizontalPodAutoscaler # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_horizontal_pod_autoscaler_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the HorizontalPodAutoscaler (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the HorizontalPodAutoscaler (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1HorizontalPodAutoscaler, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1HorizontalPodAutoscaler, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1031,7 +1314,10 @@ def patch_namespaced_horizontal_pod_autoscaler_with_http_info(self, name, namesp 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1044,16 +1330,13 @@ def patch_namespaced_horizontal_pod_autoscaler_with_http_info(self, name, namesp local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_horizontal_pod_autoscaler`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_horizontal_pod_autoscaler`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_horizontal_pod_autoscaler`") # noqa: E501 collection_formats = {} @@ -1065,18 +1348,18 @@ def patch_namespaced_horizontal_pod_autoscaler_with_http_info(self, name, namesp path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1086,15 +1369,25 @@ def patch_namespaced_horizontal_pod_autoscaler_with_http_info(self, name, namesp body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1HorizontalPodAutoscaler", + 201: "V1HorizontalPodAutoscaler", + 401: None, + } + return self.api_client.call_api( '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}', 'PATCH', path_params, @@ -1103,13 +1396,14 @@ def patch_namespaced_horizontal_pod_autoscaler_with_http_info(self, name, namesp body=body_params, post_params=form_params, files=local_var_files, - response_type='V1HorizontalPodAutoscaler', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_namespaced_horizontal_pod_autoscaler_status(self, name, namespace, body, **kwargs): # noqa: E501 """patch_namespaced_horizontal_pod_autoscaler_status # noqa: E501 @@ -1117,28 +1411,40 @@ def patch_namespaced_horizontal_pod_autoscaler_status(self, name, namespace, bod partially update status of the specified HorizontalPodAutoscaler # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_horizontal_pod_autoscaler_status(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the HorizontalPodAutoscaler (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the HorizontalPodAutoscaler (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1HorizontalPodAutoscaler + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1HorizontalPodAutoscaler """ kwargs['_return_http_data_only'] = True return self.patch_namespaced_horizontal_pod_autoscaler_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -1149,30 +1455,48 @@ def patch_namespaced_horizontal_pod_autoscaler_status_with_http_info(self, name, partially update status of the specified HorizontalPodAutoscaler # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_horizontal_pod_autoscaler_status_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the HorizontalPodAutoscaler (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the HorizontalPodAutoscaler (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1HorizontalPodAutoscaler, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1HorizontalPodAutoscaler, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1192,7 +1516,10 @@ def patch_namespaced_horizontal_pod_autoscaler_status_with_http_info(self, name, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1205,16 +1532,13 @@ def patch_namespaced_horizontal_pod_autoscaler_status_with_http_info(self, name, local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_horizontal_pod_autoscaler_status`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_horizontal_pod_autoscaler_status`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_horizontal_pod_autoscaler_status`") # noqa: E501 collection_formats = {} @@ -1226,18 +1550,18 @@ def patch_namespaced_horizontal_pod_autoscaler_status_with_http_info(self, name, path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1247,15 +1571,25 @@ def patch_namespaced_horizontal_pod_autoscaler_status_with_http_info(self, name, body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1HorizontalPodAutoscaler", + 201: "V1HorizontalPodAutoscaler", + 401: None, + } + return self.api_client.call_api( '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status', 'PATCH', path_params, @@ -1264,13 +1598,14 @@ def patch_namespaced_horizontal_pod_autoscaler_status_with_http_info(self, name, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1HorizontalPodAutoscaler', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_namespaced_horizontal_pod_autoscaler(self, name, namespace, **kwargs): # noqa: E501 """read_namespaced_horizontal_pod_autoscaler # noqa: E501 @@ -1278,23 +1613,30 @@ def read_namespaced_horizontal_pod_autoscaler(self, name, namespace, **kwargs): read the specified HorizontalPodAutoscaler # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_horizontal_pod_autoscaler(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the HorizontalPodAutoscaler (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the HorizontalPodAutoscaler (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1HorizontalPodAutoscaler + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1HorizontalPodAutoscaler """ kwargs['_return_http_data_only'] = True return self.read_namespaced_horizontal_pod_autoscaler_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -1305,25 +1647,38 @@ def read_namespaced_horizontal_pod_autoscaler_with_http_info(self, name, namespa read the specified HorizontalPodAutoscaler # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_horizontal_pod_autoscaler_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the HorizontalPodAutoscaler (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the HorizontalPodAutoscaler (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1HorizontalPodAutoscaler, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1HorizontalPodAutoscaler, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1338,7 +1693,10 @@ def read_namespaced_horizontal_pod_autoscaler_with_http_info(self, name, namespa 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1351,12 +1709,10 @@ def read_namespaced_horizontal_pod_autoscaler_with_http_info(self, name, namespa local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_horizontal_pod_autoscaler`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_horizontal_pod_autoscaler`") # noqa: E501 collection_formats = {} @@ -1368,10 +1724,10 @@ def read_namespaced_horizontal_pod_autoscaler_with_http_info(self, name, namespa path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1379,11 +1735,16 @@ def read_namespaced_horizontal_pod_autoscaler_with_http_info(self, name, namespa body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1HorizontalPodAutoscaler", + 401: None, + } + return self.api_client.call_api( '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}', 'GET', path_params, @@ -1392,13 +1753,14 @@ def read_namespaced_horizontal_pod_autoscaler_with_http_info(self, name, namespa body=body_params, post_params=form_params, files=local_var_files, - response_type='V1HorizontalPodAutoscaler', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_namespaced_horizontal_pod_autoscaler_status(self, name, namespace, **kwargs): # noqa: E501 """read_namespaced_horizontal_pod_autoscaler_status # noqa: E501 @@ -1406,23 +1768,30 @@ def read_namespaced_horizontal_pod_autoscaler_status(self, name, namespace, **kw read status of the specified HorizontalPodAutoscaler # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_horizontal_pod_autoscaler_status(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the HorizontalPodAutoscaler (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the HorizontalPodAutoscaler (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1HorizontalPodAutoscaler + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1HorizontalPodAutoscaler """ kwargs['_return_http_data_only'] = True return self.read_namespaced_horizontal_pod_autoscaler_status_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -1433,25 +1802,38 @@ def read_namespaced_horizontal_pod_autoscaler_status_with_http_info(self, name, read status of the specified HorizontalPodAutoscaler # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_horizontal_pod_autoscaler_status_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the HorizontalPodAutoscaler (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the HorizontalPodAutoscaler (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1HorizontalPodAutoscaler, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1HorizontalPodAutoscaler, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1466,7 +1848,10 @@ def read_namespaced_horizontal_pod_autoscaler_status_with_http_info(self, name, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1479,12 +1864,10 @@ def read_namespaced_horizontal_pod_autoscaler_status_with_http_info(self, name, local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_horizontal_pod_autoscaler_status`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_horizontal_pod_autoscaler_status`") # noqa: E501 collection_formats = {} @@ -1496,10 +1879,10 @@ def read_namespaced_horizontal_pod_autoscaler_status_with_http_info(self, name, path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1507,11 +1890,16 @@ def read_namespaced_horizontal_pod_autoscaler_status_with_http_info(self, name, body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1HorizontalPodAutoscaler", + 401: None, + } + return self.api_client.call_api( '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status', 'GET', path_params, @@ -1520,13 +1908,14 @@ def read_namespaced_horizontal_pod_autoscaler_status_with_http_info(self, name, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1HorizontalPodAutoscaler', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_namespaced_horizontal_pod_autoscaler(self, name, namespace, body, **kwargs): # noqa: E501 """replace_namespaced_horizontal_pod_autoscaler # noqa: E501 @@ -1534,27 +1923,38 @@ def replace_namespaced_horizontal_pod_autoscaler(self, name, namespace, body, ** replace the specified HorizontalPodAutoscaler # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_horizontal_pod_autoscaler(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the HorizontalPodAutoscaler (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1HorizontalPodAutoscaler body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the HorizontalPodAutoscaler (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1HorizontalPodAutoscaler + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1HorizontalPodAutoscaler + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1HorizontalPodAutoscaler """ kwargs['_return_http_data_only'] = True return self.replace_namespaced_horizontal_pod_autoscaler_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -1565,29 +1965,46 @@ def replace_namespaced_horizontal_pod_autoscaler_with_http_info(self, name, name replace the specified HorizontalPodAutoscaler # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_horizontal_pod_autoscaler_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the HorizontalPodAutoscaler (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1HorizontalPodAutoscaler body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the HorizontalPodAutoscaler (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1HorizontalPodAutoscaler + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1HorizontalPodAutoscaler, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1HorizontalPodAutoscaler, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1606,7 +2023,10 @@ def replace_namespaced_horizontal_pod_autoscaler_with_http_info(self, name, name 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1619,16 +2039,13 @@ def replace_namespaced_horizontal_pod_autoscaler_with_http_info(self, name, name local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_horizontal_pod_autoscaler`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_horizontal_pod_autoscaler`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_horizontal_pod_autoscaler`") # noqa: E501 collection_formats = {} @@ -1640,16 +2057,16 @@ def replace_namespaced_horizontal_pod_autoscaler_with_http_info(self, name, name path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1659,11 +2076,17 @@ def replace_namespaced_horizontal_pod_autoscaler_with_http_info(self, name, name body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1HorizontalPodAutoscaler", + 201: "V1HorizontalPodAutoscaler", + 401: None, + } + return self.api_client.call_api( '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}', 'PUT', path_params, @@ -1672,13 +2095,14 @@ def replace_namespaced_horizontal_pod_autoscaler_with_http_info(self, name, name body=body_params, post_params=form_params, files=local_var_files, - response_type='V1HorizontalPodAutoscaler', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_namespaced_horizontal_pod_autoscaler_status(self, name, namespace, body, **kwargs): # noqa: E501 """replace_namespaced_horizontal_pod_autoscaler_status # noqa: E501 @@ -1686,27 +2110,38 @@ def replace_namespaced_horizontal_pod_autoscaler_status(self, name, namespace, b replace status of the specified HorizontalPodAutoscaler # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_horizontal_pod_autoscaler_status(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the HorizontalPodAutoscaler (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1HorizontalPodAutoscaler body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the HorizontalPodAutoscaler (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1HorizontalPodAutoscaler + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1HorizontalPodAutoscaler + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1HorizontalPodAutoscaler """ kwargs['_return_http_data_only'] = True return self.replace_namespaced_horizontal_pod_autoscaler_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -1717,29 +2152,46 @@ def replace_namespaced_horizontal_pod_autoscaler_status_with_http_info(self, nam replace status of the specified HorizontalPodAutoscaler # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_horizontal_pod_autoscaler_status_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the HorizontalPodAutoscaler (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1HorizontalPodAutoscaler body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the HorizontalPodAutoscaler (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1HorizontalPodAutoscaler + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1HorizontalPodAutoscaler, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1HorizontalPodAutoscaler, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1758,7 +2210,10 @@ def replace_namespaced_horizontal_pod_autoscaler_status_with_http_info(self, nam 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1771,16 +2226,13 @@ def replace_namespaced_horizontal_pod_autoscaler_status_with_http_info(self, nam local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_horizontal_pod_autoscaler_status`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_horizontal_pod_autoscaler_status`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_horizontal_pod_autoscaler_status`") # noqa: E501 collection_formats = {} @@ -1792,16 +2244,16 @@ def replace_namespaced_horizontal_pod_autoscaler_status_with_http_info(self, nam path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1811,11 +2263,17 @@ def replace_namespaced_horizontal_pod_autoscaler_status_with_http_info(self, nam body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1HorizontalPodAutoscaler", + 201: "V1HorizontalPodAutoscaler", + 401: None, + } + return self.api_client.call_api( '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status', 'PUT', path_params, @@ -1824,10 +2282,11 @@ def replace_namespaced_horizontal_pod_autoscaler_status_with_http_info(self, nam body=body_params, post_params=form_params, files=local_var_files, - response_type='V1HorizontalPodAutoscaler', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) diff --git a/kubernetes/client/api/autoscaling_v2_api.py b/kubernetes/client/api/autoscaling_v2_api.py index b900e333ae..061c3dd956 100644 --- a/kubernetes/client/api/autoscaling_v2_api.py +++ b/kubernetes/client/api/autoscaling_v2_api.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ @@ -42,26 +42,36 @@ def create_namespaced_horizontal_pod_autoscaler(self, namespace, body, **kwargs) create a HorizontalPodAutoscaler # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_namespaced_horizontal_pod_autoscaler(namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V2HorizontalPodAutoscaler body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V2HorizontalPodAutoscaler + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V2HorizontalPodAutoscaler + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V2HorizontalPodAutoscaler """ kwargs['_return_http_data_only'] = True return self.create_namespaced_horizontal_pod_autoscaler_with_http_info(namespace, body, **kwargs) # noqa: E501 @@ -72,28 +82,44 @@ def create_namespaced_horizontal_pod_autoscaler_with_http_info(self, namespace, create a HorizontalPodAutoscaler # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_namespaced_horizontal_pod_autoscaler_with_http_info(namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V2HorizontalPodAutoscaler body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V2HorizontalPodAutoscaler + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V2HorizontalPodAutoscaler, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V2HorizontalPodAutoscaler, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -111,7 +137,10 @@ def create_namespaced_horizontal_pod_autoscaler_with_http_info(self, namespace, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -124,12 +153,10 @@ def create_namespaced_horizontal_pod_autoscaler_with_http_info(self, namespace, local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_horizontal_pod_autoscaler`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_horizontal_pod_autoscaler`") # noqa: E501 collection_formats = {} @@ -139,16 +166,16 @@ def create_namespaced_horizontal_pod_autoscaler_with_http_info(self, namespace, path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -158,11 +185,18 @@ def create_namespaced_horizontal_pod_autoscaler_with_http_info(self, namespace, body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V2HorizontalPodAutoscaler", + 201: "V2HorizontalPodAutoscaler", + 202: "V2HorizontalPodAutoscaler", + 401: None, + } + return self.api_client.call_api( '/apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers', 'POST', path_params, @@ -171,13 +205,14 @@ def create_namespaced_horizontal_pod_autoscaler_with_http_info(self, namespace, body=body_params, post_params=form_params, files=local_var_files, - response_type='V2HorizontalPodAutoscaler', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_collection_namespaced_horizontal_pod_autoscaler(self, namespace, **kwargs): # noqa: E501 """delete_collection_namespaced_horizontal_pod_autoscaler # noqa: E501 @@ -185,35 +220,56 @@ def delete_collection_namespaced_horizontal_pod_autoscaler(self, namespace, **kw delete collection of HorizontalPodAutoscaler # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_namespaced_horizontal_pod_autoscaler(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_collection_namespaced_horizontal_pod_autoscaler_with_http_info(namespace, **kwargs) # noqa: E501 @@ -224,37 +280,64 @@ def delete_collection_namespaced_horizontal_pod_autoscaler_with_http_info(self, delete collection of HorizontalPodAutoscaler # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_namespaced_horizontal_pod_autoscaler_with_http_info(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -266,6 +349,7 @@ def delete_collection_namespaced_horizontal_pod_autoscaler_with_http_info(self, 'dry_run', 'field_selector', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'label_selector', 'limit', 'orphan_dependents', @@ -281,7 +365,10 @@ def delete_collection_namespaced_horizontal_pod_autoscaler_with_http_info(self, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -294,8 +381,7 @@ def delete_collection_namespaced_horizontal_pod_autoscaler_with_http_info(self, local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_horizontal_pod_autoscaler`") # noqa: E501 collection_formats = {} @@ -305,34 +391,36 @@ def delete_collection_namespaced_horizontal_pod_autoscaler_with_http_info(self, path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -342,11 +430,16 @@ def delete_collection_namespaced_horizontal_pod_autoscaler_with_http_info(self, body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 401: None, + } + return self.api_client.call_api( '/apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers', 'DELETE', path_params, @@ -355,13 +448,14 @@ def delete_collection_namespaced_horizontal_pod_autoscaler_with_http_info(self, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_namespaced_horizontal_pod_autoscaler(self, name, namespace, **kwargs): # noqa: E501 """delete_namespaced_horizontal_pod_autoscaler # noqa: E501 @@ -369,28 +463,42 @@ def delete_namespaced_horizontal_pod_autoscaler(self, name, namespace, **kwargs) delete a HorizontalPodAutoscaler # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_namespaced_horizontal_pod_autoscaler(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the HorizontalPodAutoscaler (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the HorizontalPodAutoscaler (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_namespaced_horizontal_pod_autoscaler_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -401,30 +509,50 @@ def delete_namespaced_horizontal_pod_autoscaler_with_http_info(self, name, names delete a HorizontalPodAutoscaler # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_namespaced_horizontal_pod_autoscaler_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the HorizontalPodAutoscaler (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the HorizontalPodAutoscaler (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -435,6 +563,7 @@ def delete_namespaced_horizontal_pod_autoscaler_with_http_info(self, name, names 'pretty', 'dry_run', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'orphan_dependents', 'propagation_policy', 'body' @@ -444,7 +573,10 @@ def delete_namespaced_horizontal_pod_autoscaler_with_http_info(self, name, names 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -457,12 +589,10 @@ def delete_namespaced_horizontal_pod_autoscaler_with_http_info(self, name, names local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_horizontal_pod_autoscaler`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_horizontal_pod_autoscaler`") # noqa: E501 collection_formats = {} @@ -474,18 +604,20 @@ def delete_namespaced_horizontal_pod_autoscaler_with_http_info(self, name, names path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -495,11 +627,17 @@ def delete_namespaced_horizontal_pod_autoscaler_with_http_info(self, name, names body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 202: "V1Status", + 401: None, + } + return self.api_client.call_api( '/apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}', 'DELETE', path_params, @@ -508,13 +646,14 @@ def delete_namespaced_horizontal_pod_autoscaler_with_http_info(self, name, names body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def get_api_resources(self, **kwargs): # noqa: E501 """get_api_resources # noqa: E501 @@ -522,20 +661,24 @@ def get_api_resources(self, **kwargs): # noqa: E501 get available resources # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_resources(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1APIResourceList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1APIResourceList """ kwargs['_return_http_data_only'] = True return self.get_api_resources_with_http_info(**kwargs) # noqa: E501 @@ -546,22 +689,32 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 get available resources # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_resources_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -573,7 +726,10 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -592,7 +748,7 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -600,11 +756,16 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1APIResourceList", + 401: None, + } + return self.api_client.call_api( '/apis/autoscaling/v2/', 'GET', path_params, @@ -613,13 +774,14 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1APIResourceList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_horizontal_pod_autoscaler_for_all_namespaces(self, **kwargs): # noqa: E501 """list_horizontal_pod_autoscaler_for_all_namespaces # noqa: E501 @@ -627,31 +789,46 @@ def list_horizontal_pod_autoscaler_for_all_namespaces(self, **kwargs): # noqa: list or watch objects of kind HorizontalPodAutoscaler # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_horizontal_pod_autoscaler_for_all_namespaces(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V2HorizontalPodAutoscalerList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V2HorizontalPodAutoscalerList """ kwargs['_return_http_data_only'] = True return self.list_horizontal_pod_autoscaler_for_all_namespaces_with_http_info(**kwargs) # noqa: E501 @@ -662,33 +839,54 @@ def list_horizontal_pod_autoscaler_for_all_namespaces_with_http_info(self, **kwa list or watch objects of kind HorizontalPodAutoscaler # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_horizontal_pod_autoscaler_for_all_namespaces_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V2HorizontalPodAutoscalerList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V2HorizontalPodAutoscalerList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -711,7 +909,10 @@ def list_horizontal_pod_autoscaler_for_all_namespaces_with_http_info(self, **kwa 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -729,30 +930,30 @@ def list_horizontal_pod_autoscaler_for_all_namespaces_with_http_info(self, **kwa path_params = {} query_params = [] - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -760,11 +961,16 @@ def list_horizontal_pod_autoscaler_for_all_namespaces_with_http_info(self, **kwa body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V2HorizontalPodAutoscalerList", + 401: None, + } + return self.api_client.call_api( '/apis/autoscaling/v2/horizontalpodautoscalers', 'GET', path_params, @@ -773,13 +979,14 @@ def list_horizontal_pod_autoscaler_for_all_namespaces_with_http_info(self, **kwa body=body_params, post_params=form_params, files=local_var_files, - response_type='V2HorizontalPodAutoscalerList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_namespaced_horizontal_pod_autoscaler(self, namespace, **kwargs): # noqa: E501 """list_namespaced_horizontal_pod_autoscaler # noqa: E501 @@ -787,32 +994,48 @@ def list_namespaced_horizontal_pod_autoscaler(self, namespace, **kwargs): # noq list or watch objects of kind HorizontalPodAutoscaler # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_namespaced_horizontal_pod_autoscaler(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V2HorizontalPodAutoscalerList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V2HorizontalPodAutoscalerList """ kwargs['_return_http_data_only'] = True return self.list_namespaced_horizontal_pod_autoscaler_with_http_info(namespace, **kwargs) # noqa: E501 @@ -823,34 +1046,56 @@ def list_namespaced_horizontal_pod_autoscaler_with_http_info(self, namespace, ** list or watch objects of kind HorizontalPodAutoscaler # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_namespaced_horizontal_pod_autoscaler_with_http_info(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V2HorizontalPodAutoscalerList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V2HorizontalPodAutoscalerList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -874,7 +1119,10 @@ def list_namespaced_horizontal_pod_autoscaler_with_http_info(self, namespace, ** 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -887,8 +1135,7 @@ def list_namespaced_horizontal_pod_autoscaler_with_http_info(self, namespace, ** local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_horizontal_pod_autoscaler`") # noqa: E501 collection_formats = {} @@ -898,30 +1145,30 @@ def list_namespaced_horizontal_pod_autoscaler_with_http_info(self, namespace, ** path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -929,11 +1176,16 @@ def list_namespaced_horizontal_pod_autoscaler_with_http_info(self, namespace, ** body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V2HorizontalPodAutoscalerList", + 401: None, + } + return self.api_client.call_api( '/apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers', 'GET', path_params, @@ -942,13 +1194,14 @@ def list_namespaced_horizontal_pod_autoscaler_with_http_info(self, namespace, ** body=body_params, post_params=form_params, files=local_var_files, - response_type='V2HorizontalPodAutoscalerList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_namespaced_horizontal_pod_autoscaler(self, name, namespace, body, **kwargs): # noqa: E501 """patch_namespaced_horizontal_pod_autoscaler # noqa: E501 @@ -956,28 +1209,40 @@ def patch_namespaced_horizontal_pod_autoscaler(self, name, namespace, body, **kw partially update the specified HorizontalPodAutoscaler # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_horizontal_pod_autoscaler(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the HorizontalPodAutoscaler (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the HorizontalPodAutoscaler (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V2HorizontalPodAutoscaler + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V2HorizontalPodAutoscaler """ kwargs['_return_http_data_only'] = True return self.patch_namespaced_horizontal_pod_autoscaler_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -988,30 +1253,48 @@ def patch_namespaced_horizontal_pod_autoscaler_with_http_info(self, name, namesp partially update the specified HorizontalPodAutoscaler # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_horizontal_pod_autoscaler_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the HorizontalPodAutoscaler (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the HorizontalPodAutoscaler (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V2HorizontalPodAutoscaler, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V2HorizontalPodAutoscaler, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1031,7 +1314,10 @@ def patch_namespaced_horizontal_pod_autoscaler_with_http_info(self, name, namesp 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1044,16 +1330,13 @@ def patch_namespaced_horizontal_pod_autoscaler_with_http_info(self, name, namesp local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_horizontal_pod_autoscaler`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_horizontal_pod_autoscaler`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_horizontal_pod_autoscaler`") # noqa: E501 collection_formats = {} @@ -1065,18 +1348,18 @@ def patch_namespaced_horizontal_pod_autoscaler_with_http_info(self, name, namesp path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1086,15 +1369,25 @@ def patch_namespaced_horizontal_pod_autoscaler_with_http_info(self, name, namesp body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V2HorizontalPodAutoscaler", + 201: "V2HorizontalPodAutoscaler", + 401: None, + } + return self.api_client.call_api( '/apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}', 'PATCH', path_params, @@ -1103,13 +1396,14 @@ def patch_namespaced_horizontal_pod_autoscaler_with_http_info(self, name, namesp body=body_params, post_params=form_params, files=local_var_files, - response_type='V2HorizontalPodAutoscaler', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_namespaced_horizontal_pod_autoscaler_status(self, name, namespace, body, **kwargs): # noqa: E501 """patch_namespaced_horizontal_pod_autoscaler_status # noqa: E501 @@ -1117,28 +1411,40 @@ def patch_namespaced_horizontal_pod_autoscaler_status(self, name, namespace, bod partially update status of the specified HorizontalPodAutoscaler # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_horizontal_pod_autoscaler_status(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the HorizontalPodAutoscaler (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the HorizontalPodAutoscaler (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V2HorizontalPodAutoscaler + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V2HorizontalPodAutoscaler """ kwargs['_return_http_data_only'] = True return self.patch_namespaced_horizontal_pod_autoscaler_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -1149,30 +1455,48 @@ def patch_namespaced_horizontal_pod_autoscaler_status_with_http_info(self, name, partially update status of the specified HorizontalPodAutoscaler # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_horizontal_pod_autoscaler_status_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the HorizontalPodAutoscaler (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the HorizontalPodAutoscaler (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V2HorizontalPodAutoscaler, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V2HorizontalPodAutoscaler, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1192,7 +1516,10 @@ def patch_namespaced_horizontal_pod_autoscaler_status_with_http_info(self, name, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1205,16 +1532,13 @@ def patch_namespaced_horizontal_pod_autoscaler_status_with_http_info(self, name, local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_horizontal_pod_autoscaler_status`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_horizontal_pod_autoscaler_status`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_horizontal_pod_autoscaler_status`") # noqa: E501 collection_formats = {} @@ -1226,18 +1550,18 @@ def patch_namespaced_horizontal_pod_autoscaler_status_with_http_info(self, name, path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1247,15 +1571,25 @@ def patch_namespaced_horizontal_pod_autoscaler_status_with_http_info(self, name, body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V2HorizontalPodAutoscaler", + 201: "V2HorizontalPodAutoscaler", + 401: None, + } + return self.api_client.call_api( '/apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}/status', 'PATCH', path_params, @@ -1264,13 +1598,14 @@ def patch_namespaced_horizontal_pod_autoscaler_status_with_http_info(self, name, body=body_params, post_params=form_params, files=local_var_files, - response_type='V2HorizontalPodAutoscaler', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_namespaced_horizontal_pod_autoscaler(self, name, namespace, **kwargs): # noqa: E501 """read_namespaced_horizontal_pod_autoscaler # noqa: E501 @@ -1278,23 +1613,30 @@ def read_namespaced_horizontal_pod_autoscaler(self, name, namespace, **kwargs): read the specified HorizontalPodAutoscaler # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_horizontal_pod_autoscaler(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the HorizontalPodAutoscaler (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the HorizontalPodAutoscaler (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V2HorizontalPodAutoscaler + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V2HorizontalPodAutoscaler """ kwargs['_return_http_data_only'] = True return self.read_namespaced_horizontal_pod_autoscaler_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -1305,25 +1647,38 @@ def read_namespaced_horizontal_pod_autoscaler_with_http_info(self, name, namespa read the specified HorizontalPodAutoscaler # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_horizontal_pod_autoscaler_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the HorizontalPodAutoscaler (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the HorizontalPodAutoscaler (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V2HorizontalPodAutoscaler, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V2HorizontalPodAutoscaler, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1338,7 +1693,10 @@ def read_namespaced_horizontal_pod_autoscaler_with_http_info(self, name, namespa 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1351,12 +1709,10 @@ def read_namespaced_horizontal_pod_autoscaler_with_http_info(self, name, namespa local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_horizontal_pod_autoscaler`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_horizontal_pod_autoscaler`") # noqa: E501 collection_formats = {} @@ -1368,10 +1724,10 @@ def read_namespaced_horizontal_pod_autoscaler_with_http_info(self, name, namespa path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1379,11 +1735,16 @@ def read_namespaced_horizontal_pod_autoscaler_with_http_info(self, name, namespa body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V2HorizontalPodAutoscaler", + 401: None, + } + return self.api_client.call_api( '/apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}', 'GET', path_params, @@ -1392,13 +1753,14 @@ def read_namespaced_horizontal_pod_autoscaler_with_http_info(self, name, namespa body=body_params, post_params=form_params, files=local_var_files, - response_type='V2HorizontalPodAutoscaler', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_namespaced_horizontal_pod_autoscaler_status(self, name, namespace, **kwargs): # noqa: E501 """read_namespaced_horizontal_pod_autoscaler_status # noqa: E501 @@ -1406,23 +1768,30 @@ def read_namespaced_horizontal_pod_autoscaler_status(self, name, namespace, **kw read status of the specified HorizontalPodAutoscaler # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_horizontal_pod_autoscaler_status(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the HorizontalPodAutoscaler (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the HorizontalPodAutoscaler (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V2HorizontalPodAutoscaler + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V2HorizontalPodAutoscaler """ kwargs['_return_http_data_only'] = True return self.read_namespaced_horizontal_pod_autoscaler_status_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -1433,25 +1802,38 @@ def read_namespaced_horizontal_pod_autoscaler_status_with_http_info(self, name, read status of the specified HorizontalPodAutoscaler # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_horizontal_pod_autoscaler_status_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the HorizontalPodAutoscaler (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the HorizontalPodAutoscaler (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V2HorizontalPodAutoscaler, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V2HorizontalPodAutoscaler, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1466,7 +1848,10 @@ def read_namespaced_horizontal_pod_autoscaler_status_with_http_info(self, name, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1479,12 +1864,10 @@ def read_namespaced_horizontal_pod_autoscaler_status_with_http_info(self, name, local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_horizontal_pod_autoscaler_status`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_horizontal_pod_autoscaler_status`") # noqa: E501 collection_formats = {} @@ -1496,10 +1879,10 @@ def read_namespaced_horizontal_pod_autoscaler_status_with_http_info(self, name, path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1507,11 +1890,16 @@ def read_namespaced_horizontal_pod_autoscaler_status_with_http_info(self, name, body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V2HorizontalPodAutoscaler", + 401: None, + } + return self.api_client.call_api( '/apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}/status', 'GET', path_params, @@ -1520,13 +1908,14 @@ def read_namespaced_horizontal_pod_autoscaler_status_with_http_info(self, name, body=body_params, post_params=form_params, files=local_var_files, - response_type='V2HorizontalPodAutoscaler', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_namespaced_horizontal_pod_autoscaler(self, name, namespace, body, **kwargs): # noqa: E501 """replace_namespaced_horizontal_pod_autoscaler # noqa: E501 @@ -1534,27 +1923,38 @@ def replace_namespaced_horizontal_pod_autoscaler(self, name, namespace, body, ** replace the specified HorizontalPodAutoscaler # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_horizontal_pod_autoscaler(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the HorizontalPodAutoscaler (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V2HorizontalPodAutoscaler body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the HorizontalPodAutoscaler (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V2HorizontalPodAutoscaler + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V2HorizontalPodAutoscaler + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V2HorizontalPodAutoscaler """ kwargs['_return_http_data_only'] = True return self.replace_namespaced_horizontal_pod_autoscaler_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -1565,29 +1965,46 @@ def replace_namespaced_horizontal_pod_autoscaler_with_http_info(self, name, name replace the specified HorizontalPodAutoscaler # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_horizontal_pod_autoscaler_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the HorizontalPodAutoscaler (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V2HorizontalPodAutoscaler body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the HorizontalPodAutoscaler (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V2HorizontalPodAutoscaler + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V2HorizontalPodAutoscaler, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V2HorizontalPodAutoscaler, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1606,7 +2023,10 @@ def replace_namespaced_horizontal_pod_autoscaler_with_http_info(self, name, name 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1619,16 +2039,13 @@ def replace_namespaced_horizontal_pod_autoscaler_with_http_info(self, name, name local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_horizontal_pod_autoscaler`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_horizontal_pod_autoscaler`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_horizontal_pod_autoscaler`") # noqa: E501 collection_formats = {} @@ -1640,16 +2057,16 @@ def replace_namespaced_horizontal_pod_autoscaler_with_http_info(self, name, name path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1659,11 +2076,17 @@ def replace_namespaced_horizontal_pod_autoscaler_with_http_info(self, name, name body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V2HorizontalPodAutoscaler", + 201: "V2HorizontalPodAutoscaler", + 401: None, + } + return self.api_client.call_api( '/apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}', 'PUT', path_params, @@ -1672,13 +2095,14 @@ def replace_namespaced_horizontal_pod_autoscaler_with_http_info(self, name, name body=body_params, post_params=form_params, files=local_var_files, - response_type='V2HorizontalPodAutoscaler', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_namespaced_horizontal_pod_autoscaler_status(self, name, namespace, body, **kwargs): # noqa: E501 """replace_namespaced_horizontal_pod_autoscaler_status # noqa: E501 @@ -1686,27 +2110,38 @@ def replace_namespaced_horizontal_pod_autoscaler_status(self, name, namespace, b replace status of the specified HorizontalPodAutoscaler # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_horizontal_pod_autoscaler_status(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the HorizontalPodAutoscaler (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V2HorizontalPodAutoscaler body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the HorizontalPodAutoscaler (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V2HorizontalPodAutoscaler + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V2HorizontalPodAutoscaler + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V2HorizontalPodAutoscaler """ kwargs['_return_http_data_only'] = True return self.replace_namespaced_horizontal_pod_autoscaler_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -1717,29 +2152,46 @@ def replace_namespaced_horizontal_pod_autoscaler_status_with_http_info(self, nam replace status of the specified HorizontalPodAutoscaler # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_horizontal_pod_autoscaler_status_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the HorizontalPodAutoscaler (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V2HorizontalPodAutoscaler body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the HorizontalPodAutoscaler (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V2HorizontalPodAutoscaler + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V2HorizontalPodAutoscaler, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V2HorizontalPodAutoscaler, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1758,7 +2210,10 @@ def replace_namespaced_horizontal_pod_autoscaler_status_with_http_info(self, nam 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1771,16 +2226,13 @@ def replace_namespaced_horizontal_pod_autoscaler_status_with_http_info(self, nam local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_horizontal_pod_autoscaler_status`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_horizontal_pod_autoscaler_status`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_horizontal_pod_autoscaler_status`") # noqa: E501 collection_formats = {} @@ -1792,16 +2244,16 @@ def replace_namespaced_horizontal_pod_autoscaler_status_with_http_info(self, nam path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1811,11 +2263,17 @@ def replace_namespaced_horizontal_pod_autoscaler_status_with_http_info(self, nam body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V2HorizontalPodAutoscaler", + 201: "V2HorizontalPodAutoscaler", + 401: None, + } + return self.api_client.call_api( '/apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}/status', 'PUT', path_params, @@ -1824,10 +2282,11 @@ def replace_namespaced_horizontal_pod_autoscaler_status_with_http_info(self, nam body=body_params, post_params=form_params, files=local_var_files, - response_type='V2HorizontalPodAutoscaler', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) diff --git a/kubernetes/client/api/batch_api.py b/kubernetes/client/api/batch_api.py index b62f7b81b1..fec0323b0d 100644 --- a/kubernetes/client/api/batch_api.py +++ b/kubernetes/client/api/batch_api.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ @@ -42,20 +42,24 @@ def get_api_group(self, **kwargs): # noqa: E501 get information of a group # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_group(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1APIGroup + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1APIGroup """ kwargs['_return_http_data_only'] = True return self.get_api_group_with_http_info(**kwargs) # noqa: E501 @@ -66,22 +70,32 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 get information of a group # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_group_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1APIGroup, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1APIGroup, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -93,7 +107,10 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -112,7 +129,7 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -125,6 +142,11 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1APIGroup", + 401: None, + } + return self.api_client.call_api( '/apis/batch/', 'GET', path_params, @@ -133,10 +155,11 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1APIGroup', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) diff --git a/kubernetes/client/api/batch_v1_api.py b/kubernetes/client/api/batch_v1_api.py index 5763c0ec85..50ef107763 100644 --- a/kubernetes/client/api/batch_v1_api.py +++ b/kubernetes/client/api/batch_v1_api.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ @@ -42,26 +42,36 @@ def create_namespaced_cron_job(self, namespace, body, **kwargs): # noqa: E501 create a CronJob # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_namespaced_cron_job(namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1CronJob body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1CronJob + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1CronJob + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1CronJob """ kwargs['_return_http_data_only'] = True return self.create_namespaced_cron_job_with_http_info(namespace, body, **kwargs) # noqa: E501 @@ -72,28 +82,44 @@ def create_namespaced_cron_job_with_http_info(self, namespace, body, **kwargs): create a CronJob # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_namespaced_cron_job_with_http_info(namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1CronJob body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1CronJob + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1CronJob, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1CronJob, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -111,7 +137,10 @@ def create_namespaced_cron_job_with_http_info(self, namespace, body, **kwargs): 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -124,12 +153,10 @@ def create_namespaced_cron_job_with_http_info(self, namespace, body, **kwargs): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_cron_job`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_cron_job`") # noqa: E501 collection_formats = {} @@ -139,16 +166,16 @@ def create_namespaced_cron_job_with_http_info(self, namespace, body, **kwargs): path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -158,11 +185,18 @@ def create_namespaced_cron_job_with_http_info(self, namespace, body, **kwargs): body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1CronJob", + 201: "V1CronJob", + 202: "V1CronJob", + 401: None, + } + return self.api_client.call_api( '/apis/batch/v1/namespaces/{namespace}/cronjobs', 'POST', path_params, @@ -171,13 +205,14 @@ def create_namespaced_cron_job_with_http_info(self, namespace, body, **kwargs): body=body_params, post_params=form_params, files=local_var_files, - response_type='V1CronJob', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def create_namespaced_job(self, namespace, body, **kwargs): # noqa: E501 """create_namespaced_job # noqa: E501 @@ -185,26 +220,36 @@ def create_namespaced_job(self, namespace, body, **kwargs): # noqa: E501 create a Job # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_namespaced_job(namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1Job body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1Job + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Job + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Job """ kwargs['_return_http_data_only'] = True return self.create_namespaced_job_with_http_info(namespace, body, **kwargs) # noqa: E501 @@ -215,28 +260,44 @@ def create_namespaced_job_with_http_info(self, namespace, body, **kwargs): # no create a Job # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_namespaced_job_with_http_info(namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1Job body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1Job + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Job, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Job, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -254,7 +315,10 @@ def create_namespaced_job_with_http_info(self, namespace, body, **kwargs): # no 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -267,12 +331,10 @@ def create_namespaced_job_with_http_info(self, namespace, body, **kwargs): # no local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_job`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_job`") # noqa: E501 collection_formats = {} @@ -282,16 +344,16 @@ def create_namespaced_job_with_http_info(self, namespace, body, **kwargs): # no path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -301,11 +363,18 @@ def create_namespaced_job_with_http_info(self, namespace, body, **kwargs): # no body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Job", + 201: "V1Job", + 202: "V1Job", + 401: None, + } + return self.api_client.call_api( '/apis/batch/v1/namespaces/{namespace}/jobs', 'POST', path_params, @@ -314,13 +383,14 @@ def create_namespaced_job_with_http_info(self, namespace, body, **kwargs): # no body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Job', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_collection_namespaced_cron_job(self, namespace, **kwargs): # noqa: E501 """delete_collection_namespaced_cron_job # noqa: E501 @@ -328,35 +398,56 @@ def delete_collection_namespaced_cron_job(self, namespace, **kwargs): # noqa: E delete collection of CronJob # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_namespaced_cron_job(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_collection_namespaced_cron_job_with_http_info(namespace, **kwargs) # noqa: E501 @@ -367,37 +458,64 @@ def delete_collection_namespaced_cron_job_with_http_info(self, namespace, **kwar delete collection of CronJob # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_namespaced_cron_job_with_http_info(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -409,6 +527,7 @@ def delete_collection_namespaced_cron_job_with_http_info(self, namespace, **kwar 'dry_run', 'field_selector', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'label_selector', 'limit', 'orphan_dependents', @@ -424,7 +543,10 @@ def delete_collection_namespaced_cron_job_with_http_info(self, namespace, **kwar 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -437,8 +559,7 @@ def delete_collection_namespaced_cron_job_with_http_info(self, namespace, **kwar local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_cron_job`") # noqa: E501 collection_formats = {} @@ -448,34 +569,36 @@ def delete_collection_namespaced_cron_job_with_http_info(self, namespace, **kwar path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -485,11 +608,16 @@ def delete_collection_namespaced_cron_job_with_http_info(self, namespace, **kwar body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 401: None, + } + return self.api_client.call_api( '/apis/batch/v1/namespaces/{namespace}/cronjobs', 'DELETE', path_params, @@ -498,13 +626,14 @@ def delete_collection_namespaced_cron_job_with_http_info(self, namespace, **kwar body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_collection_namespaced_job(self, namespace, **kwargs): # noqa: E501 """delete_collection_namespaced_job # noqa: E501 @@ -512,35 +641,56 @@ def delete_collection_namespaced_job(self, namespace, **kwargs): # noqa: E501 delete collection of Job # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_namespaced_job(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_collection_namespaced_job_with_http_info(namespace, **kwargs) # noqa: E501 @@ -551,37 +701,64 @@ def delete_collection_namespaced_job_with_http_info(self, namespace, **kwargs): delete collection of Job # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_namespaced_job_with_http_info(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -593,6 +770,7 @@ def delete_collection_namespaced_job_with_http_info(self, namespace, **kwargs): 'dry_run', 'field_selector', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'label_selector', 'limit', 'orphan_dependents', @@ -608,7 +786,10 @@ def delete_collection_namespaced_job_with_http_info(self, namespace, **kwargs): 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -621,8 +802,7 @@ def delete_collection_namespaced_job_with_http_info(self, namespace, **kwargs): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_job`") # noqa: E501 collection_formats = {} @@ -632,34 +812,36 @@ def delete_collection_namespaced_job_with_http_info(self, namespace, **kwargs): path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -669,11 +851,16 @@ def delete_collection_namespaced_job_with_http_info(self, namespace, **kwargs): body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 401: None, + } + return self.api_client.call_api( '/apis/batch/v1/namespaces/{namespace}/jobs', 'DELETE', path_params, @@ -682,13 +869,14 @@ def delete_collection_namespaced_job_with_http_info(self, namespace, **kwargs): body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_namespaced_cron_job(self, name, namespace, **kwargs): # noqa: E501 """delete_namespaced_cron_job # noqa: E501 @@ -696,28 +884,42 @@ def delete_namespaced_cron_job(self, name, namespace, **kwargs): # noqa: E501 delete a CronJob # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_namespaced_cron_job(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the CronJob (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the CronJob (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_namespaced_cron_job_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -728,30 +930,50 @@ def delete_namespaced_cron_job_with_http_info(self, name, namespace, **kwargs): delete a CronJob # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_namespaced_cron_job_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the CronJob (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the CronJob (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -762,6 +984,7 @@ def delete_namespaced_cron_job_with_http_info(self, name, namespace, **kwargs): 'pretty', 'dry_run', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'orphan_dependents', 'propagation_policy', 'body' @@ -771,7 +994,10 @@ def delete_namespaced_cron_job_with_http_info(self, name, namespace, **kwargs): 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -784,12 +1010,10 @@ def delete_namespaced_cron_job_with_http_info(self, name, namespace, **kwargs): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_cron_job`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_cron_job`") # noqa: E501 collection_formats = {} @@ -801,18 +1025,20 @@ def delete_namespaced_cron_job_with_http_info(self, name, namespace, **kwargs): path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -822,11 +1048,17 @@ def delete_namespaced_cron_job_with_http_info(self, name, namespace, **kwargs): body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 202: "V1Status", + 401: None, + } + return self.api_client.call_api( '/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}', 'DELETE', path_params, @@ -835,13 +1067,14 @@ def delete_namespaced_cron_job_with_http_info(self, name, namespace, **kwargs): body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_namespaced_job(self, name, namespace, **kwargs): # noqa: E501 """delete_namespaced_job # noqa: E501 @@ -849,28 +1082,42 @@ def delete_namespaced_job(self, name, namespace, **kwargs): # noqa: E501 delete a Job # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_namespaced_job(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Job (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the Job (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_namespaced_job_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -881,30 +1128,50 @@ def delete_namespaced_job_with_http_info(self, name, namespace, **kwargs): # no delete a Job # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_namespaced_job_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Job (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the Job (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -915,6 +1182,7 @@ def delete_namespaced_job_with_http_info(self, name, namespace, **kwargs): # no 'pretty', 'dry_run', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'orphan_dependents', 'propagation_policy', 'body' @@ -924,7 +1192,10 @@ def delete_namespaced_job_with_http_info(self, name, namespace, **kwargs): # no 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -937,12 +1208,10 @@ def delete_namespaced_job_with_http_info(self, name, namespace, **kwargs): # no local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_job`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_job`") # noqa: E501 collection_formats = {} @@ -954,18 +1223,20 @@ def delete_namespaced_job_with_http_info(self, name, namespace, **kwargs): # no path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -975,11 +1246,17 @@ def delete_namespaced_job_with_http_info(self, name, namespace, **kwargs): # no body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 202: "V1Status", + 401: None, + } + return self.api_client.call_api( '/apis/batch/v1/namespaces/{namespace}/jobs/{name}', 'DELETE', path_params, @@ -988,13 +1265,14 @@ def delete_namespaced_job_with_http_info(self, name, namespace, **kwargs): # no body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def get_api_resources(self, **kwargs): # noqa: E501 """get_api_resources # noqa: E501 @@ -1002,20 +1280,24 @@ def get_api_resources(self, **kwargs): # noqa: E501 get available resources # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_resources(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1APIResourceList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1APIResourceList """ kwargs['_return_http_data_only'] = True return self.get_api_resources_with_http_info(**kwargs) # noqa: E501 @@ -1026,22 +1308,32 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 get available resources # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_resources_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1053,7 +1345,10 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1072,7 +1367,7 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1080,11 +1375,16 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1APIResourceList", + 401: None, + } + return self.api_client.call_api( '/apis/batch/v1/', 'GET', path_params, @@ -1093,13 +1393,14 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1APIResourceList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_cron_job_for_all_namespaces(self, **kwargs): # noqa: E501 """list_cron_job_for_all_namespaces # noqa: E501 @@ -1107,31 +1408,46 @@ def list_cron_job_for_all_namespaces(self, **kwargs): # noqa: E501 list or watch objects of kind CronJob # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_cron_job_for_all_namespaces(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1CronJobList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1CronJobList """ kwargs['_return_http_data_only'] = True return self.list_cron_job_for_all_namespaces_with_http_info(**kwargs) # noqa: E501 @@ -1142,33 +1458,54 @@ def list_cron_job_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E5 list or watch objects of kind CronJob # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_cron_job_for_all_namespaces_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1CronJobList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1CronJobList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1191,7 +1528,10 @@ def list_cron_job_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E5 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1209,30 +1549,30 @@ def list_cron_job_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E5 path_params = {} query_params = [] - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1240,11 +1580,16 @@ def list_cron_job_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E5 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1CronJobList", + 401: None, + } + return self.api_client.call_api( '/apis/batch/v1/cronjobs', 'GET', path_params, @@ -1253,13 +1598,14 @@ def list_cron_job_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E5 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1CronJobList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_job_for_all_namespaces(self, **kwargs): # noqa: E501 """list_job_for_all_namespaces # noqa: E501 @@ -1267,31 +1613,46 @@ def list_job_for_all_namespaces(self, **kwargs): # noqa: E501 list or watch objects of kind Job # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_job_for_all_namespaces(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1JobList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1JobList """ kwargs['_return_http_data_only'] = True return self.list_job_for_all_namespaces_with_http_info(**kwargs) # noqa: E501 @@ -1302,33 +1663,54 @@ def list_job_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501 list or watch objects of kind Job # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_job_for_all_namespaces_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1JobList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1JobList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1351,7 +1733,10 @@ def list_job_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1369,30 +1754,30 @@ def list_job_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1400,11 +1785,16 @@ def list_job_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1JobList", + 401: None, + } + return self.api_client.call_api( '/apis/batch/v1/jobs', 'GET', path_params, @@ -1413,13 +1803,14 @@ def list_job_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1JobList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_namespaced_cron_job(self, namespace, **kwargs): # noqa: E501 """list_namespaced_cron_job # noqa: E501 @@ -1427,32 +1818,48 @@ def list_namespaced_cron_job(self, namespace, **kwargs): # noqa: E501 list or watch objects of kind CronJob # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_namespaced_cron_job(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1CronJobList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1CronJobList """ kwargs['_return_http_data_only'] = True return self.list_namespaced_cron_job_with_http_info(namespace, **kwargs) # noqa: E501 @@ -1463,34 +1870,56 @@ def list_namespaced_cron_job_with_http_info(self, namespace, **kwargs): # noqa: list or watch objects of kind CronJob # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_namespaced_cron_job_with_http_info(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1CronJobList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1CronJobList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1514,7 +1943,10 @@ def list_namespaced_cron_job_with_http_info(self, namespace, **kwargs): # noqa: 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1527,8 +1959,7 @@ def list_namespaced_cron_job_with_http_info(self, namespace, **kwargs): # noqa: local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_cron_job`") # noqa: E501 collection_formats = {} @@ -1538,30 +1969,30 @@ def list_namespaced_cron_job_with_http_info(self, namespace, **kwargs): # noqa: path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1569,11 +2000,16 @@ def list_namespaced_cron_job_with_http_info(self, namespace, **kwargs): # noqa: body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1CronJobList", + 401: None, + } + return self.api_client.call_api( '/apis/batch/v1/namespaces/{namespace}/cronjobs', 'GET', path_params, @@ -1582,13 +2018,14 @@ def list_namespaced_cron_job_with_http_info(self, namespace, **kwargs): # noqa: body=body_params, post_params=form_params, files=local_var_files, - response_type='V1CronJobList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_namespaced_job(self, namespace, **kwargs): # noqa: E501 """list_namespaced_job # noqa: E501 @@ -1596,32 +2033,48 @@ def list_namespaced_job(self, namespace, **kwargs): # noqa: E501 list or watch objects of kind Job # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_namespaced_job(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1JobList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1JobList """ kwargs['_return_http_data_only'] = True return self.list_namespaced_job_with_http_info(namespace, **kwargs) # noqa: E501 @@ -1632,34 +2085,56 @@ def list_namespaced_job_with_http_info(self, namespace, **kwargs): # noqa: E501 list or watch objects of kind Job # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_namespaced_job_with_http_info(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1JobList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1JobList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1683,7 +2158,10 @@ def list_namespaced_job_with_http_info(self, namespace, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1696,8 +2174,7 @@ def list_namespaced_job_with_http_info(self, namespace, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_job`") # noqa: E501 collection_formats = {} @@ -1707,30 +2184,30 @@ def list_namespaced_job_with_http_info(self, namespace, **kwargs): # noqa: E501 path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1738,11 +2215,16 @@ def list_namespaced_job_with_http_info(self, namespace, **kwargs): # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1JobList", + 401: None, + } + return self.api_client.call_api( '/apis/batch/v1/namespaces/{namespace}/jobs', 'GET', path_params, @@ -1751,13 +2233,14 @@ def list_namespaced_job_with_http_info(self, namespace, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1JobList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_namespaced_cron_job(self, name, namespace, body, **kwargs): # noqa: E501 """patch_namespaced_cron_job # noqa: E501 @@ -1765,28 +2248,40 @@ def patch_namespaced_cron_job(self, name, namespace, body, **kwargs): # noqa: E partially update the specified CronJob # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_cron_job(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the CronJob (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the CronJob (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1CronJob + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1CronJob """ kwargs['_return_http_data_only'] = True return self.patch_namespaced_cron_job_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -1797,30 +2292,48 @@ def patch_namespaced_cron_job_with_http_info(self, name, namespace, body, **kwar partially update the specified CronJob # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_cron_job_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the CronJob (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the CronJob (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1CronJob, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1CronJob, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1840,7 +2353,10 @@ def patch_namespaced_cron_job_with_http_info(self, name, namespace, body, **kwar 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1853,16 +2369,13 @@ def patch_namespaced_cron_job_with_http_info(self, name, namespace, body, **kwar local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_cron_job`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_cron_job`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_cron_job`") # noqa: E501 collection_formats = {} @@ -1874,18 +2387,18 @@ def patch_namespaced_cron_job_with_http_info(self, name, namespace, body, **kwar path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1895,15 +2408,25 @@ def patch_namespaced_cron_job_with_http_info(self, name, namespace, body, **kwar body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1CronJob", + 201: "V1CronJob", + 401: None, + } + return self.api_client.call_api( '/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}', 'PATCH', path_params, @@ -1912,13 +2435,14 @@ def patch_namespaced_cron_job_with_http_info(self, name, namespace, body, **kwar body=body_params, post_params=form_params, files=local_var_files, - response_type='V1CronJob', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_namespaced_cron_job_status(self, name, namespace, body, **kwargs): # noqa: E501 """patch_namespaced_cron_job_status # noqa: E501 @@ -1926,28 +2450,40 @@ def patch_namespaced_cron_job_status(self, name, namespace, body, **kwargs): # partially update status of the specified CronJob # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_cron_job_status(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the CronJob (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the CronJob (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1CronJob + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1CronJob """ kwargs['_return_http_data_only'] = True return self.patch_namespaced_cron_job_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -1958,30 +2494,48 @@ def patch_namespaced_cron_job_status_with_http_info(self, name, namespace, body, partially update status of the specified CronJob # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_cron_job_status_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the CronJob (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the CronJob (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1CronJob, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1CronJob, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -2001,7 +2555,10 @@ def patch_namespaced_cron_job_status_with_http_info(self, name, namespace, body, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2014,16 +2571,13 @@ def patch_namespaced_cron_job_status_with_http_info(self, name, namespace, body, local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_cron_job_status`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_cron_job_status`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_cron_job_status`") # noqa: E501 collection_formats = {} @@ -2035,18 +2589,18 @@ def patch_namespaced_cron_job_status_with_http_info(self, name, namespace, body, path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2056,15 +2610,25 @@ def patch_namespaced_cron_job_status_with_http_info(self, name, namespace, body, body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1CronJob", + 201: "V1CronJob", + 401: None, + } + return self.api_client.call_api( '/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}/status', 'PATCH', path_params, @@ -2073,13 +2637,14 @@ def patch_namespaced_cron_job_status_with_http_info(self, name, namespace, body, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1CronJob', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_namespaced_job(self, name, namespace, body, **kwargs): # noqa: E501 """patch_namespaced_job # noqa: E501 @@ -2087,28 +2652,40 @@ def patch_namespaced_job(self, name, namespace, body, **kwargs): # noqa: E501 partially update the specified Job # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_job(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Job (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the Job (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Job + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Job """ kwargs['_return_http_data_only'] = True return self.patch_namespaced_job_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -2119,30 +2696,48 @@ def patch_namespaced_job_with_http_info(self, name, namespace, body, **kwargs): partially update the specified Job # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_job_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Job (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the Job (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Job, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Job, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -2162,7 +2757,10 @@ def patch_namespaced_job_with_http_info(self, name, namespace, body, **kwargs): 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2175,16 +2773,13 @@ def patch_namespaced_job_with_http_info(self, name, namespace, body, **kwargs): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_job`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_job`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_job`") # noqa: E501 collection_formats = {} @@ -2196,18 +2791,18 @@ def patch_namespaced_job_with_http_info(self, name, namespace, body, **kwargs): path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2217,15 +2812,25 @@ def patch_namespaced_job_with_http_info(self, name, namespace, body, **kwargs): body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Job", + 201: "V1Job", + 401: None, + } + return self.api_client.call_api( '/apis/batch/v1/namespaces/{namespace}/jobs/{name}', 'PATCH', path_params, @@ -2234,13 +2839,14 @@ def patch_namespaced_job_with_http_info(self, name, namespace, body, **kwargs): body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Job', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_namespaced_job_status(self, name, namespace, body, **kwargs): # noqa: E501 """patch_namespaced_job_status # noqa: E501 @@ -2248,28 +2854,40 @@ def patch_namespaced_job_status(self, name, namespace, body, **kwargs): # noqa: partially update status of the specified Job # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_job_status(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Job (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the Job (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Job + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Job """ kwargs['_return_http_data_only'] = True return self.patch_namespaced_job_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -2280,30 +2898,48 @@ def patch_namespaced_job_status_with_http_info(self, name, namespace, body, **kw partially update status of the specified Job # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_job_status_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Job (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the Job (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Job, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Job, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -2323,7 +2959,10 @@ def patch_namespaced_job_status_with_http_info(self, name, namespace, body, **kw 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2336,16 +2975,13 @@ def patch_namespaced_job_status_with_http_info(self, name, namespace, body, **kw local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_job_status`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_job_status`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_job_status`") # noqa: E501 collection_formats = {} @@ -2357,18 +2993,18 @@ def patch_namespaced_job_status_with_http_info(self, name, namespace, body, **kw path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2378,15 +3014,25 @@ def patch_namespaced_job_status_with_http_info(self, name, namespace, body, **kw body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Job", + 201: "V1Job", + 401: None, + } + return self.api_client.call_api( '/apis/batch/v1/namespaces/{namespace}/jobs/{name}/status', 'PATCH', path_params, @@ -2395,13 +3041,14 @@ def patch_namespaced_job_status_with_http_info(self, name, namespace, body, **kw body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Job', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_namespaced_cron_job(self, name, namespace, **kwargs): # noqa: E501 """read_namespaced_cron_job # noqa: E501 @@ -2409,23 +3056,30 @@ def read_namespaced_cron_job(self, name, namespace, **kwargs): # noqa: E501 read the specified CronJob # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_cron_job(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the CronJob (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the CronJob (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1CronJob + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1CronJob """ kwargs['_return_http_data_only'] = True return self.read_namespaced_cron_job_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -2436,25 +3090,38 @@ def read_namespaced_cron_job_with_http_info(self, name, namespace, **kwargs): # read the specified CronJob # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_cron_job_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the CronJob (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the CronJob (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1CronJob, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1CronJob, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -2469,7 +3136,10 @@ def read_namespaced_cron_job_with_http_info(self, name, namespace, **kwargs): # 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2482,12 +3152,10 @@ def read_namespaced_cron_job_with_http_info(self, name, namespace, **kwargs): # local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_cron_job`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_cron_job`") # noqa: E501 collection_formats = {} @@ -2499,10 +3167,10 @@ def read_namespaced_cron_job_with_http_info(self, name, namespace, **kwargs): # path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2510,11 +3178,16 @@ def read_namespaced_cron_job_with_http_info(self, name, namespace, **kwargs): # body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1CronJob", + 401: None, + } + return self.api_client.call_api( '/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}', 'GET', path_params, @@ -2523,13 +3196,14 @@ def read_namespaced_cron_job_with_http_info(self, name, namespace, **kwargs): # body=body_params, post_params=form_params, files=local_var_files, - response_type='V1CronJob', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_namespaced_cron_job_status(self, name, namespace, **kwargs): # noqa: E501 """read_namespaced_cron_job_status # noqa: E501 @@ -2537,23 +3211,30 @@ def read_namespaced_cron_job_status(self, name, namespace, **kwargs): # noqa: E read status of the specified CronJob # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_cron_job_status(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the CronJob (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the CronJob (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1CronJob + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1CronJob """ kwargs['_return_http_data_only'] = True return self.read_namespaced_cron_job_status_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -2564,25 +3245,38 @@ def read_namespaced_cron_job_status_with_http_info(self, name, namespace, **kwar read status of the specified CronJob # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_cron_job_status_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the CronJob (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the CronJob (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1CronJob, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1CronJob, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -2597,7 +3291,10 @@ def read_namespaced_cron_job_status_with_http_info(self, name, namespace, **kwar 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2610,12 +3307,10 @@ def read_namespaced_cron_job_status_with_http_info(self, name, namespace, **kwar local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_cron_job_status`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_cron_job_status`") # noqa: E501 collection_formats = {} @@ -2627,10 +3322,10 @@ def read_namespaced_cron_job_status_with_http_info(self, name, namespace, **kwar path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2638,11 +3333,16 @@ def read_namespaced_cron_job_status_with_http_info(self, name, namespace, **kwar body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1CronJob", + 401: None, + } + return self.api_client.call_api( '/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}/status', 'GET', path_params, @@ -2651,13 +3351,14 @@ def read_namespaced_cron_job_status_with_http_info(self, name, namespace, **kwar body=body_params, post_params=form_params, files=local_var_files, - response_type='V1CronJob', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_namespaced_job(self, name, namespace, **kwargs): # noqa: E501 """read_namespaced_job # noqa: E501 @@ -2665,23 +3366,30 @@ def read_namespaced_job(self, name, namespace, **kwargs): # noqa: E501 read the specified Job # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_job(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Job (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the Job (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Job + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Job """ kwargs['_return_http_data_only'] = True return self.read_namespaced_job_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -2692,25 +3400,38 @@ def read_namespaced_job_with_http_info(self, name, namespace, **kwargs): # noqa read the specified Job # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_job_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Job (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the Job (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Job, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Job, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -2725,7 +3446,10 @@ def read_namespaced_job_with_http_info(self, name, namespace, **kwargs): # noqa 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2738,12 +3462,10 @@ def read_namespaced_job_with_http_info(self, name, namespace, **kwargs): # noqa local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_job`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_job`") # noqa: E501 collection_formats = {} @@ -2755,10 +3477,10 @@ def read_namespaced_job_with_http_info(self, name, namespace, **kwargs): # noqa path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2766,11 +3488,16 @@ def read_namespaced_job_with_http_info(self, name, namespace, **kwargs): # noqa body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Job", + 401: None, + } + return self.api_client.call_api( '/apis/batch/v1/namespaces/{namespace}/jobs/{name}', 'GET', path_params, @@ -2779,13 +3506,14 @@ def read_namespaced_job_with_http_info(self, name, namespace, **kwargs): # noqa body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Job', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_namespaced_job_status(self, name, namespace, **kwargs): # noqa: E501 """read_namespaced_job_status # noqa: E501 @@ -2793,23 +3521,30 @@ def read_namespaced_job_status(self, name, namespace, **kwargs): # noqa: E501 read status of the specified Job # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_job_status(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Job (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the Job (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Job + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Job """ kwargs['_return_http_data_only'] = True return self.read_namespaced_job_status_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -2820,25 +3555,38 @@ def read_namespaced_job_status_with_http_info(self, name, namespace, **kwargs): read status of the specified Job # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_job_status_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Job (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the Job (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Job, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Job, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -2853,7 +3601,10 @@ def read_namespaced_job_status_with_http_info(self, name, namespace, **kwargs): 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2866,12 +3617,10 @@ def read_namespaced_job_status_with_http_info(self, name, namespace, **kwargs): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_job_status`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_job_status`") # noqa: E501 collection_formats = {} @@ -2883,10 +3632,10 @@ def read_namespaced_job_status_with_http_info(self, name, namespace, **kwargs): path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2894,11 +3643,16 @@ def read_namespaced_job_status_with_http_info(self, name, namespace, **kwargs): body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Job", + 401: None, + } + return self.api_client.call_api( '/apis/batch/v1/namespaces/{namespace}/jobs/{name}/status', 'GET', path_params, @@ -2907,13 +3661,14 @@ def read_namespaced_job_status_with_http_info(self, name, namespace, **kwargs): body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Job', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_namespaced_cron_job(self, name, namespace, body, **kwargs): # noqa: E501 """replace_namespaced_cron_job # noqa: E501 @@ -2921,27 +3676,38 @@ def replace_namespaced_cron_job(self, name, namespace, body, **kwargs): # noqa: replace the specified CronJob # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_cron_job(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the CronJob (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1CronJob body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the CronJob (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1CronJob + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1CronJob + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1CronJob """ kwargs['_return_http_data_only'] = True return self.replace_namespaced_cron_job_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -2952,29 +3718,46 @@ def replace_namespaced_cron_job_with_http_info(self, name, namespace, body, **kw replace the specified CronJob # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_cron_job_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the CronJob (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1CronJob body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the CronJob (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1CronJob + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1CronJob, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1CronJob, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -2993,7 +3776,10 @@ def replace_namespaced_cron_job_with_http_info(self, name, namespace, body, **kw 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -3006,16 +3792,13 @@ def replace_namespaced_cron_job_with_http_info(self, name, namespace, body, **kw local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_cron_job`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_cron_job`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_cron_job`") # noqa: E501 collection_formats = {} @@ -3027,16 +3810,16 @@ def replace_namespaced_cron_job_with_http_info(self, name, namespace, body, **kw path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -3046,11 +3829,17 @@ def replace_namespaced_cron_job_with_http_info(self, name, namespace, body, **kw body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1CronJob", + 201: "V1CronJob", + 401: None, + } + return self.api_client.call_api( '/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}', 'PUT', path_params, @@ -3059,13 +3848,14 @@ def replace_namespaced_cron_job_with_http_info(self, name, namespace, body, **kw body=body_params, post_params=form_params, files=local_var_files, - response_type='V1CronJob', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_namespaced_cron_job_status(self, name, namespace, body, **kwargs): # noqa: E501 """replace_namespaced_cron_job_status # noqa: E501 @@ -3073,27 +3863,38 @@ def replace_namespaced_cron_job_status(self, name, namespace, body, **kwargs): replace status of the specified CronJob # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_cron_job_status(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the CronJob (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1CronJob body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the CronJob (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1CronJob + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1CronJob + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1CronJob """ kwargs['_return_http_data_only'] = True return self.replace_namespaced_cron_job_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -3104,29 +3905,46 @@ def replace_namespaced_cron_job_status_with_http_info(self, name, namespace, bod replace status of the specified CronJob # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_cron_job_status_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the CronJob (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1CronJob body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the CronJob (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1CronJob + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1CronJob, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1CronJob, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -3145,7 +3963,10 @@ def replace_namespaced_cron_job_status_with_http_info(self, name, namespace, bod 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -3158,16 +3979,13 @@ def replace_namespaced_cron_job_status_with_http_info(self, name, namespace, bod local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_cron_job_status`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_cron_job_status`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_cron_job_status`") # noqa: E501 collection_formats = {} @@ -3179,16 +3997,16 @@ def replace_namespaced_cron_job_status_with_http_info(self, name, namespace, bod path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -3198,11 +4016,17 @@ def replace_namespaced_cron_job_status_with_http_info(self, name, namespace, bod body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1CronJob", + 201: "V1CronJob", + 401: None, + } + return self.api_client.call_api( '/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}/status', 'PUT', path_params, @@ -3211,13 +4035,14 @@ def replace_namespaced_cron_job_status_with_http_info(self, name, namespace, bod body=body_params, post_params=form_params, files=local_var_files, - response_type='V1CronJob', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_namespaced_job(self, name, namespace, body, **kwargs): # noqa: E501 """replace_namespaced_job # noqa: E501 @@ -3225,27 +4050,38 @@ def replace_namespaced_job(self, name, namespace, body, **kwargs): # noqa: E501 replace the specified Job # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_job(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Job (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1Job body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the Job (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1Job + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Job + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Job """ kwargs['_return_http_data_only'] = True return self.replace_namespaced_job_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -3256,29 +4092,46 @@ def replace_namespaced_job_with_http_info(self, name, namespace, body, **kwargs) replace the specified Job # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_job_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Job (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1Job body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the Job (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1Job + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Job, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Job, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -3297,7 +4150,10 @@ def replace_namespaced_job_with_http_info(self, name, namespace, body, **kwargs) 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -3310,16 +4166,13 @@ def replace_namespaced_job_with_http_info(self, name, namespace, body, **kwargs) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_job`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_job`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_job`") # noqa: E501 collection_formats = {} @@ -3331,16 +4184,16 @@ def replace_namespaced_job_with_http_info(self, name, namespace, body, **kwargs) path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -3350,11 +4203,17 @@ def replace_namespaced_job_with_http_info(self, name, namespace, body, **kwargs) body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Job", + 201: "V1Job", + 401: None, + } + return self.api_client.call_api( '/apis/batch/v1/namespaces/{namespace}/jobs/{name}', 'PUT', path_params, @@ -3363,13 +4222,14 @@ def replace_namespaced_job_with_http_info(self, name, namespace, body, **kwargs) body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Job', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_namespaced_job_status(self, name, namespace, body, **kwargs): # noqa: E501 """replace_namespaced_job_status # noqa: E501 @@ -3377,27 +4237,38 @@ def replace_namespaced_job_status(self, name, namespace, body, **kwargs): # noq replace status of the specified Job # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_job_status(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Job (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1Job body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the Job (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1Job + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Job + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Job """ kwargs['_return_http_data_only'] = True return self.replace_namespaced_job_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -3408,29 +4279,46 @@ def replace_namespaced_job_status_with_http_info(self, name, namespace, body, ** replace status of the specified Job # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_job_status_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Job (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1Job body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the Job (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1Job + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Job, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Job, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -3449,7 +4337,10 @@ def replace_namespaced_job_status_with_http_info(self, name, namespace, body, ** 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -3462,16 +4353,13 @@ def replace_namespaced_job_status_with_http_info(self, name, namespace, body, ** local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_job_status`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_job_status`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_job_status`") # noqa: E501 collection_formats = {} @@ -3483,16 +4371,16 @@ def replace_namespaced_job_status_with_http_info(self, name, namespace, body, ** path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -3502,11 +4390,17 @@ def replace_namespaced_job_status_with_http_info(self, name, namespace, body, ** body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Job", + 201: "V1Job", + 401: None, + } + return self.api_client.call_api( '/apis/batch/v1/namespaces/{namespace}/jobs/{name}/status', 'PUT', path_params, @@ -3515,10 +4409,11 @@ def replace_namespaced_job_status_with_http_info(self, name, namespace, body, ** body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Job', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) diff --git a/kubernetes/client/api/certificates_api.py b/kubernetes/client/api/certificates_api.py index 39001a023f..4dfa15eb3c 100644 --- a/kubernetes/client/api/certificates_api.py +++ b/kubernetes/client/api/certificates_api.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ @@ -42,20 +42,24 @@ def get_api_group(self, **kwargs): # noqa: E501 get information of a group # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_group(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1APIGroup + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1APIGroup """ kwargs['_return_http_data_only'] = True return self.get_api_group_with_http_info(**kwargs) # noqa: E501 @@ -66,22 +70,32 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 get information of a group # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_group_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1APIGroup, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1APIGroup, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -93,7 +107,10 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -112,7 +129,7 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -125,6 +142,11 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1APIGroup", + 401: None, + } + return self.api_client.call_api( '/apis/certificates.k8s.io/', 'GET', path_params, @@ -133,10 +155,11 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1APIGroup', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) diff --git a/kubernetes/client/api/certificates_v1_api.py b/kubernetes/client/api/certificates_v1_api.py index 7fc7f74761..4c35c72c80 100644 --- a/kubernetes/client/api/certificates_v1_api.py +++ b/kubernetes/client/api/certificates_v1_api.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ @@ -42,25 +42,34 @@ def create_certificate_signing_request(self, body, **kwargs): # noqa: E501 create a CertificateSigningRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_certificate_signing_request(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param V1CertificateSigningRequest body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param body: (required) + :type body: V1CertificateSigningRequest + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1CertificateSigningRequest + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1CertificateSigningRequest """ kwargs['_return_http_data_only'] = True return self.create_certificate_signing_request_with_http_info(body, **kwargs) # noqa: E501 @@ -71,27 +80,42 @@ def create_certificate_signing_request_with_http_info(self, body, **kwargs): # create a CertificateSigningRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_certificate_signing_request_with_http_info(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param V1CertificateSigningRequest body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param body: (required) + :type body: V1CertificateSigningRequest + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1CertificateSigningRequest, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1CertificateSigningRequest, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -108,7 +132,10 @@ def create_certificate_signing_request_with_http_info(self, body, **kwargs): # 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -121,8 +148,7 @@ def create_certificate_signing_request_with_http_info(self, body, **kwargs): # local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_certificate_signing_request`") # noqa: E501 collection_formats = {} @@ -130,16 +156,16 @@ def create_certificate_signing_request_with_http_info(self, body, **kwargs): # path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -149,11 +175,18 @@ def create_certificate_signing_request_with_http_info(self, body, **kwargs): # body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1CertificateSigningRequest", + 201: "V1CertificateSigningRequest", + 202: "V1CertificateSigningRequest", + 401: None, + } + return self.api_client.call_api( '/apis/certificates.k8s.io/v1/certificatesigningrequests', 'POST', path_params, @@ -162,13 +195,14 @@ def create_certificate_signing_request_with_http_info(self, body, **kwargs): # body=body_params, post_params=form_params, files=local_var_files, - response_type='V1CertificateSigningRequest', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_certificate_signing_request(self, name, **kwargs): # noqa: E501 """delete_certificate_signing_request # noqa: E501 @@ -176,27 +210,40 @@ def delete_certificate_signing_request(self, name, **kwargs): # noqa: E501 delete a CertificateSigningRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_certificate_signing_request(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the CertificateSigningRequest (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the CertificateSigningRequest (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_certificate_signing_request_with_http_info(name, **kwargs) # noqa: E501 @@ -207,29 +254,48 @@ def delete_certificate_signing_request_with_http_info(self, name, **kwargs): # delete a CertificateSigningRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_certificate_signing_request_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the CertificateSigningRequest (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the CertificateSigningRequest (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -239,6 +305,7 @@ def delete_certificate_signing_request_with_http_info(self, name, **kwargs): # 'pretty', 'dry_run', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'orphan_dependents', 'propagation_policy', 'body' @@ -248,7 +315,10 @@ def delete_certificate_signing_request_with_http_info(self, name, **kwargs): # 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -261,8 +331,7 @@ def delete_certificate_signing_request_with_http_info(self, name, **kwargs): # local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `delete_certificate_signing_request`") # noqa: E501 collection_formats = {} @@ -272,18 +341,20 @@ def delete_certificate_signing_request_with_http_info(self, name, **kwargs): # path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -293,11 +364,17 @@ def delete_certificate_signing_request_with_http_info(self, name, **kwargs): # body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 202: "V1Status", + 401: None, + } + return self.api_client.call_api( '/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}', 'DELETE', path_params, @@ -306,13 +383,14 @@ def delete_certificate_signing_request_with_http_info(self, name, **kwargs): # body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_collection_certificate_signing_request(self, **kwargs): # noqa: E501 """delete_collection_certificate_signing_request # noqa: E501 @@ -320,34 +398,54 @@ def delete_collection_certificate_signing_request(self, **kwargs): # noqa: E501 delete collection of CertificateSigningRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_certificate_signing_request(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_collection_certificate_signing_request_with_http_info(**kwargs) # noqa: E501 @@ -358,36 +456,62 @@ def delete_collection_certificate_signing_request_with_http_info(self, **kwargs) delete collection of CertificateSigningRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_certificate_signing_request_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -398,6 +522,7 @@ def delete_collection_certificate_signing_request_with_http_info(self, **kwargs) 'dry_run', 'field_selector', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'label_selector', 'limit', 'orphan_dependents', @@ -413,7 +538,10 @@ def delete_collection_certificate_signing_request_with_http_info(self, **kwargs) 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -431,34 +559,36 @@ def delete_collection_certificate_signing_request_with_http_info(self, **kwargs) path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -468,11 +598,16 @@ def delete_collection_certificate_signing_request_with_http_info(self, **kwargs) body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 401: None, + } + return self.api_client.call_api( '/apis/certificates.k8s.io/v1/certificatesigningrequests', 'DELETE', path_params, @@ -481,13 +616,14 @@ def delete_collection_certificate_signing_request_with_http_info(self, **kwargs) body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def get_api_resources(self, **kwargs): # noqa: E501 """get_api_resources # noqa: E501 @@ -495,20 +631,24 @@ def get_api_resources(self, **kwargs): # noqa: E501 get available resources # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_resources(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1APIResourceList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1APIResourceList """ kwargs['_return_http_data_only'] = True return self.get_api_resources_with_http_info(**kwargs) # noqa: E501 @@ -519,22 +659,32 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 get available resources # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_resources_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -546,7 +696,10 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -565,7 +718,7 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -573,11 +726,16 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1APIResourceList", + 401: None, + } + return self.api_client.call_api( '/apis/certificates.k8s.io/v1/', 'GET', path_params, @@ -586,13 +744,14 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1APIResourceList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_certificate_signing_request(self, **kwargs): # noqa: E501 """list_certificate_signing_request # noqa: E501 @@ -600,31 +759,46 @@ def list_certificate_signing_request(self, **kwargs): # noqa: E501 list or watch objects of kind CertificateSigningRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_certificate_signing_request(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1CertificateSigningRequestList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1CertificateSigningRequestList """ kwargs['_return_http_data_only'] = True return self.list_certificate_signing_request_with_http_info(**kwargs) # noqa: E501 @@ -635,33 +809,54 @@ def list_certificate_signing_request_with_http_info(self, **kwargs): # noqa: E5 list or watch objects of kind CertificateSigningRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_certificate_signing_request_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1CertificateSigningRequestList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1CertificateSigningRequestList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -684,7 +879,10 @@ def list_certificate_signing_request_with_http_info(self, **kwargs): # noqa: E5 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -702,30 +900,30 @@ def list_certificate_signing_request_with_http_info(self, **kwargs): # noqa: E5 path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -733,11 +931,16 @@ def list_certificate_signing_request_with_http_info(self, **kwargs): # noqa: E5 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1CertificateSigningRequestList", + 401: None, + } + return self.api_client.call_api( '/apis/certificates.k8s.io/v1/certificatesigningrequests', 'GET', path_params, @@ -746,13 +949,14 @@ def list_certificate_signing_request_with_http_info(self, **kwargs): # noqa: E5 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1CertificateSigningRequestList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_certificate_signing_request(self, name, body, **kwargs): # noqa: E501 """patch_certificate_signing_request # noqa: E501 @@ -760,27 +964,38 @@ def patch_certificate_signing_request(self, name, body, **kwargs): # noqa: E501 partially update the specified CertificateSigningRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_certificate_signing_request(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the CertificateSigningRequest (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the CertificateSigningRequest (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1CertificateSigningRequest + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1CertificateSigningRequest """ kwargs['_return_http_data_only'] = True return self.patch_certificate_signing_request_with_http_info(name, body, **kwargs) # noqa: E501 @@ -791,29 +1006,46 @@ def patch_certificate_signing_request_with_http_info(self, name, body, **kwargs) partially update the specified CertificateSigningRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_certificate_signing_request_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the CertificateSigningRequest (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the CertificateSigningRequest (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1CertificateSigningRequest, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1CertificateSigningRequest, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -832,7 +1064,10 @@ def patch_certificate_signing_request_with_http_info(self, name, body, **kwargs) 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -845,12 +1080,10 @@ def patch_certificate_signing_request_with_http_info(self, name, body, **kwargs) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_certificate_signing_request`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_certificate_signing_request`") # noqa: E501 collection_formats = {} @@ -860,18 +1093,18 @@ def patch_certificate_signing_request_with_http_info(self, name, body, **kwargs) path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -881,15 +1114,25 @@ def patch_certificate_signing_request_with_http_info(self, name, body, **kwargs) body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1CertificateSigningRequest", + 201: "V1CertificateSigningRequest", + 401: None, + } + return self.api_client.call_api( '/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}', 'PATCH', path_params, @@ -898,13 +1141,14 @@ def patch_certificate_signing_request_with_http_info(self, name, body, **kwargs) body=body_params, post_params=form_params, files=local_var_files, - response_type='V1CertificateSigningRequest', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_certificate_signing_request_approval(self, name, body, **kwargs): # noqa: E501 """patch_certificate_signing_request_approval # noqa: E501 @@ -912,27 +1156,38 @@ def patch_certificate_signing_request_approval(self, name, body, **kwargs): # n partially update approval of the specified CertificateSigningRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_certificate_signing_request_approval(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the CertificateSigningRequest (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the CertificateSigningRequest (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1CertificateSigningRequest + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1CertificateSigningRequest """ kwargs['_return_http_data_only'] = True return self.patch_certificate_signing_request_approval_with_http_info(name, body, **kwargs) # noqa: E501 @@ -943,29 +1198,46 @@ def patch_certificate_signing_request_approval_with_http_info(self, name, body, partially update approval of the specified CertificateSigningRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_certificate_signing_request_approval_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the CertificateSigningRequest (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the CertificateSigningRequest (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1CertificateSigningRequest, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1CertificateSigningRequest, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -984,7 +1256,10 @@ def patch_certificate_signing_request_approval_with_http_info(self, name, body, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -997,12 +1272,10 @@ def patch_certificate_signing_request_approval_with_http_info(self, name, body, local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_certificate_signing_request_approval`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_certificate_signing_request_approval`") # noqa: E501 collection_formats = {} @@ -1012,18 +1285,18 @@ def patch_certificate_signing_request_approval_with_http_info(self, name, body, path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1033,15 +1306,25 @@ def patch_certificate_signing_request_approval_with_http_info(self, name, body, body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1CertificateSigningRequest", + 201: "V1CertificateSigningRequest", + 401: None, + } + return self.api_client.call_api( '/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/approval', 'PATCH', path_params, @@ -1050,13 +1333,14 @@ def patch_certificate_signing_request_approval_with_http_info(self, name, body, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1CertificateSigningRequest', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_certificate_signing_request_status(self, name, body, **kwargs): # noqa: E501 """patch_certificate_signing_request_status # noqa: E501 @@ -1064,27 +1348,38 @@ def patch_certificate_signing_request_status(self, name, body, **kwargs): # noq partially update status of the specified CertificateSigningRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_certificate_signing_request_status(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the CertificateSigningRequest (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the CertificateSigningRequest (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1CertificateSigningRequest + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1CertificateSigningRequest """ kwargs['_return_http_data_only'] = True return self.patch_certificate_signing_request_status_with_http_info(name, body, **kwargs) # noqa: E501 @@ -1095,29 +1390,46 @@ def patch_certificate_signing_request_status_with_http_info(self, name, body, ** partially update status of the specified CertificateSigningRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_certificate_signing_request_status_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the CertificateSigningRequest (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the CertificateSigningRequest (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1CertificateSigningRequest, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1CertificateSigningRequest, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1136,7 +1448,10 @@ def patch_certificate_signing_request_status_with_http_info(self, name, body, ** 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1149,12 +1464,10 @@ def patch_certificate_signing_request_status_with_http_info(self, name, body, ** local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_certificate_signing_request_status`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_certificate_signing_request_status`") # noqa: E501 collection_formats = {} @@ -1164,18 +1477,18 @@ def patch_certificate_signing_request_status_with_http_info(self, name, body, ** path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1185,15 +1498,25 @@ def patch_certificate_signing_request_status_with_http_info(self, name, body, ** body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1CertificateSigningRequest", + 201: "V1CertificateSigningRequest", + 401: None, + } + return self.api_client.call_api( '/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/status', 'PATCH', path_params, @@ -1202,13 +1525,14 @@ def patch_certificate_signing_request_status_with_http_info(self, name, body, ** body=body_params, post_params=form_params, files=local_var_files, - response_type='V1CertificateSigningRequest', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_certificate_signing_request(self, name, **kwargs): # noqa: E501 """read_certificate_signing_request # noqa: E501 @@ -1216,22 +1540,28 @@ def read_certificate_signing_request(self, name, **kwargs): # noqa: E501 read the specified CertificateSigningRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_certificate_signing_request(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the CertificateSigningRequest (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the CertificateSigningRequest (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1CertificateSigningRequest + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1CertificateSigningRequest """ kwargs['_return_http_data_only'] = True return self.read_certificate_signing_request_with_http_info(name, **kwargs) # noqa: E501 @@ -1242,24 +1572,36 @@ def read_certificate_signing_request_with_http_info(self, name, **kwargs): # no read the specified CertificateSigningRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_certificate_signing_request_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the CertificateSigningRequest (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the CertificateSigningRequest (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1CertificateSigningRequest, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1CertificateSigningRequest, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1273,7 +1615,10 @@ def read_certificate_signing_request_with_http_info(self, name, **kwargs): # no 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1286,8 +1631,7 @@ def read_certificate_signing_request_with_http_info(self, name, **kwargs): # no local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_certificate_signing_request`") # noqa: E501 collection_formats = {} @@ -1297,10 +1641,10 @@ def read_certificate_signing_request_with_http_info(self, name, **kwargs): # no path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1308,11 +1652,16 @@ def read_certificate_signing_request_with_http_info(self, name, **kwargs): # no body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1CertificateSigningRequest", + 401: None, + } + return self.api_client.call_api( '/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}', 'GET', path_params, @@ -1321,13 +1670,14 @@ def read_certificate_signing_request_with_http_info(self, name, **kwargs): # no body=body_params, post_params=form_params, files=local_var_files, - response_type='V1CertificateSigningRequest', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_certificate_signing_request_approval(self, name, **kwargs): # noqa: E501 """read_certificate_signing_request_approval # noqa: E501 @@ -1335,22 +1685,28 @@ def read_certificate_signing_request_approval(self, name, **kwargs): # noqa: E5 read approval of the specified CertificateSigningRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_certificate_signing_request_approval(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the CertificateSigningRequest (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the CertificateSigningRequest (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1CertificateSigningRequest + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1CertificateSigningRequest """ kwargs['_return_http_data_only'] = True return self.read_certificate_signing_request_approval_with_http_info(name, **kwargs) # noqa: E501 @@ -1361,24 +1717,36 @@ def read_certificate_signing_request_approval_with_http_info(self, name, **kwarg read approval of the specified CertificateSigningRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_certificate_signing_request_approval_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the CertificateSigningRequest (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the CertificateSigningRequest (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1CertificateSigningRequest, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1CertificateSigningRequest, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1392,7 +1760,10 @@ def read_certificate_signing_request_approval_with_http_info(self, name, **kwarg 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1405,8 +1776,7 @@ def read_certificate_signing_request_approval_with_http_info(self, name, **kwarg local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_certificate_signing_request_approval`") # noqa: E501 collection_formats = {} @@ -1416,10 +1786,10 @@ def read_certificate_signing_request_approval_with_http_info(self, name, **kwarg path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1427,11 +1797,16 @@ def read_certificate_signing_request_approval_with_http_info(self, name, **kwarg body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1CertificateSigningRequest", + 401: None, + } + return self.api_client.call_api( '/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/approval', 'GET', path_params, @@ -1440,13 +1815,14 @@ def read_certificate_signing_request_approval_with_http_info(self, name, **kwarg body=body_params, post_params=form_params, files=local_var_files, - response_type='V1CertificateSigningRequest', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_certificate_signing_request_status(self, name, **kwargs): # noqa: E501 """read_certificate_signing_request_status # noqa: E501 @@ -1454,22 +1830,28 @@ def read_certificate_signing_request_status(self, name, **kwargs): # noqa: E501 read status of the specified CertificateSigningRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_certificate_signing_request_status(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the CertificateSigningRequest (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the CertificateSigningRequest (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1CertificateSigningRequest + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1CertificateSigningRequest """ kwargs['_return_http_data_only'] = True return self.read_certificate_signing_request_status_with_http_info(name, **kwargs) # noqa: E501 @@ -1480,24 +1862,36 @@ def read_certificate_signing_request_status_with_http_info(self, name, **kwargs) read status of the specified CertificateSigningRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_certificate_signing_request_status_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the CertificateSigningRequest (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the CertificateSigningRequest (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1CertificateSigningRequest, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1CertificateSigningRequest, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1511,7 +1905,10 @@ def read_certificate_signing_request_status_with_http_info(self, name, **kwargs) 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1524,8 +1921,7 @@ def read_certificate_signing_request_status_with_http_info(self, name, **kwargs) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_certificate_signing_request_status`") # noqa: E501 collection_formats = {} @@ -1535,10 +1931,10 @@ def read_certificate_signing_request_status_with_http_info(self, name, **kwargs) path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1546,11 +1942,16 @@ def read_certificate_signing_request_status_with_http_info(self, name, **kwargs) body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1CertificateSigningRequest", + 401: None, + } + return self.api_client.call_api( '/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/status', 'GET', path_params, @@ -1559,13 +1960,14 @@ def read_certificate_signing_request_status_with_http_info(self, name, **kwargs) body=body_params, post_params=form_params, files=local_var_files, - response_type='V1CertificateSigningRequest', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_certificate_signing_request(self, name, body, **kwargs): # noqa: E501 """replace_certificate_signing_request # noqa: E501 @@ -1573,26 +1975,36 @@ def replace_certificate_signing_request(self, name, body, **kwargs): # noqa: E5 replace the specified CertificateSigningRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_certificate_signing_request(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the CertificateSigningRequest (required) - :param V1CertificateSigningRequest body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the CertificateSigningRequest (required) + :type name: str + :param body: (required) + :type body: V1CertificateSigningRequest + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1CertificateSigningRequest + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1CertificateSigningRequest """ kwargs['_return_http_data_only'] = True return self.replace_certificate_signing_request_with_http_info(name, body, **kwargs) # noqa: E501 @@ -1603,28 +2015,44 @@ def replace_certificate_signing_request_with_http_info(self, name, body, **kwarg replace the specified CertificateSigningRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_certificate_signing_request_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the CertificateSigningRequest (required) - :param V1CertificateSigningRequest body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the CertificateSigningRequest (required) + :type name: str + :param body: (required) + :type body: V1CertificateSigningRequest + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1CertificateSigningRequest, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1CertificateSigningRequest, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1642,7 +2070,10 @@ def replace_certificate_signing_request_with_http_info(self, name, body, **kwarg 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1655,12 +2086,10 @@ def replace_certificate_signing_request_with_http_info(self, name, body, **kwarg local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_certificate_signing_request`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_certificate_signing_request`") # noqa: E501 collection_formats = {} @@ -1670,16 +2099,16 @@ def replace_certificate_signing_request_with_http_info(self, name, body, **kwarg path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1689,11 +2118,17 @@ def replace_certificate_signing_request_with_http_info(self, name, body, **kwarg body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1CertificateSigningRequest", + 201: "V1CertificateSigningRequest", + 401: None, + } + return self.api_client.call_api( '/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}', 'PUT', path_params, @@ -1702,13 +2137,14 @@ def replace_certificate_signing_request_with_http_info(self, name, body, **kwarg body=body_params, post_params=form_params, files=local_var_files, - response_type='V1CertificateSigningRequest', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_certificate_signing_request_approval(self, name, body, **kwargs): # noqa: E501 """replace_certificate_signing_request_approval # noqa: E501 @@ -1716,26 +2152,36 @@ def replace_certificate_signing_request_approval(self, name, body, **kwargs): # replace approval of the specified CertificateSigningRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_certificate_signing_request_approval(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the CertificateSigningRequest (required) - :param V1CertificateSigningRequest body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the CertificateSigningRequest (required) + :type name: str + :param body: (required) + :type body: V1CertificateSigningRequest + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1CertificateSigningRequest + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1CertificateSigningRequest """ kwargs['_return_http_data_only'] = True return self.replace_certificate_signing_request_approval_with_http_info(name, body, **kwargs) # noqa: E501 @@ -1746,28 +2192,44 @@ def replace_certificate_signing_request_approval_with_http_info(self, name, body replace approval of the specified CertificateSigningRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_certificate_signing_request_approval_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the CertificateSigningRequest (required) - :param V1CertificateSigningRequest body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the CertificateSigningRequest (required) + :type name: str + :param body: (required) + :type body: V1CertificateSigningRequest + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1CertificateSigningRequest, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1CertificateSigningRequest, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1785,7 +2247,10 @@ def replace_certificate_signing_request_approval_with_http_info(self, name, body 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1798,12 +2263,10 @@ def replace_certificate_signing_request_approval_with_http_info(self, name, body local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_certificate_signing_request_approval`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_certificate_signing_request_approval`") # noqa: E501 collection_formats = {} @@ -1813,16 +2276,16 @@ def replace_certificate_signing_request_approval_with_http_info(self, name, body path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1832,11 +2295,17 @@ def replace_certificate_signing_request_approval_with_http_info(self, name, body body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1CertificateSigningRequest", + 201: "V1CertificateSigningRequest", + 401: None, + } + return self.api_client.call_api( '/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/approval', 'PUT', path_params, @@ -1845,13 +2314,14 @@ def replace_certificate_signing_request_approval_with_http_info(self, name, body body=body_params, post_params=form_params, files=local_var_files, - response_type='V1CertificateSigningRequest', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_certificate_signing_request_status(self, name, body, **kwargs): # noqa: E501 """replace_certificate_signing_request_status # noqa: E501 @@ -1859,26 +2329,36 @@ def replace_certificate_signing_request_status(self, name, body, **kwargs): # n replace status of the specified CertificateSigningRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_certificate_signing_request_status(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the CertificateSigningRequest (required) - :param V1CertificateSigningRequest body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the CertificateSigningRequest (required) + :type name: str + :param body: (required) + :type body: V1CertificateSigningRequest + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1CertificateSigningRequest + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1CertificateSigningRequest """ kwargs['_return_http_data_only'] = True return self.replace_certificate_signing_request_status_with_http_info(name, body, **kwargs) # noqa: E501 @@ -1889,28 +2369,44 @@ def replace_certificate_signing_request_status_with_http_info(self, name, body, replace status of the specified CertificateSigningRequest # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_certificate_signing_request_status_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the CertificateSigningRequest (required) - :param V1CertificateSigningRequest body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the CertificateSigningRequest (required) + :type name: str + :param body: (required) + :type body: V1CertificateSigningRequest + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1CertificateSigningRequest, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1CertificateSigningRequest, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1928,7 +2424,10 @@ def replace_certificate_signing_request_status_with_http_info(self, name, body, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1941,12 +2440,10 @@ def replace_certificate_signing_request_status_with_http_info(self, name, body, local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_certificate_signing_request_status`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_certificate_signing_request_status`") # noqa: E501 collection_formats = {} @@ -1956,16 +2453,16 @@ def replace_certificate_signing_request_status_with_http_info(self, name, body, path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1975,11 +2472,17 @@ def replace_certificate_signing_request_status_with_http_info(self, name, body, body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1CertificateSigningRequest", + 201: "V1CertificateSigningRequest", + 401: None, + } + return self.api_client.call_api( '/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/status', 'PUT', path_params, @@ -1988,10 +2491,11 @@ def replace_certificate_signing_request_status_with_http_info(self, name, body, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1CertificateSigningRequest', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) diff --git a/kubernetes/client/api/certificates_v1alpha1_api.py b/kubernetes/client/api/certificates_v1alpha1_api.py index af7bba3ee0..fa9e944300 100644 --- a/kubernetes/client/api/certificates_v1alpha1_api.py +++ b/kubernetes/client/api/certificates_v1alpha1_api.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ @@ -42,25 +42,34 @@ def create_cluster_trust_bundle(self, body, **kwargs): # noqa: E501 create a ClusterTrustBundle # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_cluster_trust_bundle(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param V1alpha1ClusterTrustBundle body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param body: (required) + :type body: V1alpha1ClusterTrustBundle + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1alpha1ClusterTrustBundle + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1alpha1ClusterTrustBundle """ kwargs['_return_http_data_only'] = True return self.create_cluster_trust_bundle_with_http_info(body, **kwargs) # noqa: E501 @@ -71,27 +80,42 @@ def create_cluster_trust_bundle_with_http_info(self, body, **kwargs): # noqa: E create a ClusterTrustBundle # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_cluster_trust_bundle_with_http_info(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param V1alpha1ClusterTrustBundle body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param body: (required) + :type body: V1alpha1ClusterTrustBundle + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1alpha1ClusterTrustBundle, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1alpha1ClusterTrustBundle, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -108,7 +132,10 @@ def create_cluster_trust_bundle_with_http_info(self, body, **kwargs): # noqa: E 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -121,8 +148,7 @@ def create_cluster_trust_bundle_with_http_info(self, body, **kwargs): # noqa: E local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_cluster_trust_bundle`") # noqa: E501 collection_formats = {} @@ -130,16 +156,16 @@ def create_cluster_trust_bundle_with_http_info(self, body, **kwargs): # noqa: E path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -149,11 +175,18 @@ def create_cluster_trust_bundle_with_http_info(self, body, **kwargs): # noqa: E body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1alpha1ClusterTrustBundle", + 201: "V1alpha1ClusterTrustBundle", + 202: "V1alpha1ClusterTrustBundle", + 401: None, + } + return self.api_client.call_api( '/apis/certificates.k8s.io/v1alpha1/clustertrustbundles', 'POST', path_params, @@ -162,13 +195,14 @@ def create_cluster_trust_bundle_with_http_info(self, body, **kwargs): # noqa: E body=body_params, post_params=form_params, files=local_var_files, - response_type='V1alpha1ClusterTrustBundle', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_cluster_trust_bundle(self, name, **kwargs): # noqa: E501 """delete_cluster_trust_bundle # noqa: E501 @@ -176,27 +210,40 @@ def delete_cluster_trust_bundle(self, name, **kwargs): # noqa: E501 delete a ClusterTrustBundle # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_cluster_trust_bundle(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ClusterTrustBundle (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the ClusterTrustBundle (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_cluster_trust_bundle_with_http_info(name, **kwargs) # noqa: E501 @@ -207,29 +254,48 @@ def delete_cluster_trust_bundle_with_http_info(self, name, **kwargs): # noqa: E delete a ClusterTrustBundle # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_cluster_trust_bundle_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ClusterTrustBundle (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the ClusterTrustBundle (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -239,6 +305,7 @@ def delete_cluster_trust_bundle_with_http_info(self, name, **kwargs): # noqa: E 'pretty', 'dry_run', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'orphan_dependents', 'propagation_policy', 'body' @@ -248,7 +315,10 @@ def delete_cluster_trust_bundle_with_http_info(self, name, **kwargs): # noqa: E 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -261,8 +331,7 @@ def delete_cluster_trust_bundle_with_http_info(self, name, **kwargs): # noqa: E local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `delete_cluster_trust_bundle`") # noqa: E501 collection_formats = {} @@ -272,18 +341,20 @@ def delete_cluster_trust_bundle_with_http_info(self, name, **kwargs): # noqa: E path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -293,11 +364,17 @@ def delete_cluster_trust_bundle_with_http_info(self, name, **kwargs): # noqa: E body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 202: "V1Status", + 401: None, + } + return self.api_client.call_api( '/apis/certificates.k8s.io/v1alpha1/clustertrustbundles/{name}', 'DELETE', path_params, @@ -306,13 +383,14 @@ def delete_cluster_trust_bundle_with_http_info(self, name, **kwargs): # noqa: E body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_collection_cluster_trust_bundle(self, **kwargs): # noqa: E501 """delete_collection_cluster_trust_bundle # noqa: E501 @@ -320,34 +398,54 @@ def delete_collection_cluster_trust_bundle(self, **kwargs): # noqa: E501 delete collection of ClusterTrustBundle # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_cluster_trust_bundle(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_collection_cluster_trust_bundle_with_http_info(**kwargs) # noqa: E501 @@ -358,36 +456,62 @@ def delete_collection_cluster_trust_bundle_with_http_info(self, **kwargs): # no delete collection of ClusterTrustBundle # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_cluster_trust_bundle_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -398,6 +522,7 @@ def delete_collection_cluster_trust_bundle_with_http_info(self, **kwargs): # no 'dry_run', 'field_selector', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'label_selector', 'limit', 'orphan_dependents', @@ -413,7 +538,10 @@ def delete_collection_cluster_trust_bundle_with_http_info(self, **kwargs): # no 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -431,34 +559,36 @@ def delete_collection_cluster_trust_bundle_with_http_info(self, **kwargs): # no path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -468,11 +598,16 @@ def delete_collection_cluster_trust_bundle_with_http_info(self, **kwargs): # no body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 401: None, + } + return self.api_client.call_api( '/apis/certificates.k8s.io/v1alpha1/clustertrustbundles', 'DELETE', path_params, @@ -481,13 +616,14 @@ def delete_collection_cluster_trust_bundle_with_http_info(self, **kwargs): # no body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def get_api_resources(self, **kwargs): # noqa: E501 """get_api_resources # noqa: E501 @@ -495,20 +631,24 @@ def get_api_resources(self, **kwargs): # noqa: E501 get available resources # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_resources(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1APIResourceList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1APIResourceList """ kwargs['_return_http_data_only'] = True return self.get_api_resources_with_http_info(**kwargs) # noqa: E501 @@ -519,22 +659,32 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 get available resources # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_resources_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -546,7 +696,10 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -565,7 +718,7 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -573,11 +726,16 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1APIResourceList", + 401: None, + } + return self.api_client.call_api( '/apis/certificates.k8s.io/v1alpha1/', 'GET', path_params, @@ -586,13 +744,14 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1APIResourceList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_cluster_trust_bundle(self, **kwargs): # noqa: E501 """list_cluster_trust_bundle # noqa: E501 @@ -600,31 +759,46 @@ def list_cluster_trust_bundle(self, **kwargs): # noqa: E501 list or watch objects of kind ClusterTrustBundle # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_cluster_trust_bundle(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1alpha1ClusterTrustBundleList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1alpha1ClusterTrustBundleList """ kwargs['_return_http_data_only'] = True return self.list_cluster_trust_bundle_with_http_info(**kwargs) # noqa: E501 @@ -635,33 +809,54 @@ def list_cluster_trust_bundle_with_http_info(self, **kwargs): # noqa: E501 list or watch objects of kind ClusterTrustBundle # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_cluster_trust_bundle_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1alpha1ClusterTrustBundleList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1alpha1ClusterTrustBundleList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -684,7 +879,10 @@ def list_cluster_trust_bundle_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -702,30 +900,30 @@ def list_cluster_trust_bundle_with_http_info(self, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -733,11 +931,16 @@ def list_cluster_trust_bundle_with_http_info(self, **kwargs): # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1alpha1ClusterTrustBundleList", + 401: None, + } + return self.api_client.call_api( '/apis/certificates.k8s.io/v1alpha1/clustertrustbundles', 'GET', path_params, @@ -746,13 +949,14 @@ def list_cluster_trust_bundle_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1alpha1ClusterTrustBundleList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_cluster_trust_bundle(self, name, body, **kwargs): # noqa: E501 """patch_cluster_trust_bundle # noqa: E501 @@ -760,27 +964,38 @@ def patch_cluster_trust_bundle(self, name, body, **kwargs): # noqa: E501 partially update the specified ClusterTrustBundle # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_cluster_trust_bundle(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ClusterTrustBundle (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the ClusterTrustBundle (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1alpha1ClusterTrustBundle + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1alpha1ClusterTrustBundle """ kwargs['_return_http_data_only'] = True return self.patch_cluster_trust_bundle_with_http_info(name, body, **kwargs) # noqa: E501 @@ -791,29 +1006,46 @@ def patch_cluster_trust_bundle_with_http_info(self, name, body, **kwargs): # no partially update the specified ClusterTrustBundle # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_cluster_trust_bundle_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ClusterTrustBundle (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the ClusterTrustBundle (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1alpha1ClusterTrustBundle, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1alpha1ClusterTrustBundle, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -832,7 +1064,10 @@ def patch_cluster_trust_bundle_with_http_info(self, name, body, **kwargs): # no 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -845,12 +1080,10 @@ def patch_cluster_trust_bundle_with_http_info(self, name, body, **kwargs): # no local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_cluster_trust_bundle`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_cluster_trust_bundle`") # noqa: E501 collection_formats = {} @@ -860,18 +1093,18 @@ def patch_cluster_trust_bundle_with_http_info(self, name, body, **kwargs): # no path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -881,15 +1114,25 @@ def patch_cluster_trust_bundle_with_http_info(self, name, body, **kwargs): # no body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1alpha1ClusterTrustBundle", + 201: "V1alpha1ClusterTrustBundle", + 401: None, + } + return self.api_client.call_api( '/apis/certificates.k8s.io/v1alpha1/clustertrustbundles/{name}', 'PATCH', path_params, @@ -898,13 +1141,14 @@ def patch_cluster_trust_bundle_with_http_info(self, name, body, **kwargs): # no body=body_params, post_params=form_params, files=local_var_files, - response_type='V1alpha1ClusterTrustBundle', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_cluster_trust_bundle(self, name, **kwargs): # noqa: E501 """read_cluster_trust_bundle # noqa: E501 @@ -912,22 +1156,28 @@ def read_cluster_trust_bundle(self, name, **kwargs): # noqa: E501 read the specified ClusterTrustBundle # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_cluster_trust_bundle(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ClusterTrustBundle (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the ClusterTrustBundle (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1alpha1ClusterTrustBundle + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1alpha1ClusterTrustBundle """ kwargs['_return_http_data_only'] = True return self.read_cluster_trust_bundle_with_http_info(name, **kwargs) # noqa: E501 @@ -938,24 +1188,36 @@ def read_cluster_trust_bundle_with_http_info(self, name, **kwargs): # noqa: E50 read the specified ClusterTrustBundle # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_cluster_trust_bundle_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ClusterTrustBundle (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the ClusterTrustBundle (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1alpha1ClusterTrustBundle, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1alpha1ClusterTrustBundle, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -969,7 +1231,10 @@ def read_cluster_trust_bundle_with_http_info(self, name, **kwargs): # noqa: E50 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -982,8 +1247,7 @@ def read_cluster_trust_bundle_with_http_info(self, name, **kwargs): # noqa: E50 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_cluster_trust_bundle`") # noqa: E501 collection_formats = {} @@ -993,10 +1257,10 @@ def read_cluster_trust_bundle_with_http_info(self, name, **kwargs): # noqa: E50 path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1004,11 +1268,16 @@ def read_cluster_trust_bundle_with_http_info(self, name, **kwargs): # noqa: E50 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1alpha1ClusterTrustBundle", + 401: None, + } + return self.api_client.call_api( '/apis/certificates.k8s.io/v1alpha1/clustertrustbundles/{name}', 'GET', path_params, @@ -1017,13 +1286,14 @@ def read_cluster_trust_bundle_with_http_info(self, name, **kwargs): # noqa: E50 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1alpha1ClusterTrustBundle', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_cluster_trust_bundle(self, name, body, **kwargs): # noqa: E501 """replace_cluster_trust_bundle # noqa: E501 @@ -1031,26 +1301,36 @@ def replace_cluster_trust_bundle(self, name, body, **kwargs): # noqa: E501 replace the specified ClusterTrustBundle # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_cluster_trust_bundle(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ClusterTrustBundle (required) - :param V1alpha1ClusterTrustBundle body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the ClusterTrustBundle (required) + :type name: str + :param body: (required) + :type body: V1alpha1ClusterTrustBundle + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1alpha1ClusterTrustBundle + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1alpha1ClusterTrustBundle """ kwargs['_return_http_data_only'] = True return self.replace_cluster_trust_bundle_with_http_info(name, body, **kwargs) # noqa: E501 @@ -1061,28 +1341,44 @@ def replace_cluster_trust_bundle_with_http_info(self, name, body, **kwargs): # replace the specified ClusterTrustBundle # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_cluster_trust_bundle_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ClusterTrustBundle (required) - :param V1alpha1ClusterTrustBundle body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the ClusterTrustBundle (required) + :type name: str + :param body: (required) + :type body: V1alpha1ClusterTrustBundle + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1alpha1ClusterTrustBundle, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1alpha1ClusterTrustBundle, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1100,7 +1396,10 @@ def replace_cluster_trust_bundle_with_http_info(self, name, body, **kwargs): # 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1113,12 +1412,10 @@ def replace_cluster_trust_bundle_with_http_info(self, name, body, **kwargs): # local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_cluster_trust_bundle`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_cluster_trust_bundle`") # noqa: E501 collection_formats = {} @@ -1128,16 +1425,16 @@ def replace_cluster_trust_bundle_with_http_info(self, name, body, **kwargs): # path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1147,11 +1444,17 @@ def replace_cluster_trust_bundle_with_http_info(self, name, body, **kwargs): # body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1alpha1ClusterTrustBundle", + 201: "V1alpha1ClusterTrustBundle", + 401: None, + } + return self.api_client.call_api( '/apis/certificates.k8s.io/v1alpha1/clustertrustbundles/{name}', 'PUT', path_params, @@ -1160,10 +1463,11 @@ def replace_cluster_trust_bundle_with_http_info(self, name, body, **kwargs): # body=body_params, post_params=form_params, files=local_var_files, - response_type='V1alpha1ClusterTrustBundle', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) diff --git a/kubernetes/client/api/certificates_v1beta1_api.py b/kubernetes/client/api/certificates_v1beta1_api.py new file mode 100644 index 0000000000..75dcf4b26d --- /dev/null +++ b/kubernetes/client/api/certificates_v1beta1_api.py @@ -0,0 +1,3600 @@ +# coding: utf-8 + +""" + Kubernetes + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: release-1.35 + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from kubernetes.client.api_client import ApiClient +from kubernetes.client.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class CertificatesV1beta1Api(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def create_cluster_trust_bundle(self, body, **kwargs): # noqa: E501 + """create_cluster_trust_bundle # noqa: E501 + + create a ClusterTrustBundle # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_cluster_trust_bundle(body, async_req=True) + >>> result = thread.get() + + :param body: (required) + :type body: V1beta1ClusterTrustBundle + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1ClusterTrustBundle + """ + kwargs['_return_http_data_only'] = True + return self.create_cluster_trust_bundle_with_http_info(body, **kwargs) # noqa: E501 + + def create_cluster_trust_bundle_with_http_info(self, body, **kwargs): # noqa: E501 + """create_cluster_trust_bundle # noqa: E501 + + create a ClusterTrustBundle # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_cluster_trust_bundle_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param body: (required) + :type body: V1beta1ClusterTrustBundle + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1ClusterTrustBundle, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_cluster_trust_bundle" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `create_cluster_trust_bundle`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1ClusterTrustBundle", + 201: "V1beta1ClusterTrustBundle", + 202: "V1beta1ClusterTrustBundle", + 401: None, + } + + return self.api_client.call_api( + '/apis/certificates.k8s.io/v1beta1/clustertrustbundles', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def create_namespaced_pod_certificate_request(self, namespace, body, **kwargs): # noqa: E501 + """create_namespaced_pod_certificate_request # noqa: E501 + + create a PodCertificateRequest # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_namespaced_pod_certificate_request(namespace, body, async_req=True) + >>> result = thread.get() + + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1beta1PodCertificateRequest + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1PodCertificateRequest + """ + kwargs['_return_http_data_only'] = True + return self.create_namespaced_pod_certificate_request_with_http_info(namespace, body, **kwargs) # noqa: E501 + + def create_namespaced_pod_certificate_request_with_http_info(self, namespace, body, **kwargs): # noqa: E501 + """create_namespaced_pod_certificate_request # noqa: E501 + + create a PodCertificateRequest # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_namespaced_pod_certificate_request_with_http_info(namespace, body, async_req=True) + >>> result = thread.get() + + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1beta1PodCertificateRequest + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1PodCertificateRequest, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'namespace', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_namespaced_pod_certificate_request" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_pod_certificate_request`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_pod_certificate_request`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1PodCertificateRequest", + 201: "V1beta1PodCertificateRequest", + 202: "V1beta1PodCertificateRequest", + 401: None, + } + + return self.api_client.call_api( + '/apis/certificates.k8s.io/v1beta1/namespaces/{namespace}/podcertificaterequests', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_cluster_trust_bundle(self, name, **kwargs): # noqa: E501 + """delete_cluster_trust_bundle # noqa: E501 + + delete a ClusterTrustBundle # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_cluster_trust_bundle(name, async_req=True) + >>> result = thread.get() + + :param name: name of the ClusterTrustBundle (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1Status + """ + kwargs['_return_http_data_only'] = True + return self.delete_cluster_trust_bundle_with_http_info(name, **kwargs) # noqa: E501 + + def delete_cluster_trust_bundle_with_http_info(self, name, **kwargs): # noqa: E501 + """delete_cluster_trust_bundle # noqa: E501 + + delete a ClusterTrustBundle # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_cluster_trust_bundle_with_http_info(name, async_req=True) + >>> result = thread.get() + + :param name: name of the ClusterTrustBundle (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'pretty', + 'dry_run', + 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', + 'orphan_dependents', + 'propagation_policy', + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_cluster_trust_bundle" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `delete_cluster_trust_bundle`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 + query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 + query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 + query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1Status", + 202: "V1Status", + 401: None, + } + + return self.api_client.call_api( + '/apis/certificates.k8s.io/v1beta1/clustertrustbundles/{name}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_collection_cluster_trust_bundle(self, **kwargs): # noqa: E501 + """delete_collection_cluster_trust_bundle # noqa: E501 + + delete collection of ClusterTrustBundle # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_collection_cluster_trust_bundle(async_req=True) + >>> result = thread.get() + + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1Status + """ + kwargs['_return_http_data_only'] = True + return self.delete_collection_cluster_trust_bundle_with_http_info(**kwargs) # noqa: E501 + + def delete_collection_cluster_trust_bundle_with_http_info(self, **kwargs): # noqa: E501 + """delete_collection_cluster_trust_bundle # noqa: E501 + + delete collection of ClusterTrustBundle # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_collection_cluster_trust_bundle_with_http_info(async_req=True) + >>> result = thread.get() + + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'pretty', + '_continue', + 'dry_run', + 'field_selector', + 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', + 'label_selector', + 'limit', + 'orphan_dependents', + 'propagation_policy', + 'resource_version', + 'resource_version_match', + 'send_initial_events', + 'timeout_seconds', + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_collection_cluster_trust_bundle" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 + query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 + query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 + query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 + query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 + query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 + query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 + query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 + query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 + query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 + query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1Status", + 401: None, + } + + return self.api_client.call_api( + '/apis/certificates.k8s.io/v1beta1/clustertrustbundles', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_collection_namespaced_pod_certificate_request(self, namespace, **kwargs): # noqa: E501 + """delete_collection_namespaced_pod_certificate_request # noqa: E501 + + delete collection of PodCertificateRequest # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_collection_namespaced_pod_certificate_request(namespace, async_req=True) + >>> result = thread.get() + + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1Status + """ + kwargs['_return_http_data_only'] = True + return self.delete_collection_namespaced_pod_certificate_request_with_http_info(namespace, **kwargs) # noqa: E501 + + def delete_collection_namespaced_pod_certificate_request_with_http_info(self, namespace, **kwargs): # noqa: E501 + """delete_collection_namespaced_pod_certificate_request # noqa: E501 + + delete collection of PodCertificateRequest # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_collection_namespaced_pod_certificate_request_with_http_info(namespace, async_req=True) + >>> result = thread.get() + + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'namespace', + 'pretty', + '_continue', + 'dry_run', + 'field_selector', + 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', + 'label_selector', + 'limit', + 'orphan_dependents', + 'propagation_policy', + 'resource_version', + 'resource_version_match', + 'send_initial_events', + 'timeout_seconds', + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_collection_namespaced_pod_certificate_request" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_pod_certificate_request`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 + query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 + query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 + query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 + query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 + query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 + query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 + query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 + query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 + query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 + query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1Status", + 401: None, + } + + return self.api_client.call_api( + '/apis/certificates.k8s.io/v1beta1/namespaces/{namespace}/podcertificaterequests', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_namespaced_pod_certificate_request(self, name, namespace, **kwargs): # noqa: E501 + """delete_namespaced_pod_certificate_request # noqa: E501 + + delete a PodCertificateRequest # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_namespaced_pod_certificate_request(name, namespace, async_req=True) + >>> result = thread.get() + + :param name: name of the PodCertificateRequest (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1Status + """ + kwargs['_return_http_data_only'] = True + return self.delete_namespaced_pod_certificate_request_with_http_info(name, namespace, **kwargs) # noqa: E501 + + def delete_namespaced_pod_certificate_request_with_http_info(self, name, namespace, **kwargs): # noqa: E501 + """delete_namespaced_pod_certificate_request # noqa: E501 + + delete a PodCertificateRequest # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_namespaced_pod_certificate_request_with_http_info(name, namespace, async_req=True) + >>> result = thread.get() + + :param name: name of the PodCertificateRequest (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'namespace', + 'pretty', + 'dry_run', + 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', + 'orphan_dependents', + 'propagation_policy', + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_namespaced_pod_certificate_request" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_pod_certificate_request`") # noqa: E501 + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_pod_certificate_request`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 + query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 + query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 + query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1Status", + 202: "V1Status", + 401: None, + } + + return self.api_client.call_api( + '/apis/certificates.k8s.io/v1beta1/namespaces/{namespace}/podcertificaterequests/{name}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_api_resources(self, **kwargs): # noqa: E501 + """get_api_resources # noqa: E501 + + get available resources # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_api_resources(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1APIResourceList + """ + kwargs['_return_http_data_only'] = True + return self.get_api_resources_with_http_info(**kwargs) # noqa: E501 + + def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 + """get_api_resources # noqa: E501 + + get available resources # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_api_resources_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_api_resources" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1APIResourceList", + 401: None, + } + + return self.api_client.call_api( + '/apis/certificates.k8s.io/v1beta1/', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def list_cluster_trust_bundle(self, **kwargs): # noqa: E501 + """list_cluster_trust_bundle # noqa: E501 + + list or watch objects of kind ClusterTrustBundle # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_cluster_trust_bundle(async_req=True) + >>> result = thread.get() + + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1ClusterTrustBundleList + """ + kwargs['_return_http_data_only'] = True + return self.list_cluster_trust_bundle_with_http_info(**kwargs) # noqa: E501 + + def list_cluster_trust_bundle_with_http_info(self, **kwargs): # noqa: E501 + """list_cluster_trust_bundle # noqa: E501 + + list or watch objects of kind ClusterTrustBundle # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_cluster_trust_bundle_with_http_info(async_req=True) + >>> result = thread.get() + + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1ClusterTrustBundleList, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'pretty', + 'allow_watch_bookmarks', + '_continue', + 'field_selector', + 'label_selector', + 'limit', + 'resource_version', + 'resource_version_match', + 'send_initial_events', + 'timeout_seconds', + 'watch' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_cluster_trust_bundle" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 + query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 + query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 + query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 + query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 + query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 + query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 + query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 + query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 + query_params.append(('watch', local_var_params['watch'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1ClusterTrustBundleList", + 401: None, + } + + return self.api_client.call_api( + '/apis/certificates.k8s.io/v1beta1/clustertrustbundles', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def list_namespaced_pod_certificate_request(self, namespace, **kwargs): # noqa: E501 + """list_namespaced_pod_certificate_request # noqa: E501 + + list or watch objects of kind PodCertificateRequest # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_namespaced_pod_certificate_request(namespace, async_req=True) + >>> result = thread.get() + + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1PodCertificateRequestList + """ + kwargs['_return_http_data_only'] = True + return self.list_namespaced_pod_certificate_request_with_http_info(namespace, **kwargs) # noqa: E501 + + def list_namespaced_pod_certificate_request_with_http_info(self, namespace, **kwargs): # noqa: E501 + """list_namespaced_pod_certificate_request # noqa: E501 + + list or watch objects of kind PodCertificateRequest # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_namespaced_pod_certificate_request_with_http_info(namespace, async_req=True) + >>> result = thread.get() + + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1PodCertificateRequestList, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'namespace', + 'pretty', + 'allow_watch_bookmarks', + '_continue', + 'field_selector', + 'label_selector', + 'limit', + 'resource_version', + 'resource_version_match', + 'send_initial_events', + 'timeout_seconds', + 'watch' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_namespaced_pod_certificate_request" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_pod_certificate_request`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 + query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 + query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 + query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 + query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 + query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 + query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 + query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 + query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 + query_params.append(('watch', local_var_params['watch'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1PodCertificateRequestList", + 401: None, + } + + return self.api_client.call_api( + '/apis/certificates.k8s.io/v1beta1/namespaces/{namespace}/podcertificaterequests', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def list_pod_certificate_request_for_all_namespaces(self, **kwargs): # noqa: E501 + """list_pod_certificate_request_for_all_namespaces # noqa: E501 + + list or watch objects of kind PodCertificateRequest # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_pod_certificate_request_for_all_namespaces(async_req=True) + >>> result = thread.get() + + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1PodCertificateRequestList + """ + kwargs['_return_http_data_only'] = True + return self.list_pod_certificate_request_for_all_namespaces_with_http_info(**kwargs) # noqa: E501 + + def list_pod_certificate_request_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501 + """list_pod_certificate_request_for_all_namespaces # noqa: E501 + + list or watch objects of kind PodCertificateRequest # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_pod_certificate_request_for_all_namespaces_with_http_info(async_req=True) + >>> result = thread.get() + + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1PodCertificateRequestList, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'allow_watch_bookmarks', + '_continue', + 'field_selector', + 'label_selector', + 'limit', + 'pretty', + 'resource_version', + 'resource_version_match', + 'send_initial_events', + 'timeout_seconds', + 'watch' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_pod_certificate_request_for_all_namespaces" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 + query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 + query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 + query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 + query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 + query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 + query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 + query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 + query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 + query_params.append(('watch', local_var_params['watch'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1PodCertificateRequestList", + 401: None, + } + + return self.api_client.call_api( + '/apis/certificates.k8s.io/v1beta1/podcertificaterequests', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def patch_cluster_trust_bundle(self, name, body, **kwargs): # noqa: E501 + """patch_cluster_trust_bundle # noqa: E501 + + partially update the specified ClusterTrustBundle # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_cluster_trust_bundle(name, body, async_req=True) + >>> result = thread.get() + + :param name: name of the ClusterTrustBundle (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1ClusterTrustBundle + """ + kwargs['_return_http_data_only'] = True + return self.patch_cluster_trust_bundle_with_http_info(name, body, **kwargs) # noqa: E501 + + def patch_cluster_trust_bundle_with_http_info(self, name, body, **kwargs): # noqa: E501 + """patch_cluster_trust_bundle # noqa: E501 + + partially update the specified ClusterTrustBundle # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_cluster_trust_bundle_with_http_info(name, body, async_req=True) + >>> result = thread.get() + + :param name: name of the ClusterTrustBundle (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1ClusterTrustBundle, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation', + 'force' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method patch_cluster_trust_bundle" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `patch_cluster_trust_bundle`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `patch_cluster_trust_bundle`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 + query_params.append(('force', local_var_params['force'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # HTTP header `Content-Type` + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1ClusterTrustBundle", + 201: "V1beta1ClusterTrustBundle", + 401: None, + } + + return self.api_client.call_api( + '/apis/certificates.k8s.io/v1beta1/clustertrustbundles/{name}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def patch_namespaced_pod_certificate_request(self, name, namespace, body, **kwargs): # noqa: E501 + """patch_namespaced_pod_certificate_request # noqa: E501 + + partially update the specified PodCertificateRequest # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_namespaced_pod_certificate_request(name, namespace, body, async_req=True) + >>> result = thread.get() + + :param name: name of the PodCertificateRequest (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1PodCertificateRequest + """ + kwargs['_return_http_data_only'] = True + return self.patch_namespaced_pod_certificate_request_with_http_info(name, namespace, body, **kwargs) # noqa: E501 + + def patch_namespaced_pod_certificate_request_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501 + """patch_namespaced_pod_certificate_request # noqa: E501 + + partially update the specified PodCertificateRequest # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_namespaced_pod_certificate_request_with_http_info(name, namespace, body, async_req=True) + >>> result = thread.get() + + :param name: name of the PodCertificateRequest (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1PodCertificateRequest, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'namespace', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation', + 'force' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method patch_namespaced_pod_certificate_request" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_pod_certificate_request`") # noqa: E501 + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_pod_certificate_request`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_pod_certificate_request`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 + query_params.append(('force', local_var_params['force'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # HTTP header `Content-Type` + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1PodCertificateRequest", + 201: "V1beta1PodCertificateRequest", + 401: None, + } + + return self.api_client.call_api( + '/apis/certificates.k8s.io/v1beta1/namespaces/{namespace}/podcertificaterequests/{name}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def patch_namespaced_pod_certificate_request_status(self, name, namespace, body, **kwargs): # noqa: E501 + """patch_namespaced_pod_certificate_request_status # noqa: E501 + + partially update status of the specified PodCertificateRequest # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_namespaced_pod_certificate_request_status(name, namespace, body, async_req=True) + >>> result = thread.get() + + :param name: name of the PodCertificateRequest (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1PodCertificateRequest + """ + kwargs['_return_http_data_only'] = True + return self.patch_namespaced_pod_certificate_request_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501 + + def patch_namespaced_pod_certificate_request_status_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501 + """patch_namespaced_pod_certificate_request_status # noqa: E501 + + partially update status of the specified PodCertificateRequest # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_namespaced_pod_certificate_request_status_with_http_info(name, namespace, body, async_req=True) + >>> result = thread.get() + + :param name: name of the PodCertificateRequest (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1PodCertificateRequest, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'namespace', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation', + 'force' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method patch_namespaced_pod_certificate_request_status" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_pod_certificate_request_status`") # noqa: E501 + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_pod_certificate_request_status`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_pod_certificate_request_status`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 + query_params.append(('force', local_var_params['force'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # HTTP header `Content-Type` + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1PodCertificateRequest", + 201: "V1beta1PodCertificateRequest", + 401: None, + } + + return self.api_client.call_api( + '/apis/certificates.k8s.io/v1beta1/namespaces/{namespace}/podcertificaterequests/{name}/status', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def read_cluster_trust_bundle(self, name, **kwargs): # noqa: E501 + """read_cluster_trust_bundle # noqa: E501 + + read the specified ClusterTrustBundle # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.read_cluster_trust_bundle(name, async_req=True) + >>> result = thread.get() + + :param name: name of the ClusterTrustBundle (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1ClusterTrustBundle + """ + kwargs['_return_http_data_only'] = True + return self.read_cluster_trust_bundle_with_http_info(name, **kwargs) # noqa: E501 + + def read_cluster_trust_bundle_with_http_info(self, name, **kwargs): # noqa: E501 + """read_cluster_trust_bundle # noqa: E501 + + read the specified ClusterTrustBundle # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.read_cluster_trust_bundle_with_http_info(name, async_req=True) + >>> result = thread.get() + + :param name: name of the ClusterTrustBundle (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1ClusterTrustBundle, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'pretty' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method read_cluster_trust_bundle" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `read_cluster_trust_bundle`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1ClusterTrustBundle", + 401: None, + } + + return self.api_client.call_api( + '/apis/certificates.k8s.io/v1beta1/clustertrustbundles/{name}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def read_namespaced_pod_certificate_request(self, name, namespace, **kwargs): # noqa: E501 + """read_namespaced_pod_certificate_request # noqa: E501 + + read the specified PodCertificateRequest # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.read_namespaced_pod_certificate_request(name, namespace, async_req=True) + >>> result = thread.get() + + :param name: name of the PodCertificateRequest (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1PodCertificateRequest + """ + kwargs['_return_http_data_only'] = True + return self.read_namespaced_pod_certificate_request_with_http_info(name, namespace, **kwargs) # noqa: E501 + + def read_namespaced_pod_certificate_request_with_http_info(self, name, namespace, **kwargs): # noqa: E501 + """read_namespaced_pod_certificate_request # noqa: E501 + + read the specified PodCertificateRequest # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.read_namespaced_pod_certificate_request_with_http_info(name, namespace, async_req=True) + >>> result = thread.get() + + :param name: name of the PodCertificateRequest (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1PodCertificateRequest, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'namespace', + 'pretty' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method read_namespaced_pod_certificate_request" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_pod_certificate_request`") # noqa: E501 + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_pod_certificate_request`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1PodCertificateRequest", + 401: None, + } + + return self.api_client.call_api( + '/apis/certificates.k8s.io/v1beta1/namespaces/{namespace}/podcertificaterequests/{name}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def read_namespaced_pod_certificate_request_status(self, name, namespace, **kwargs): # noqa: E501 + """read_namespaced_pod_certificate_request_status # noqa: E501 + + read status of the specified PodCertificateRequest # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.read_namespaced_pod_certificate_request_status(name, namespace, async_req=True) + >>> result = thread.get() + + :param name: name of the PodCertificateRequest (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1PodCertificateRequest + """ + kwargs['_return_http_data_only'] = True + return self.read_namespaced_pod_certificate_request_status_with_http_info(name, namespace, **kwargs) # noqa: E501 + + def read_namespaced_pod_certificate_request_status_with_http_info(self, name, namespace, **kwargs): # noqa: E501 + """read_namespaced_pod_certificate_request_status # noqa: E501 + + read status of the specified PodCertificateRequest # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.read_namespaced_pod_certificate_request_status_with_http_info(name, namespace, async_req=True) + >>> result = thread.get() + + :param name: name of the PodCertificateRequest (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1PodCertificateRequest, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'namespace', + 'pretty' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method read_namespaced_pod_certificate_request_status" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_pod_certificate_request_status`") # noqa: E501 + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_pod_certificate_request_status`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1PodCertificateRequest", + 401: None, + } + + return self.api_client.call_api( + '/apis/certificates.k8s.io/v1beta1/namespaces/{namespace}/podcertificaterequests/{name}/status', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def replace_cluster_trust_bundle(self, name, body, **kwargs): # noqa: E501 + """replace_cluster_trust_bundle # noqa: E501 + + replace the specified ClusterTrustBundle # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.replace_cluster_trust_bundle(name, body, async_req=True) + >>> result = thread.get() + + :param name: name of the ClusterTrustBundle (required) + :type name: str + :param body: (required) + :type body: V1beta1ClusterTrustBundle + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1ClusterTrustBundle + """ + kwargs['_return_http_data_only'] = True + return self.replace_cluster_trust_bundle_with_http_info(name, body, **kwargs) # noqa: E501 + + def replace_cluster_trust_bundle_with_http_info(self, name, body, **kwargs): # noqa: E501 + """replace_cluster_trust_bundle # noqa: E501 + + replace the specified ClusterTrustBundle # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.replace_cluster_trust_bundle_with_http_info(name, body, async_req=True) + >>> result = thread.get() + + :param name: name of the ClusterTrustBundle (required) + :type name: str + :param body: (required) + :type body: V1beta1ClusterTrustBundle + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1ClusterTrustBundle, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method replace_cluster_trust_bundle" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `replace_cluster_trust_bundle`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `replace_cluster_trust_bundle`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1ClusterTrustBundle", + 201: "V1beta1ClusterTrustBundle", + 401: None, + } + + return self.api_client.call_api( + '/apis/certificates.k8s.io/v1beta1/clustertrustbundles/{name}', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def replace_namespaced_pod_certificate_request(self, name, namespace, body, **kwargs): # noqa: E501 + """replace_namespaced_pod_certificate_request # noqa: E501 + + replace the specified PodCertificateRequest # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.replace_namespaced_pod_certificate_request(name, namespace, body, async_req=True) + >>> result = thread.get() + + :param name: name of the PodCertificateRequest (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1beta1PodCertificateRequest + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1PodCertificateRequest + """ + kwargs['_return_http_data_only'] = True + return self.replace_namespaced_pod_certificate_request_with_http_info(name, namespace, body, **kwargs) # noqa: E501 + + def replace_namespaced_pod_certificate_request_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501 + """replace_namespaced_pod_certificate_request # noqa: E501 + + replace the specified PodCertificateRequest # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.replace_namespaced_pod_certificate_request_with_http_info(name, namespace, body, async_req=True) + >>> result = thread.get() + + :param name: name of the PodCertificateRequest (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1beta1PodCertificateRequest + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1PodCertificateRequest, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'namespace', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method replace_namespaced_pod_certificate_request" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_pod_certificate_request`") # noqa: E501 + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_pod_certificate_request`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_pod_certificate_request`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1PodCertificateRequest", + 201: "V1beta1PodCertificateRequest", + 401: None, + } + + return self.api_client.call_api( + '/apis/certificates.k8s.io/v1beta1/namespaces/{namespace}/podcertificaterequests/{name}', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def replace_namespaced_pod_certificate_request_status(self, name, namespace, body, **kwargs): # noqa: E501 + """replace_namespaced_pod_certificate_request_status # noqa: E501 + + replace status of the specified PodCertificateRequest # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.replace_namespaced_pod_certificate_request_status(name, namespace, body, async_req=True) + >>> result = thread.get() + + :param name: name of the PodCertificateRequest (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1beta1PodCertificateRequest + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1PodCertificateRequest + """ + kwargs['_return_http_data_only'] = True + return self.replace_namespaced_pod_certificate_request_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501 + + def replace_namespaced_pod_certificate_request_status_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501 + """replace_namespaced_pod_certificate_request_status # noqa: E501 + + replace status of the specified PodCertificateRequest # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.replace_namespaced_pod_certificate_request_status_with_http_info(name, namespace, body, async_req=True) + >>> result = thread.get() + + :param name: name of the PodCertificateRequest (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1beta1PodCertificateRequest + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1PodCertificateRequest, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'namespace', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method replace_namespaced_pod_certificate_request_status" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_pod_certificate_request_status`") # noqa: E501 + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_pod_certificate_request_status`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_pod_certificate_request_status`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1PodCertificateRequest", + 201: "V1beta1PodCertificateRequest", + 401: None, + } + + return self.api_client.call_api( + '/apis/certificates.k8s.io/v1beta1/namespaces/{namespace}/podcertificaterequests/{name}/status', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) diff --git a/kubernetes/client/api/coordination_api.py b/kubernetes/client/api/coordination_api.py index 0c4a44ad65..6fe365d750 100644 --- a/kubernetes/client/api/coordination_api.py +++ b/kubernetes/client/api/coordination_api.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ @@ -42,20 +42,24 @@ def get_api_group(self, **kwargs): # noqa: E501 get information of a group # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_group(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1APIGroup + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1APIGroup """ kwargs['_return_http_data_only'] = True return self.get_api_group_with_http_info(**kwargs) # noqa: E501 @@ -66,22 +70,32 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 get information of a group # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_group_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1APIGroup, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1APIGroup, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -93,7 +107,10 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -112,7 +129,7 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -125,6 +142,11 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1APIGroup", + 401: None, + } + return self.api_client.call_api( '/apis/coordination.k8s.io/', 'GET', path_params, @@ -133,10 +155,11 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1APIGroup', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) diff --git a/kubernetes/client/api/coordination_v1_api.py b/kubernetes/client/api/coordination_v1_api.py index ccaad8cea6..7b7dfaeeeb 100644 --- a/kubernetes/client/api/coordination_v1_api.py +++ b/kubernetes/client/api/coordination_v1_api.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ @@ -42,26 +42,36 @@ def create_namespaced_lease(self, namespace, body, **kwargs): # noqa: E501 create a Lease # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_namespaced_lease(namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1Lease body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1Lease + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Lease + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Lease """ kwargs['_return_http_data_only'] = True return self.create_namespaced_lease_with_http_info(namespace, body, **kwargs) # noqa: E501 @@ -72,28 +82,44 @@ def create_namespaced_lease_with_http_info(self, namespace, body, **kwargs): # create a Lease # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_namespaced_lease_with_http_info(namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1Lease body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1Lease + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Lease, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Lease, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -111,7 +137,10 @@ def create_namespaced_lease_with_http_info(self, namespace, body, **kwargs): # 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -124,12 +153,10 @@ def create_namespaced_lease_with_http_info(self, namespace, body, **kwargs): # local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_lease`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_lease`") # noqa: E501 collection_formats = {} @@ -139,16 +166,16 @@ def create_namespaced_lease_with_http_info(self, namespace, body, **kwargs): # path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -158,11 +185,18 @@ def create_namespaced_lease_with_http_info(self, namespace, body, **kwargs): # body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Lease", + 201: "V1Lease", + 202: "V1Lease", + 401: None, + } + return self.api_client.call_api( '/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases', 'POST', path_params, @@ -171,13 +205,14 @@ def create_namespaced_lease_with_http_info(self, namespace, body, **kwargs): # body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Lease', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_collection_namespaced_lease(self, namespace, **kwargs): # noqa: E501 """delete_collection_namespaced_lease # noqa: E501 @@ -185,35 +220,56 @@ def delete_collection_namespaced_lease(self, namespace, **kwargs): # noqa: E501 delete collection of Lease # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_namespaced_lease(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_collection_namespaced_lease_with_http_info(namespace, **kwargs) # noqa: E501 @@ -224,37 +280,64 @@ def delete_collection_namespaced_lease_with_http_info(self, namespace, **kwargs) delete collection of Lease # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_namespaced_lease_with_http_info(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -266,6 +349,7 @@ def delete_collection_namespaced_lease_with_http_info(self, namespace, **kwargs) 'dry_run', 'field_selector', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'label_selector', 'limit', 'orphan_dependents', @@ -281,7 +365,10 @@ def delete_collection_namespaced_lease_with_http_info(self, namespace, **kwargs) 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -294,8 +381,7 @@ def delete_collection_namespaced_lease_with_http_info(self, namespace, **kwargs) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_lease`") # noqa: E501 collection_formats = {} @@ -305,34 +391,36 @@ def delete_collection_namespaced_lease_with_http_info(self, namespace, **kwargs) path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -342,11 +430,16 @@ def delete_collection_namespaced_lease_with_http_info(self, namespace, **kwargs) body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 401: None, + } + return self.api_client.call_api( '/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases', 'DELETE', path_params, @@ -355,13 +448,14 @@ def delete_collection_namespaced_lease_with_http_info(self, namespace, **kwargs) body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_namespaced_lease(self, name, namespace, **kwargs): # noqa: E501 """delete_namespaced_lease # noqa: E501 @@ -369,28 +463,42 @@ def delete_namespaced_lease(self, name, namespace, **kwargs): # noqa: E501 delete a Lease # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_namespaced_lease(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Lease (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the Lease (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_namespaced_lease_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -401,30 +509,50 @@ def delete_namespaced_lease_with_http_info(self, name, namespace, **kwargs): # delete a Lease # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_namespaced_lease_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Lease (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the Lease (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -435,6 +563,7 @@ def delete_namespaced_lease_with_http_info(self, name, namespace, **kwargs): # 'pretty', 'dry_run', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'orphan_dependents', 'propagation_policy', 'body' @@ -444,7 +573,10 @@ def delete_namespaced_lease_with_http_info(self, name, namespace, **kwargs): # 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -457,12 +589,10 @@ def delete_namespaced_lease_with_http_info(self, name, namespace, **kwargs): # local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_lease`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_lease`") # noqa: E501 collection_formats = {} @@ -474,18 +604,20 @@ def delete_namespaced_lease_with_http_info(self, name, namespace, **kwargs): # path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -495,11 +627,17 @@ def delete_namespaced_lease_with_http_info(self, name, namespace, **kwargs): # body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 202: "V1Status", + 401: None, + } + return self.api_client.call_api( '/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}', 'DELETE', path_params, @@ -508,13 +646,14 @@ def delete_namespaced_lease_with_http_info(self, name, namespace, **kwargs): # body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def get_api_resources(self, **kwargs): # noqa: E501 """get_api_resources # noqa: E501 @@ -522,20 +661,24 @@ def get_api_resources(self, **kwargs): # noqa: E501 get available resources # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_resources(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1APIResourceList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1APIResourceList """ kwargs['_return_http_data_only'] = True return self.get_api_resources_with_http_info(**kwargs) # noqa: E501 @@ -546,22 +689,32 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 get available resources # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_resources_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -573,7 +726,10 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -592,7 +748,7 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -600,11 +756,16 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1APIResourceList", + 401: None, + } + return self.api_client.call_api( '/apis/coordination.k8s.io/v1/', 'GET', path_params, @@ -613,13 +774,14 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1APIResourceList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_lease_for_all_namespaces(self, **kwargs): # noqa: E501 """list_lease_for_all_namespaces # noqa: E501 @@ -627,31 +789,46 @@ def list_lease_for_all_namespaces(self, **kwargs): # noqa: E501 list or watch objects of kind Lease # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_lease_for_all_namespaces(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1LeaseList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1LeaseList """ kwargs['_return_http_data_only'] = True return self.list_lease_for_all_namespaces_with_http_info(**kwargs) # noqa: E501 @@ -662,33 +839,54 @@ def list_lease_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501 list or watch objects of kind Lease # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_lease_for_all_namespaces_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1LeaseList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1LeaseList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -711,7 +909,10 @@ def list_lease_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -729,30 +930,30 @@ def list_lease_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -760,11 +961,16 @@ def list_lease_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1LeaseList", + 401: None, + } + return self.api_client.call_api( '/apis/coordination.k8s.io/v1/leases', 'GET', path_params, @@ -773,13 +979,14 @@ def list_lease_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1LeaseList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_namespaced_lease(self, namespace, **kwargs): # noqa: E501 """list_namespaced_lease # noqa: E501 @@ -787,32 +994,48 @@ def list_namespaced_lease(self, namespace, **kwargs): # noqa: E501 list or watch objects of kind Lease # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_namespaced_lease(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1LeaseList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1LeaseList """ kwargs['_return_http_data_only'] = True return self.list_namespaced_lease_with_http_info(namespace, **kwargs) # noqa: E501 @@ -823,34 +1046,56 @@ def list_namespaced_lease_with_http_info(self, namespace, **kwargs): # noqa: E5 list or watch objects of kind Lease # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_namespaced_lease_with_http_info(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1LeaseList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1LeaseList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -874,7 +1119,10 @@ def list_namespaced_lease_with_http_info(self, namespace, **kwargs): # noqa: E5 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -887,8 +1135,7 @@ def list_namespaced_lease_with_http_info(self, namespace, **kwargs): # noqa: E5 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_lease`") # noqa: E501 collection_formats = {} @@ -898,30 +1145,30 @@ def list_namespaced_lease_with_http_info(self, namespace, **kwargs): # noqa: E5 path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -929,11 +1176,16 @@ def list_namespaced_lease_with_http_info(self, namespace, **kwargs): # noqa: E5 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1LeaseList", + 401: None, + } + return self.api_client.call_api( '/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases', 'GET', path_params, @@ -942,13 +1194,14 @@ def list_namespaced_lease_with_http_info(self, namespace, **kwargs): # noqa: E5 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1LeaseList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_namespaced_lease(self, name, namespace, body, **kwargs): # noqa: E501 """patch_namespaced_lease # noqa: E501 @@ -956,28 +1209,40 @@ def patch_namespaced_lease(self, name, namespace, body, **kwargs): # noqa: E501 partially update the specified Lease # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_lease(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Lease (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the Lease (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Lease + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Lease """ kwargs['_return_http_data_only'] = True return self.patch_namespaced_lease_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -988,30 +1253,48 @@ def patch_namespaced_lease_with_http_info(self, name, namespace, body, **kwargs) partially update the specified Lease # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_lease_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Lease (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the Lease (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Lease, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Lease, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1031,7 +1314,10 @@ def patch_namespaced_lease_with_http_info(self, name, namespace, body, **kwargs) 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1044,16 +1330,13 @@ def patch_namespaced_lease_with_http_info(self, name, namespace, body, **kwargs) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_lease`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_lease`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_lease`") # noqa: E501 collection_formats = {} @@ -1065,18 +1348,18 @@ def patch_namespaced_lease_with_http_info(self, name, namespace, body, **kwargs) path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1086,15 +1369,25 @@ def patch_namespaced_lease_with_http_info(self, name, namespace, body, **kwargs) body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Lease", + 201: "V1Lease", + 401: None, + } + return self.api_client.call_api( '/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}', 'PATCH', path_params, @@ -1103,13 +1396,14 @@ def patch_namespaced_lease_with_http_info(self, name, namespace, body, **kwargs) body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Lease', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_namespaced_lease(self, name, namespace, **kwargs): # noqa: E501 """read_namespaced_lease # noqa: E501 @@ -1117,23 +1411,30 @@ def read_namespaced_lease(self, name, namespace, **kwargs): # noqa: E501 read the specified Lease # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_lease(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Lease (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the Lease (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Lease + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Lease """ kwargs['_return_http_data_only'] = True return self.read_namespaced_lease_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -1144,25 +1445,38 @@ def read_namespaced_lease_with_http_info(self, name, namespace, **kwargs): # no read the specified Lease # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_lease_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Lease (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the Lease (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Lease, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Lease, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1177,7 +1491,10 @@ def read_namespaced_lease_with_http_info(self, name, namespace, **kwargs): # no 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1190,12 +1507,10 @@ def read_namespaced_lease_with_http_info(self, name, namespace, **kwargs): # no local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_lease`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_lease`") # noqa: E501 collection_formats = {} @@ -1207,10 +1522,10 @@ def read_namespaced_lease_with_http_info(self, name, namespace, **kwargs): # no path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1218,11 +1533,16 @@ def read_namespaced_lease_with_http_info(self, name, namespace, **kwargs): # no body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Lease", + 401: None, + } + return self.api_client.call_api( '/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}', 'GET', path_params, @@ -1231,13 +1551,14 @@ def read_namespaced_lease_with_http_info(self, name, namespace, **kwargs): # no body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Lease', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_namespaced_lease(self, name, namespace, body, **kwargs): # noqa: E501 """replace_namespaced_lease # noqa: E501 @@ -1245,27 +1566,38 @@ def replace_namespaced_lease(self, name, namespace, body, **kwargs): # noqa: E5 replace the specified Lease # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_lease(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Lease (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1Lease body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the Lease (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1Lease + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Lease + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Lease """ kwargs['_return_http_data_only'] = True return self.replace_namespaced_lease_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -1276,29 +1608,46 @@ def replace_namespaced_lease_with_http_info(self, name, namespace, body, **kwarg replace the specified Lease # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_lease_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Lease (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1Lease body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the Lease (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1Lease + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Lease, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Lease, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1317,7 +1666,10 @@ def replace_namespaced_lease_with_http_info(self, name, namespace, body, **kwarg 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1330,16 +1682,13 @@ def replace_namespaced_lease_with_http_info(self, name, namespace, body, **kwarg local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_lease`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_lease`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_lease`") # noqa: E501 collection_formats = {} @@ -1351,16 +1700,16 @@ def replace_namespaced_lease_with_http_info(self, name, namespace, body, **kwarg path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1370,11 +1719,17 @@ def replace_namespaced_lease_with_http_info(self, name, namespace, body, **kwarg body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Lease", + 201: "V1Lease", + 401: None, + } + return self.api_client.call_api( '/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}', 'PUT', path_params, @@ -1383,10 +1738,11 @@ def replace_namespaced_lease_with_http_info(self, name, namespace, body, **kwarg body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Lease', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) diff --git a/kubernetes/client/api/coordination_v1alpha2_api.py b/kubernetes/client/api/coordination_v1alpha2_api.py new file mode 100644 index 0000000000..f6633caf00 --- /dev/null +++ b/kubernetes/client/api/coordination_v1alpha2_api.py @@ -0,0 +1,1748 @@ +# coding: utf-8 + +""" + Kubernetes + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: release-1.35 + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from kubernetes.client.api_client import ApiClient +from kubernetes.client.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class CoordinationV1alpha2Api(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def create_namespaced_lease_candidate(self, namespace, body, **kwargs): # noqa: E501 + """create_namespaced_lease_candidate # noqa: E501 + + create a LeaseCandidate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_namespaced_lease_candidate(namespace, body, async_req=True) + >>> result = thread.get() + + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1alpha2LeaseCandidate + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1alpha2LeaseCandidate + """ + kwargs['_return_http_data_only'] = True + return self.create_namespaced_lease_candidate_with_http_info(namespace, body, **kwargs) # noqa: E501 + + def create_namespaced_lease_candidate_with_http_info(self, namespace, body, **kwargs): # noqa: E501 + """create_namespaced_lease_candidate # noqa: E501 + + create a LeaseCandidate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_namespaced_lease_candidate_with_http_info(namespace, body, async_req=True) + >>> result = thread.get() + + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1alpha2LeaseCandidate + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1alpha2LeaseCandidate, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'namespace', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_namespaced_lease_candidate" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_lease_candidate`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_lease_candidate`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1alpha2LeaseCandidate", + 201: "V1alpha2LeaseCandidate", + 202: "V1alpha2LeaseCandidate", + 401: None, + } + + return self.api_client.call_api( + '/apis/coordination.k8s.io/v1alpha2/namespaces/{namespace}/leasecandidates', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_collection_namespaced_lease_candidate(self, namespace, **kwargs): # noqa: E501 + """delete_collection_namespaced_lease_candidate # noqa: E501 + + delete collection of LeaseCandidate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_collection_namespaced_lease_candidate(namespace, async_req=True) + >>> result = thread.get() + + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1Status + """ + kwargs['_return_http_data_only'] = True + return self.delete_collection_namespaced_lease_candidate_with_http_info(namespace, **kwargs) # noqa: E501 + + def delete_collection_namespaced_lease_candidate_with_http_info(self, namespace, **kwargs): # noqa: E501 + """delete_collection_namespaced_lease_candidate # noqa: E501 + + delete collection of LeaseCandidate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_collection_namespaced_lease_candidate_with_http_info(namespace, async_req=True) + >>> result = thread.get() + + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'namespace', + 'pretty', + '_continue', + 'dry_run', + 'field_selector', + 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', + 'label_selector', + 'limit', + 'orphan_dependents', + 'propagation_policy', + 'resource_version', + 'resource_version_match', + 'send_initial_events', + 'timeout_seconds', + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_collection_namespaced_lease_candidate" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_lease_candidate`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 + query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 + query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 + query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 + query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 + query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 + query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 + query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 + query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 + query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 + query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1Status", + 401: None, + } + + return self.api_client.call_api( + '/apis/coordination.k8s.io/v1alpha2/namespaces/{namespace}/leasecandidates', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_namespaced_lease_candidate(self, name, namespace, **kwargs): # noqa: E501 + """delete_namespaced_lease_candidate # noqa: E501 + + delete a LeaseCandidate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_namespaced_lease_candidate(name, namespace, async_req=True) + >>> result = thread.get() + + :param name: name of the LeaseCandidate (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1Status + """ + kwargs['_return_http_data_only'] = True + return self.delete_namespaced_lease_candidate_with_http_info(name, namespace, **kwargs) # noqa: E501 + + def delete_namespaced_lease_candidate_with_http_info(self, name, namespace, **kwargs): # noqa: E501 + """delete_namespaced_lease_candidate # noqa: E501 + + delete a LeaseCandidate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_namespaced_lease_candidate_with_http_info(name, namespace, async_req=True) + >>> result = thread.get() + + :param name: name of the LeaseCandidate (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'namespace', + 'pretty', + 'dry_run', + 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', + 'orphan_dependents', + 'propagation_policy', + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_namespaced_lease_candidate" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_lease_candidate`") # noqa: E501 + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_lease_candidate`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 + query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 + query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 + query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1Status", + 202: "V1Status", + 401: None, + } + + return self.api_client.call_api( + '/apis/coordination.k8s.io/v1alpha2/namespaces/{namespace}/leasecandidates/{name}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_api_resources(self, **kwargs): # noqa: E501 + """get_api_resources # noqa: E501 + + get available resources # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_api_resources(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1APIResourceList + """ + kwargs['_return_http_data_only'] = True + return self.get_api_resources_with_http_info(**kwargs) # noqa: E501 + + def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 + """get_api_resources # noqa: E501 + + get available resources # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_api_resources_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_api_resources" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1APIResourceList", + 401: None, + } + + return self.api_client.call_api( + '/apis/coordination.k8s.io/v1alpha2/', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def list_lease_candidate_for_all_namespaces(self, **kwargs): # noqa: E501 + """list_lease_candidate_for_all_namespaces # noqa: E501 + + list or watch objects of kind LeaseCandidate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_lease_candidate_for_all_namespaces(async_req=True) + >>> result = thread.get() + + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1alpha2LeaseCandidateList + """ + kwargs['_return_http_data_only'] = True + return self.list_lease_candidate_for_all_namespaces_with_http_info(**kwargs) # noqa: E501 + + def list_lease_candidate_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501 + """list_lease_candidate_for_all_namespaces # noqa: E501 + + list or watch objects of kind LeaseCandidate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_lease_candidate_for_all_namespaces_with_http_info(async_req=True) + >>> result = thread.get() + + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1alpha2LeaseCandidateList, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'allow_watch_bookmarks', + '_continue', + 'field_selector', + 'label_selector', + 'limit', + 'pretty', + 'resource_version', + 'resource_version_match', + 'send_initial_events', + 'timeout_seconds', + 'watch' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_lease_candidate_for_all_namespaces" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 + query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 + query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 + query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 + query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 + query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 + query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 + query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 + query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 + query_params.append(('watch', local_var_params['watch'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1alpha2LeaseCandidateList", + 401: None, + } + + return self.api_client.call_api( + '/apis/coordination.k8s.io/v1alpha2/leasecandidates', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def list_namespaced_lease_candidate(self, namespace, **kwargs): # noqa: E501 + """list_namespaced_lease_candidate # noqa: E501 + + list or watch objects of kind LeaseCandidate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_namespaced_lease_candidate(namespace, async_req=True) + >>> result = thread.get() + + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1alpha2LeaseCandidateList + """ + kwargs['_return_http_data_only'] = True + return self.list_namespaced_lease_candidate_with_http_info(namespace, **kwargs) # noqa: E501 + + def list_namespaced_lease_candidate_with_http_info(self, namespace, **kwargs): # noqa: E501 + """list_namespaced_lease_candidate # noqa: E501 + + list or watch objects of kind LeaseCandidate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_namespaced_lease_candidate_with_http_info(namespace, async_req=True) + >>> result = thread.get() + + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1alpha2LeaseCandidateList, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'namespace', + 'pretty', + 'allow_watch_bookmarks', + '_continue', + 'field_selector', + 'label_selector', + 'limit', + 'resource_version', + 'resource_version_match', + 'send_initial_events', + 'timeout_seconds', + 'watch' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_namespaced_lease_candidate" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_lease_candidate`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 + query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 + query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 + query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 + query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 + query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 + query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 + query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 + query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 + query_params.append(('watch', local_var_params['watch'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1alpha2LeaseCandidateList", + 401: None, + } + + return self.api_client.call_api( + '/apis/coordination.k8s.io/v1alpha2/namespaces/{namespace}/leasecandidates', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def patch_namespaced_lease_candidate(self, name, namespace, body, **kwargs): # noqa: E501 + """patch_namespaced_lease_candidate # noqa: E501 + + partially update the specified LeaseCandidate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_namespaced_lease_candidate(name, namespace, body, async_req=True) + >>> result = thread.get() + + :param name: name of the LeaseCandidate (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1alpha2LeaseCandidate + """ + kwargs['_return_http_data_only'] = True + return self.patch_namespaced_lease_candidate_with_http_info(name, namespace, body, **kwargs) # noqa: E501 + + def patch_namespaced_lease_candidate_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501 + """patch_namespaced_lease_candidate # noqa: E501 + + partially update the specified LeaseCandidate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_namespaced_lease_candidate_with_http_info(name, namespace, body, async_req=True) + >>> result = thread.get() + + :param name: name of the LeaseCandidate (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1alpha2LeaseCandidate, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'namespace', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation', + 'force' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method patch_namespaced_lease_candidate" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_lease_candidate`") # noqa: E501 + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_lease_candidate`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_lease_candidate`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 + query_params.append(('force', local_var_params['force'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # HTTP header `Content-Type` + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1alpha2LeaseCandidate", + 201: "V1alpha2LeaseCandidate", + 401: None, + } + + return self.api_client.call_api( + '/apis/coordination.k8s.io/v1alpha2/namespaces/{namespace}/leasecandidates/{name}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def read_namespaced_lease_candidate(self, name, namespace, **kwargs): # noqa: E501 + """read_namespaced_lease_candidate # noqa: E501 + + read the specified LeaseCandidate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.read_namespaced_lease_candidate(name, namespace, async_req=True) + >>> result = thread.get() + + :param name: name of the LeaseCandidate (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1alpha2LeaseCandidate + """ + kwargs['_return_http_data_only'] = True + return self.read_namespaced_lease_candidate_with_http_info(name, namespace, **kwargs) # noqa: E501 + + def read_namespaced_lease_candidate_with_http_info(self, name, namespace, **kwargs): # noqa: E501 + """read_namespaced_lease_candidate # noqa: E501 + + read the specified LeaseCandidate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.read_namespaced_lease_candidate_with_http_info(name, namespace, async_req=True) + >>> result = thread.get() + + :param name: name of the LeaseCandidate (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1alpha2LeaseCandidate, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'namespace', + 'pretty' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method read_namespaced_lease_candidate" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_lease_candidate`") # noqa: E501 + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_lease_candidate`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1alpha2LeaseCandidate", + 401: None, + } + + return self.api_client.call_api( + '/apis/coordination.k8s.io/v1alpha2/namespaces/{namespace}/leasecandidates/{name}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def replace_namespaced_lease_candidate(self, name, namespace, body, **kwargs): # noqa: E501 + """replace_namespaced_lease_candidate # noqa: E501 + + replace the specified LeaseCandidate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.replace_namespaced_lease_candidate(name, namespace, body, async_req=True) + >>> result = thread.get() + + :param name: name of the LeaseCandidate (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1alpha2LeaseCandidate + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1alpha2LeaseCandidate + """ + kwargs['_return_http_data_only'] = True + return self.replace_namespaced_lease_candidate_with_http_info(name, namespace, body, **kwargs) # noqa: E501 + + def replace_namespaced_lease_candidate_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501 + """replace_namespaced_lease_candidate # noqa: E501 + + replace the specified LeaseCandidate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.replace_namespaced_lease_candidate_with_http_info(name, namespace, body, async_req=True) + >>> result = thread.get() + + :param name: name of the LeaseCandidate (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1alpha2LeaseCandidate + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1alpha2LeaseCandidate, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'namespace', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method replace_namespaced_lease_candidate" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_lease_candidate`") # noqa: E501 + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_lease_candidate`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_lease_candidate`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1alpha2LeaseCandidate", + 201: "V1alpha2LeaseCandidate", + 401: None, + } + + return self.api_client.call_api( + '/apis/coordination.k8s.io/v1alpha2/namespaces/{namespace}/leasecandidates/{name}', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) diff --git a/kubernetes/client/api/coordination_v1beta1_api.py b/kubernetes/client/api/coordination_v1beta1_api.py new file mode 100644 index 0000000000..73ac7026e6 --- /dev/null +++ b/kubernetes/client/api/coordination_v1beta1_api.py @@ -0,0 +1,1748 @@ +# coding: utf-8 + +""" + Kubernetes + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: release-1.35 + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from kubernetes.client.api_client import ApiClient +from kubernetes.client.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class CoordinationV1beta1Api(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def create_namespaced_lease_candidate(self, namespace, body, **kwargs): # noqa: E501 + """create_namespaced_lease_candidate # noqa: E501 + + create a LeaseCandidate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_namespaced_lease_candidate(namespace, body, async_req=True) + >>> result = thread.get() + + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1beta1LeaseCandidate + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1LeaseCandidate + """ + kwargs['_return_http_data_only'] = True + return self.create_namespaced_lease_candidate_with_http_info(namespace, body, **kwargs) # noqa: E501 + + def create_namespaced_lease_candidate_with_http_info(self, namespace, body, **kwargs): # noqa: E501 + """create_namespaced_lease_candidate # noqa: E501 + + create a LeaseCandidate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_namespaced_lease_candidate_with_http_info(namespace, body, async_req=True) + >>> result = thread.get() + + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1beta1LeaseCandidate + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1LeaseCandidate, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'namespace', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_namespaced_lease_candidate" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_lease_candidate`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_lease_candidate`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1LeaseCandidate", + 201: "V1beta1LeaseCandidate", + 202: "V1beta1LeaseCandidate", + 401: None, + } + + return self.api_client.call_api( + '/apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leasecandidates', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_collection_namespaced_lease_candidate(self, namespace, **kwargs): # noqa: E501 + """delete_collection_namespaced_lease_candidate # noqa: E501 + + delete collection of LeaseCandidate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_collection_namespaced_lease_candidate(namespace, async_req=True) + >>> result = thread.get() + + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1Status + """ + kwargs['_return_http_data_only'] = True + return self.delete_collection_namespaced_lease_candidate_with_http_info(namespace, **kwargs) # noqa: E501 + + def delete_collection_namespaced_lease_candidate_with_http_info(self, namespace, **kwargs): # noqa: E501 + """delete_collection_namespaced_lease_candidate # noqa: E501 + + delete collection of LeaseCandidate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_collection_namespaced_lease_candidate_with_http_info(namespace, async_req=True) + >>> result = thread.get() + + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'namespace', + 'pretty', + '_continue', + 'dry_run', + 'field_selector', + 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', + 'label_selector', + 'limit', + 'orphan_dependents', + 'propagation_policy', + 'resource_version', + 'resource_version_match', + 'send_initial_events', + 'timeout_seconds', + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_collection_namespaced_lease_candidate" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_lease_candidate`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 + query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 + query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 + query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 + query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 + query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 + query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 + query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 + query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 + query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 + query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1Status", + 401: None, + } + + return self.api_client.call_api( + '/apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leasecandidates', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_namespaced_lease_candidate(self, name, namespace, **kwargs): # noqa: E501 + """delete_namespaced_lease_candidate # noqa: E501 + + delete a LeaseCandidate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_namespaced_lease_candidate(name, namespace, async_req=True) + >>> result = thread.get() + + :param name: name of the LeaseCandidate (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1Status + """ + kwargs['_return_http_data_only'] = True + return self.delete_namespaced_lease_candidate_with_http_info(name, namespace, **kwargs) # noqa: E501 + + def delete_namespaced_lease_candidate_with_http_info(self, name, namespace, **kwargs): # noqa: E501 + """delete_namespaced_lease_candidate # noqa: E501 + + delete a LeaseCandidate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_namespaced_lease_candidate_with_http_info(name, namespace, async_req=True) + >>> result = thread.get() + + :param name: name of the LeaseCandidate (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'namespace', + 'pretty', + 'dry_run', + 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', + 'orphan_dependents', + 'propagation_policy', + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_namespaced_lease_candidate" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_lease_candidate`") # noqa: E501 + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_lease_candidate`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 + query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 + query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 + query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1Status", + 202: "V1Status", + 401: None, + } + + return self.api_client.call_api( + '/apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leasecandidates/{name}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_api_resources(self, **kwargs): # noqa: E501 + """get_api_resources # noqa: E501 + + get available resources # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_api_resources(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1APIResourceList + """ + kwargs['_return_http_data_only'] = True + return self.get_api_resources_with_http_info(**kwargs) # noqa: E501 + + def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 + """get_api_resources # noqa: E501 + + get available resources # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_api_resources_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_api_resources" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1APIResourceList", + 401: None, + } + + return self.api_client.call_api( + '/apis/coordination.k8s.io/v1beta1/', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def list_lease_candidate_for_all_namespaces(self, **kwargs): # noqa: E501 + """list_lease_candidate_for_all_namespaces # noqa: E501 + + list or watch objects of kind LeaseCandidate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_lease_candidate_for_all_namespaces(async_req=True) + >>> result = thread.get() + + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1LeaseCandidateList + """ + kwargs['_return_http_data_only'] = True + return self.list_lease_candidate_for_all_namespaces_with_http_info(**kwargs) # noqa: E501 + + def list_lease_candidate_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501 + """list_lease_candidate_for_all_namespaces # noqa: E501 + + list or watch objects of kind LeaseCandidate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_lease_candidate_for_all_namespaces_with_http_info(async_req=True) + >>> result = thread.get() + + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1LeaseCandidateList, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'allow_watch_bookmarks', + '_continue', + 'field_selector', + 'label_selector', + 'limit', + 'pretty', + 'resource_version', + 'resource_version_match', + 'send_initial_events', + 'timeout_seconds', + 'watch' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_lease_candidate_for_all_namespaces" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 + query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 + query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 + query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 + query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 + query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 + query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 + query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 + query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 + query_params.append(('watch', local_var_params['watch'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1LeaseCandidateList", + 401: None, + } + + return self.api_client.call_api( + '/apis/coordination.k8s.io/v1beta1/leasecandidates', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def list_namespaced_lease_candidate(self, namespace, **kwargs): # noqa: E501 + """list_namespaced_lease_candidate # noqa: E501 + + list or watch objects of kind LeaseCandidate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_namespaced_lease_candidate(namespace, async_req=True) + >>> result = thread.get() + + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1LeaseCandidateList + """ + kwargs['_return_http_data_only'] = True + return self.list_namespaced_lease_candidate_with_http_info(namespace, **kwargs) # noqa: E501 + + def list_namespaced_lease_candidate_with_http_info(self, namespace, **kwargs): # noqa: E501 + """list_namespaced_lease_candidate # noqa: E501 + + list or watch objects of kind LeaseCandidate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_namespaced_lease_candidate_with_http_info(namespace, async_req=True) + >>> result = thread.get() + + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1LeaseCandidateList, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'namespace', + 'pretty', + 'allow_watch_bookmarks', + '_continue', + 'field_selector', + 'label_selector', + 'limit', + 'resource_version', + 'resource_version_match', + 'send_initial_events', + 'timeout_seconds', + 'watch' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_namespaced_lease_candidate" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_lease_candidate`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 + query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 + query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 + query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 + query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 + query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 + query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 + query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 + query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 + query_params.append(('watch', local_var_params['watch'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1LeaseCandidateList", + 401: None, + } + + return self.api_client.call_api( + '/apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leasecandidates', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def patch_namespaced_lease_candidate(self, name, namespace, body, **kwargs): # noqa: E501 + """patch_namespaced_lease_candidate # noqa: E501 + + partially update the specified LeaseCandidate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_namespaced_lease_candidate(name, namespace, body, async_req=True) + >>> result = thread.get() + + :param name: name of the LeaseCandidate (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1LeaseCandidate + """ + kwargs['_return_http_data_only'] = True + return self.patch_namespaced_lease_candidate_with_http_info(name, namespace, body, **kwargs) # noqa: E501 + + def patch_namespaced_lease_candidate_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501 + """patch_namespaced_lease_candidate # noqa: E501 + + partially update the specified LeaseCandidate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_namespaced_lease_candidate_with_http_info(name, namespace, body, async_req=True) + >>> result = thread.get() + + :param name: name of the LeaseCandidate (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1LeaseCandidate, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'namespace', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation', + 'force' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method patch_namespaced_lease_candidate" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_lease_candidate`") # noqa: E501 + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_lease_candidate`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_lease_candidate`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 + query_params.append(('force', local_var_params['force'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # HTTP header `Content-Type` + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1LeaseCandidate", + 201: "V1beta1LeaseCandidate", + 401: None, + } + + return self.api_client.call_api( + '/apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leasecandidates/{name}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def read_namespaced_lease_candidate(self, name, namespace, **kwargs): # noqa: E501 + """read_namespaced_lease_candidate # noqa: E501 + + read the specified LeaseCandidate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.read_namespaced_lease_candidate(name, namespace, async_req=True) + >>> result = thread.get() + + :param name: name of the LeaseCandidate (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1LeaseCandidate + """ + kwargs['_return_http_data_only'] = True + return self.read_namespaced_lease_candidate_with_http_info(name, namespace, **kwargs) # noqa: E501 + + def read_namespaced_lease_candidate_with_http_info(self, name, namespace, **kwargs): # noqa: E501 + """read_namespaced_lease_candidate # noqa: E501 + + read the specified LeaseCandidate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.read_namespaced_lease_candidate_with_http_info(name, namespace, async_req=True) + >>> result = thread.get() + + :param name: name of the LeaseCandidate (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1LeaseCandidate, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'namespace', + 'pretty' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method read_namespaced_lease_candidate" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_lease_candidate`") # noqa: E501 + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_lease_candidate`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1LeaseCandidate", + 401: None, + } + + return self.api_client.call_api( + '/apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leasecandidates/{name}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def replace_namespaced_lease_candidate(self, name, namespace, body, **kwargs): # noqa: E501 + """replace_namespaced_lease_candidate # noqa: E501 + + replace the specified LeaseCandidate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.replace_namespaced_lease_candidate(name, namespace, body, async_req=True) + >>> result = thread.get() + + :param name: name of the LeaseCandidate (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1beta1LeaseCandidate + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1LeaseCandidate + """ + kwargs['_return_http_data_only'] = True + return self.replace_namespaced_lease_candidate_with_http_info(name, namespace, body, **kwargs) # noqa: E501 + + def replace_namespaced_lease_candidate_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501 + """replace_namespaced_lease_candidate # noqa: E501 + + replace the specified LeaseCandidate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.replace_namespaced_lease_candidate_with_http_info(name, namespace, body, async_req=True) + >>> result = thread.get() + + :param name: name of the LeaseCandidate (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1beta1LeaseCandidate + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1LeaseCandidate, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'namespace', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method replace_namespaced_lease_candidate" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_lease_candidate`") # noqa: E501 + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_lease_candidate`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_lease_candidate`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1LeaseCandidate", + 201: "V1beta1LeaseCandidate", + 401: None, + } + + return self.api_client.call_api( + '/apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leasecandidates/{name}', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) diff --git a/kubernetes/client/api/core_api.py b/kubernetes/client/api/core_api.py index bca933654e..f36b8c329b 100644 --- a/kubernetes/client/api/core_api.py +++ b/kubernetes/client/api/core_api.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ @@ -42,20 +42,24 @@ def get_api_versions(self, **kwargs): # noqa: E501 get available API versions # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_versions(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1APIVersions + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1APIVersions """ kwargs['_return_http_data_only'] = True return self.get_api_versions_with_http_info(**kwargs) # noqa: E501 @@ -66,22 +70,32 @@ def get_api_versions_with_http_info(self, **kwargs): # noqa: E501 get available API versions # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_versions_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1APIVersions, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1APIVersions, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -93,7 +107,10 @@ def get_api_versions_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -112,7 +129,7 @@ def get_api_versions_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -125,6 +142,11 @@ def get_api_versions_with_http_info(self, **kwargs): # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1APIVersions", + 401: None, + } + return self.api_client.call_api( '/api/', 'GET', path_params, @@ -133,10 +155,11 @@ def get_api_versions_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1APIVersions', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) diff --git a/kubernetes/client/api/core_v1_api.py b/kubernetes/client/api/core_v1_api.py index 698b8ba27e..0950995bde 100644 --- a/kubernetes/client/api/core_v1_api.py +++ b/kubernetes/client/api/core_v1_api.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ @@ -42,23 +42,30 @@ def connect_delete_namespaced_pod_proxy(self, name, namespace, **kwargs): # noq connect DELETE requests to proxy of Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_delete_namespaced_pod_proxy(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PodProxyOptions (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str path: Path is the URL path to use for the current proxy request to pod. + :param name: name of the PodProxyOptions (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param path: Path is the URL path to use for the current proxy request to pod. + :type path: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: str + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: str """ kwargs['_return_http_data_only'] = True return self.connect_delete_namespaced_pod_proxy_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -69,25 +76,38 @@ def connect_delete_namespaced_pod_proxy_with_http_info(self, name, namespace, ** connect DELETE requests to proxy of Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_delete_namespaced_pod_proxy_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PodProxyOptions (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str path: Path is the URL path to use for the current proxy request to pod. + :param name: name of the PodProxyOptions (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param path: Path is the URL path to use for the current proxy request to pod. + :type path: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -102,7 +122,10 @@ def connect_delete_namespaced_pod_proxy_with_http_info(self, name, namespace, ** 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -115,12 +138,10 @@ def connect_delete_namespaced_pod_proxy_with_http_info(self, name, namespace, ** local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `connect_delete_namespaced_pod_proxy`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `connect_delete_namespaced_pod_proxy`") # noqa: E501 collection_formats = {} @@ -132,10 +153,10 @@ def connect_delete_namespaced_pod_proxy_with_http_info(self, name, namespace, ** path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'path' in local_var_params and local_var_params['path'] is not None: # noqa: E501 + if local_var_params.get('path') is not None: # noqa: E501 query_params.append(('path', local_var_params['path'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -148,6 +169,11 @@ def connect_delete_namespaced_pod_proxy_with_http_info(self, name, namespace, ** # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "str", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/pods/{name}/proxy', 'DELETE', path_params, @@ -156,13 +182,14 @@ def connect_delete_namespaced_pod_proxy_with_http_info(self, name, namespace, ** body=body_params, post_params=form_params, files=local_var_files, - response_type='str', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def connect_delete_namespaced_pod_proxy_with_path(self, name, namespace, path, **kwargs): # noqa: E501 """connect_delete_namespaced_pod_proxy_with_path # noqa: E501 @@ -170,24 +197,32 @@ def connect_delete_namespaced_pod_proxy_with_path(self, name, namespace, path, * connect DELETE requests to proxy of Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_delete_namespaced_pod_proxy_with_path(name, namespace, path, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PodProxyOptions (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str path: path to the resource (required) - :param str path2: Path is the URL path to use for the current proxy request to pod. + :param name: name of the PodProxyOptions (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param path: path to the resource (required) + :type path: str + :param path2: Path is the URL path to use for the current proxy request to pod. + :type path2: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: str + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: str """ kwargs['_return_http_data_only'] = True return self.connect_delete_namespaced_pod_proxy_with_path_with_http_info(name, namespace, path, **kwargs) # noqa: E501 @@ -198,26 +233,40 @@ def connect_delete_namespaced_pod_proxy_with_path_with_http_info(self, name, nam connect DELETE requests to proxy of Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_delete_namespaced_pod_proxy_with_path_with_http_info(name, namespace, path, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PodProxyOptions (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str path: path to the resource (required) - :param str path2: Path is the URL path to use for the current proxy request to pod. + :param name: name of the PodProxyOptions (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param path: path to the resource (required) + :type path: str + :param path2: Path is the URL path to use for the current proxy request to pod. + :type path2: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -233,7 +282,10 @@ def connect_delete_namespaced_pod_proxy_with_path_with_http_info(self, name, nam 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -246,16 +298,13 @@ def connect_delete_namespaced_pod_proxy_with_path_with_http_info(self, name, nam local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `connect_delete_namespaced_pod_proxy_with_path`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `connect_delete_namespaced_pod_proxy_with_path`") # noqa: E501 # verify the required parameter 'path' is set - if self.api_client.client_side_validation and ('path' not in local_var_params or # noqa: E501 - local_var_params['path'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('path') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `path` when calling `connect_delete_namespaced_pod_proxy_with_path`") # noqa: E501 collection_formats = {} @@ -269,10 +318,10 @@ def connect_delete_namespaced_pod_proxy_with_path_with_http_info(self, name, nam path_params['path'] = local_var_params['path'] # noqa: E501 query_params = [] - if 'path2' in local_var_params and local_var_params['path2'] is not None: # noqa: E501 + if local_var_params.get('path2') is not None: # noqa: E501 query_params.append(('path', local_var_params['path2'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -285,6 +334,11 @@ def connect_delete_namespaced_pod_proxy_with_path_with_http_info(self, name, nam # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "str", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}', 'DELETE', path_params, @@ -293,13 +347,14 @@ def connect_delete_namespaced_pod_proxy_with_path_with_http_info(self, name, nam body=body_params, post_params=form_params, files=local_var_files, - response_type='str', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def connect_delete_namespaced_service_proxy(self, name, namespace, **kwargs): # noqa: E501 """connect_delete_namespaced_service_proxy # noqa: E501 @@ -307,23 +362,30 @@ def connect_delete_namespaced_service_proxy(self, name, namespace, **kwargs): # connect DELETE requests to proxy of Service # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_delete_namespaced_service_proxy(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ServiceProxyOptions (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str path: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. + :param name: name of the ServiceProxyOptions (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param path: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. + :type path: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: str + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: str """ kwargs['_return_http_data_only'] = True return self.connect_delete_namespaced_service_proxy_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -334,25 +396,38 @@ def connect_delete_namespaced_service_proxy_with_http_info(self, name, namespace connect DELETE requests to proxy of Service # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_delete_namespaced_service_proxy_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ServiceProxyOptions (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str path: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. + :param name: name of the ServiceProxyOptions (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param path: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. + :type path: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -367,7 +442,10 @@ def connect_delete_namespaced_service_proxy_with_http_info(self, name, namespace 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -380,12 +458,10 @@ def connect_delete_namespaced_service_proxy_with_http_info(self, name, namespace local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `connect_delete_namespaced_service_proxy`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `connect_delete_namespaced_service_proxy`") # noqa: E501 collection_formats = {} @@ -397,10 +473,10 @@ def connect_delete_namespaced_service_proxy_with_http_info(self, name, namespace path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'path' in local_var_params and local_var_params['path'] is not None: # noqa: E501 + if local_var_params.get('path') is not None: # noqa: E501 query_params.append(('path', local_var_params['path'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -413,6 +489,11 @@ def connect_delete_namespaced_service_proxy_with_http_info(self, name, namespace # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "str", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/services/{name}/proxy', 'DELETE', path_params, @@ -421,13 +502,14 @@ def connect_delete_namespaced_service_proxy_with_http_info(self, name, namespace body=body_params, post_params=form_params, files=local_var_files, - response_type='str', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def connect_delete_namespaced_service_proxy_with_path(self, name, namespace, path, **kwargs): # noqa: E501 """connect_delete_namespaced_service_proxy_with_path # noqa: E501 @@ -435,24 +517,32 @@ def connect_delete_namespaced_service_proxy_with_path(self, name, namespace, pat connect DELETE requests to proxy of Service # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_delete_namespaced_service_proxy_with_path(name, namespace, path, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ServiceProxyOptions (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str path: path to the resource (required) - :param str path2: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. + :param name: name of the ServiceProxyOptions (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param path: path to the resource (required) + :type path: str + :param path2: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. + :type path2: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: str + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: str """ kwargs['_return_http_data_only'] = True return self.connect_delete_namespaced_service_proxy_with_path_with_http_info(name, namespace, path, **kwargs) # noqa: E501 @@ -463,26 +553,40 @@ def connect_delete_namespaced_service_proxy_with_path_with_http_info(self, name, connect DELETE requests to proxy of Service # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_delete_namespaced_service_proxy_with_path_with_http_info(name, namespace, path, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ServiceProxyOptions (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str path: path to the resource (required) - :param str path2: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. + :param name: name of the ServiceProxyOptions (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param path: path to the resource (required) + :type path: str + :param path2: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. + :type path2: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -498,7 +602,10 @@ def connect_delete_namespaced_service_proxy_with_path_with_http_info(self, name, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -511,16 +618,13 @@ def connect_delete_namespaced_service_proxy_with_path_with_http_info(self, name, local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `connect_delete_namespaced_service_proxy_with_path`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `connect_delete_namespaced_service_proxy_with_path`") # noqa: E501 # verify the required parameter 'path' is set - if self.api_client.client_side_validation and ('path' not in local_var_params or # noqa: E501 - local_var_params['path'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('path') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `path` when calling `connect_delete_namespaced_service_proxy_with_path`") # noqa: E501 collection_formats = {} @@ -534,10 +638,10 @@ def connect_delete_namespaced_service_proxy_with_path_with_http_info(self, name, path_params['path'] = local_var_params['path'] # noqa: E501 query_params = [] - if 'path2' in local_var_params and local_var_params['path2'] is not None: # noqa: E501 + if local_var_params.get('path2') is not None: # noqa: E501 query_params.append(('path', local_var_params['path2'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -550,6 +654,11 @@ def connect_delete_namespaced_service_proxy_with_path_with_http_info(self, name, # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "str", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}', 'DELETE', path_params, @@ -558,13 +667,14 @@ def connect_delete_namespaced_service_proxy_with_path_with_http_info(self, name, body=body_params, post_params=form_params, files=local_var_files, - response_type='str', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def connect_delete_node_proxy(self, name, **kwargs): # noqa: E501 """connect_delete_node_proxy # noqa: E501 @@ -572,22 +682,28 @@ def connect_delete_node_proxy(self, name, **kwargs): # noqa: E501 connect DELETE requests to proxy of Node # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_delete_node_proxy(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the NodeProxyOptions (required) - :param str path: Path is the URL path to use for the current proxy request to node. + :param name: name of the NodeProxyOptions (required) + :type name: str + :param path: Path is the URL path to use for the current proxy request to node. + :type path: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: str + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: str """ kwargs['_return_http_data_only'] = True return self.connect_delete_node_proxy_with_http_info(name, **kwargs) # noqa: E501 @@ -598,24 +714,36 @@ def connect_delete_node_proxy_with_http_info(self, name, **kwargs): # noqa: E50 connect DELETE requests to proxy of Node # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_delete_node_proxy_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the NodeProxyOptions (required) - :param str path: Path is the URL path to use for the current proxy request to node. + :param name: name of the NodeProxyOptions (required) + :type name: str + :param path: Path is the URL path to use for the current proxy request to node. + :type path: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -629,7 +757,10 @@ def connect_delete_node_proxy_with_http_info(self, name, **kwargs): # noqa: E50 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -642,8 +773,7 @@ def connect_delete_node_proxy_with_http_info(self, name, **kwargs): # noqa: E50 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `connect_delete_node_proxy`") # noqa: E501 collection_formats = {} @@ -653,10 +783,10 @@ def connect_delete_node_proxy_with_http_info(self, name, **kwargs): # noqa: E50 path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'path' in local_var_params and local_var_params['path'] is not None: # noqa: E501 + if local_var_params.get('path') is not None: # noqa: E501 query_params.append(('path', local_var_params['path'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -669,6 +799,11 @@ def connect_delete_node_proxy_with_http_info(self, name, **kwargs): # noqa: E50 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "str", + 401: None, + } + return self.api_client.call_api( '/api/v1/nodes/{name}/proxy', 'DELETE', path_params, @@ -677,13 +812,14 @@ def connect_delete_node_proxy_with_http_info(self, name, **kwargs): # noqa: E50 body=body_params, post_params=form_params, files=local_var_files, - response_type='str', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def connect_delete_node_proxy_with_path(self, name, path, **kwargs): # noqa: E501 """connect_delete_node_proxy_with_path # noqa: E501 @@ -691,23 +827,30 @@ def connect_delete_node_proxy_with_path(self, name, path, **kwargs): # noqa: E5 connect DELETE requests to proxy of Node # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_delete_node_proxy_with_path(name, path, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the NodeProxyOptions (required) - :param str path: path to the resource (required) - :param str path2: Path is the URL path to use for the current proxy request to node. + :param name: name of the NodeProxyOptions (required) + :type name: str + :param path: path to the resource (required) + :type path: str + :param path2: Path is the URL path to use for the current proxy request to node. + :type path2: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: str + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: str """ kwargs['_return_http_data_only'] = True return self.connect_delete_node_proxy_with_path_with_http_info(name, path, **kwargs) # noqa: E501 @@ -718,25 +861,38 @@ def connect_delete_node_proxy_with_path_with_http_info(self, name, path, **kwarg connect DELETE requests to proxy of Node # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_delete_node_proxy_with_path_with_http_info(name, path, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the NodeProxyOptions (required) - :param str path: path to the resource (required) - :param str path2: Path is the URL path to use for the current proxy request to node. + :param name: name of the NodeProxyOptions (required) + :type name: str + :param path: path to the resource (required) + :type path: str + :param path2: Path is the URL path to use for the current proxy request to node. + :type path2: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -751,7 +907,10 @@ def connect_delete_node_proxy_with_path_with_http_info(self, name, path, **kwarg 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -764,12 +923,10 @@ def connect_delete_node_proxy_with_path_with_http_info(self, name, path, **kwarg local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `connect_delete_node_proxy_with_path`") # noqa: E501 # verify the required parameter 'path' is set - if self.api_client.client_side_validation and ('path' not in local_var_params or # noqa: E501 - local_var_params['path'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('path') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `path` when calling `connect_delete_node_proxy_with_path`") # noqa: E501 collection_formats = {} @@ -781,10 +938,10 @@ def connect_delete_node_proxy_with_path_with_http_info(self, name, path, **kwarg path_params['path'] = local_var_params['path'] # noqa: E501 query_params = [] - if 'path2' in local_var_params and local_var_params['path2'] is not None: # noqa: E501 + if local_var_params.get('path2') is not None: # noqa: E501 query_params.append(('path', local_var_params['path2'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -797,6 +954,11 @@ def connect_delete_node_proxy_with_path_with_http_info(self, name, path, **kwarg # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "str", + 401: None, + } + return self.api_client.call_api( '/api/v1/nodes/{name}/proxy/{path}', 'DELETE', path_params, @@ -805,13 +967,14 @@ def connect_delete_node_proxy_with_path_with_http_info(self, name, path, **kwarg body=body_params, post_params=form_params, files=local_var_files, - response_type='str', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def connect_get_namespaced_pod_attach(self, name, namespace, **kwargs): # noqa: E501 """connect_get_namespaced_pod_attach # noqa: E501 @@ -819,27 +982,38 @@ def connect_get_namespaced_pod_attach(self, name, namespace, **kwargs): # noqa: connect GET requests to attach of Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_get_namespaced_pod_attach(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PodAttachOptions (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str container: The container in which to execute the command. Defaults to only container if there is only one container in the pod. - :param bool stderr: Stderr if true indicates that stderr is to be redirected for the attach call. Defaults to true. - :param bool stdin: Stdin if true, redirects the standard input stream of the pod for this call. Defaults to false. - :param bool stdout: Stdout if true indicates that stdout is to be redirected for the attach call. Defaults to true. - :param bool tty: TTY if true indicates that a tty will be allocated for the attach call. This is passed through the container runtime so the tty is allocated on the worker node by the container runtime. Defaults to false. + :param name: name of the PodAttachOptions (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param container: The container in which to execute the command. Defaults to only container if there is only one container in the pod. + :type container: str + :param stderr: Stderr if true indicates that stderr is to be redirected for the attach call. Defaults to true. + :type stderr: bool + :param stdin: Stdin if true, redirects the standard input stream of the pod for this call. Defaults to false. + :type stdin: bool + :param stdout: Stdout if true indicates that stdout is to be redirected for the attach call. Defaults to true. + :type stdout: bool + :param tty: TTY if true indicates that a tty will be allocated for the attach call. This is passed through the container runtime so the tty is allocated on the worker node by the container runtime. Defaults to false. + :type tty: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: str + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: str """ kwargs['_return_http_data_only'] = True return self.connect_get_namespaced_pod_attach_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -850,29 +1024,46 @@ def connect_get_namespaced_pod_attach_with_http_info(self, name, namespace, **kw connect GET requests to attach of Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_get_namespaced_pod_attach_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PodAttachOptions (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str container: The container in which to execute the command. Defaults to only container if there is only one container in the pod. - :param bool stderr: Stderr if true indicates that stderr is to be redirected for the attach call. Defaults to true. - :param bool stdin: Stdin if true, redirects the standard input stream of the pod for this call. Defaults to false. - :param bool stdout: Stdout if true indicates that stdout is to be redirected for the attach call. Defaults to true. - :param bool tty: TTY if true indicates that a tty will be allocated for the attach call. This is passed through the container runtime so the tty is allocated on the worker node by the container runtime. Defaults to false. + :param name: name of the PodAttachOptions (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param container: The container in which to execute the command. Defaults to only container if there is only one container in the pod. + :type container: str + :param stderr: Stderr if true indicates that stderr is to be redirected for the attach call. Defaults to true. + :type stderr: bool + :param stdin: Stdin if true, redirects the standard input stream of the pod for this call. Defaults to false. + :type stdin: bool + :param stdout: Stdout if true indicates that stdout is to be redirected for the attach call. Defaults to true. + :type stdout: bool + :param tty: TTY if true indicates that a tty will be allocated for the attach call. This is passed through the container runtime so the tty is allocated on the worker node by the container runtime. Defaults to false. + :type tty: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -891,7 +1082,10 @@ def connect_get_namespaced_pod_attach_with_http_info(self, name, namespace, **kw 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -904,12 +1098,10 @@ def connect_get_namespaced_pod_attach_with_http_info(self, name, namespace, **kw local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `connect_get_namespaced_pod_attach`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `connect_get_namespaced_pod_attach`") # noqa: E501 collection_formats = {} @@ -921,18 +1113,18 @@ def connect_get_namespaced_pod_attach_with_http_info(self, name, namespace, **kw path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'container' in local_var_params and local_var_params['container'] is not None: # noqa: E501 + if local_var_params.get('container') is not None: # noqa: E501 query_params.append(('container', local_var_params['container'])) # noqa: E501 - if 'stderr' in local_var_params and local_var_params['stderr'] is not None: # noqa: E501 + if local_var_params.get('stderr') is not None: # noqa: E501 query_params.append(('stderr', local_var_params['stderr'])) # noqa: E501 - if 'stdin' in local_var_params and local_var_params['stdin'] is not None: # noqa: E501 + if local_var_params.get('stdin') is not None: # noqa: E501 query_params.append(('stdin', local_var_params['stdin'])) # noqa: E501 - if 'stdout' in local_var_params and local_var_params['stdout'] is not None: # noqa: E501 + if local_var_params.get('stdout') is not None: # noqa: E501 query_params.append(('stdout', local_var_params['stdout'])) # noqa: E501 - if 'tty' in local_var_params and local_var_params['tty'] is not None: # noqa: E501 + if local_var_params.get('tty') is not None: # noqa: E501 query_params.append(('tty', local_var_params['tty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -945,6 +1137,11 @@ def connect_get_namespaced_pod_attach_with_http_info(self, name, namespace, **kw # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "str", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/pods/{name}/attach', 'GET', path_params, @@ -953,13 +1150,14 @@ def connect_get_namespaced_pod_attach_with_http_info(self, name, namespace, **kw body=body_params, post_params=form_params, files=local_var_files, - response_type='str', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def connect_get_namespaced_pod_exec(self, name, namespace, **kwargs): # noqa: E501 """connect_get_namespaced_pod_exec # noqa: E501 @@ -967,28 +1165,40 @@ def connect_get_namespaced_pod_exec(self, name, namespace, **kwargs): # noqa: E connect GET requests to exec of Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_get_namespaced_pod_exec(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PodExecOptions (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str command: Command is the remote command to execute. argv array. Not executed within a shell. - :param str container: Container in which to execute the command. Defaults to only container if there is only one container in the pod. - :param bool stderr: Redirect the standard error stream of the pod for this call. - :param bool stdin: Redirect the standard input stream of the pod for this call. Defaults to false. - :param bool stdout: Redirect the standard output stream of the pod for this call. - :param bool tty: TTY if true indicates that a tty will be allocated for the exec call. Defaults to false. + :param name: name of the PodExecOptions (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param command: Command is the remote command to execute. argv array. Not executed within a shell. + :type command: str + :param container: Container in which to execute the command. Defaults to only container if there is only one container in the pod. + :type container: str + :param stderr: Redirect the standard error stream of the pod for this call. + :type stderr: bool + :param stdin: Redirect the standard input stream of the pod for this call. Defaults to false. + :type stdin: bool + :param stdout: Redirect the standard output stream of the pod for this call. + :type stdout: bool + :param tty: TTY if true indicates that a tty will be allocated for the exec call. Defaults to false. + :type tty: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: str + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: str """ kwargs['_return_http_data_only'] = True return self.connect_get_namespaced_pod_exec_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -999,30 +1209,48 @@ def connect_get_namespaced_pod_exec_with_http_info(self, name, namespace, **kwar connect GET requests to exec of Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_get_namespaced_pod_exec_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PodExecOptions (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str command: Command is the remote command to execute. argv array. Not executed within a shell. - :param str container: Container in which to execute the command. Defaults to only container if there is only one container in the pod. - :param bool stderr: Redirect the standard error stream of the pod for this call. - :param bool stdin: Redirect the standard input stream of the pod for this call. Defaults to false. - :param bool stdout: Redirect the standard output stream of the pod for this call. - :param bool tty: TTY if true indicates that a tty will be allocated for the exec call. Defaults to false. + :param name: name of the PodExecOptions (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param command: Command is the remote command to execute. argv array. Not executed within a shell. + :type command: str + :param container: Container in which to execute the command. Defaults to only container if there is only one container in the pod. + :type container: str + :param stderr: Redirect the standard error stream of the pod for this call. + :type stderr: bool + :param stdin: Redirect the standard input stream of the pod for this call. Defaults to false. + :type stdin: bool + :param stdout: Redirect the standard output stream of the pod for this call. + :type stdout: bool + :param tty: TTY if true indicates that a tty will be allocated for the exec call. Defaults to false. + :type tty: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1042,7 +1270,10 @@ def connect_get_namespaced_pod_exec_with_http_info(self, name, namespace, **kwar 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1055,12 +1286,10 @@ def connect_get_namespaced_pod_exec_with_http_info(self, name, namespace, **kwar local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `connect_get_namespaced_pod_exec`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `connect_get_namespaced_pod_exec`") # noqa: E501 collection_formats = {} @@ -1072,20 +1301,20 @@ def connect_get_namespaced_pod_exec_with_http_info(self, name, namespace, **kwar path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'command' in local_var_params and local_var_params['command'] is not None: # noqa: E501 + if local_var_params.get('command') is not None: # noqa: E501 query_params.append(('command', local_var_params['command'])) # noqa: E501 - if 'container' in local_var_params and local_var_params['container'] is not None: # noqa: E501 + if local_var_params.get('container') is not None: # noqa: E501 query_params.append(('container', local_var_params['container'])) # noqa: E501 - if 'stderr' in local_var_params and local_var_params['stderr'] is not None: # noqa: E501 + if local_var_params.get('stderr') is not None: # noqa: E501 query_params.append(('stderr', local_var_params['stderr'])) # noqa: E501 - if 'stdin' in local_var_params and local_var_params['stdin'] is not None: # noqa: E501 + if local_var_params.get('stdin') is not None: # noqa: E501 query_params.append(('stdin', local_var_params['stdin'])) # noqa: E501 - if 'stdout' in local_var_params and local_var_params['stdout'] is not None: # noqa: E501 + if local_var_params.get('stdout') is not None: # noqa: E501 query_params.append(('stdout', local_var_params['stdout'])) # noqa: E501 - if 'tty' in local_var_params and local_var_params['tty'] is not None: # noqa: E501 + if local_var_params.get('tty') is not None: # noqa: E501 query_params.append(('tty', local_var_params['tty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1098,6 +1327,11 @@ def connect_get_namespaced_pod_exec_with_http_info(self, name, namespace, **kwar # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "str", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/pods/{name}/exec', 'GET', path_params, @@ -1106,13 +1340,14 @@ def connect_get_namespaced_pod_exec_with_http_info(self, name, namespace, **kwar body=body_params, post_params=form_params, files=local_var_files, - response_type='str', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def connect_get_namespaced_pod_portforward(self, name, namespace, **kwargs): # noqa: E501 """connect_get_namespaced_pod_portforward # noqa: E501 @@ -1120,23 +1355,30 @@ def connect_get_namespaced_pod_portforward(self, name, namespace, **kwargs): # connect GET requests to portforward of Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_get_namespaced_pod_portforward(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PodPortForwardOptions (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param int ports: List of ports to forward Required when using WebSockets + :param name: name of the PodPortForwardOptions (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param ports: List of ports to forward Required when using WebSockets + :type ports: int + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: str + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: str """ kwargs['_return_http_data_only'] = True return self.connect_get_namespaced_pod_portforward_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -1147,25 +1389,38 @@ def connect_get_namespaced_pod_portforward_with_http_info(self, name, namespace, connect GET requests to portforward of Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_get_namespaced_pod_portforward_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PodPortForwardOptions (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param int ports: List of ports to forward Required when using WebSockets + :param name: name of the PodPortForwardOptions (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param ports: List of ports to forward Required when using WebSockets + :type ports: int + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1180,7 +1435,10 @@ def connect_get_namespaced_pod_portforward_with_http_info(self, name, namespace, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1193,12 +1451,10 @@ def connect_get_namespaced_pod_portforward_with_http_info(self, name, namespace, local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `connect_get_namespaced_pod_portforward`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `connect_get_namespaced_pod_portforward`") # noqa: E501 collection_formats = {} @@ -1210,10 +1466,10 @@ def connect_get_namespaced_pod_portforward_with_http_info(self, name, namespace, path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'ports' in local_var_params and local_var_params['ports'] is not None: # noqa: E501 + if local_var_params.get('ports') is not None: # noqa: E501 query_params.append(('ports', local_var_params['ports'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1226,6 +1482,11 @@ def connect_get_namespaced_pod_portforward_with_http_info(self, name, namespace, # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "str", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/pods/{name}/portforward', 'GET', path_params, @@ -1234,13 +1495,14 @@ def connect_get_namespaced_pod_portforward_with_http_info(self, name, namespace, body=body_params, post_params=form_params, files=local_var_files, - response_type='str', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def connect_get_namespaced_pod_proxy(self, name, namespace, **kwargs): # noqa: E501 """connect_get_namespaced_pod_proxy # noqa: E501 @@ -1248,23 +1510,30 @@ def connect_get_namespaced_pod_proxy(self, name, namespace, **kwargs): # noqa: connect GET requests to proxy of Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_get_namespaced_pod_proxy(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PodProxyOptions (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str path: Path is the URL path to use for the current proxy request to pod. + :param name: name of the PodProxyOptions (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param path: Path is the URL path to use for the current proxy request to pod. + :type path: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: str + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: str """ kwargs['_return_http_data_only'] = True return self.connect_get_namespaced_pod_proxy_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -1275,25 +1544,38 @@ def connect_get_namespaced_pod_proxy_with_http_info(self, name, namespace, **kwa connect GET requests to proxy of Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_get_namespaced_pod_proxy_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PodProxyOptions (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str path: Path is the URL path to use for the current proxy request to pod. + :param name: name of the PodProxyOptions (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param path: Path is the URL path to use for the current proxy request to pod. + :type path: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1308,7 +1590,10 @@ def connect_get_namespaced_pod_proxy_with_http_info(self, name, namespace, **kwa 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1321,12 +1606,10 @@ def connect_get_namespaced_pod_proxy_with_http_info(self, name, namespace, **kwa local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `connect_get_namespaced_pod_proxy`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `connect_get_namespaced_pod_proxy`") # noqa: E501 collection_formats = {} @@ -1338,10 +1621,10 @@ def connect_get_namespaced_pod_proxy_with_http_info(self, name, namespace, **kwa path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'path' in local_var_params and local_var_params['path'] is not None: # noqa: E501 + if local_var_params.get('path') is not None: # noqa: E501 query_params.append(('path', local_var_params['path'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1354,6 +1637,11 @@ def connect_get_namespaced_pod_proxy_with_http_info(self, name, namespace, **kwa # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "str", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/pods/{name}/proxy', 'GET', path_params, @@ -1362,13 +1650,14 @@ def connect_get_namespaced_pod_proxy_with_http_info(self, name, namespace, **kwa body=body_params, post_params=form_params, files=local_var_files, - response_type='str', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def connect_get_namespaced_pod_proxy_with_path(self, name, namespace, path, **kwargs): # noqa: E501 """connect_get_namespaced_pod_proxy_with_path # noqa: E501 @@ -1376,24 +1665,32 @@ def connect_get_namespaced_pod_proxy_with_path(self, name, namespace, path, **kw connect GET requests to proxy of Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_get_namespaced_pod_proxy_with_path(name, namespace, path, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PodProxyOptions (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str path: path to the resource (required) - :param str path2: Path is the URL path to use for the current proxy request to pod. + :param name: name of the PodProxyOptions (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param path: path to the resource (required) + :type path: str + :param path2: Path is the URL path to use for the current proxy request to pod. + :type path2: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: str + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: str """ kwargs['_return_http_data_only'] = True return self.connect_get_namespaced_pod_proxy_with_path_with_http_info(name, namespace, path, **kwargs) # noqa: E501 @@ -1404,26 +1701,40 @@ def connect_get_namespaced_pod_proxy_with_path_with_http_info(self, name, namesp connect GET requests to proxy of Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_get_namespaced_pod_proxy_with_path_with_http_info(name, namespace, path, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PodProxyOptions (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str path: path to the resource (required) - :param str path2: Path is the URL path to use for the current proxy request to pod. + :param name: name of the PodProxyOptions (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param path: path to the resource (required) + :type path: str + :param path2: Path is the URL path to use for the current proxy request to pod. + :type path2: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1439,7 +1750,10 @@ def connect_get_namespaced_pod_proxy_with_path_with_http_info(self, name, namesp 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1452,16 +1766,13 @@ def connect_get_namespaced_pod_proxy_with_path_with_http_info(self, name, namesp local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `connect_get_namespaced_pod_proxy_with_path`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `connect_get_namespaced_pod_proxy_with_path`") # noqa: E501 # verify the required parameter 'path' is set - if self.api_client.client_side_validation and ('path' not in local_var_params or # noqa: E501 - local_var_params['path'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('path') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `path` when calling `connect_get_namespaced_pod_proxy_with_path`") # noqa: E501 collection_formats = {} @@ -1475,10 +1786,10 @@ def connect_get_namespaced_pod_proxy_with_path_with_http_info(self, name, namesp path_params['path'] = local_var_params['path'] # noqa: E501 query_params = [] - if 'path2' in local_var_params and local_var_params['path2'] is not None: # noqa: E501 + if local_var_params.get('path2') is not None: # noqa: E501 query_params.append(('path', local_var_params['path2'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1491,6 +1802,11 @@ def connect_get_namespaced_pod_proxy_with_path_with_http_info(self, name, namesp # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "str", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}', 'GET', path_params, @@ -1499,13 +1815,14 @@ def connect_get_namespaced_pod_proxy_with_path_with_http_info(self, name, namesp body=body_params, post_params=form_params, files=local_var_files, - response_type='str', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def connect_get_namespaced_service_proxy(self, name, namespace, **kwargs): # noqa: E501 """connect_get_namespaced_service_proxy # noqa: E501 @@ -1513,23 +1830,30 @@ def connect_get_namespaced_service_proxy(self, name, namespace, **kwargs): # no connect GET requests to proxy of Service # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_get_namespaced_service_proxy(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ServiceProxyOptions (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str path: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. + :param name: name of the ServiceProxyOptions (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param path: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. + :type path: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: str + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: str """ kwargs['_return_http_data_only'] = True return self.connect_get_namespaced_service_proxy_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -1540,25 +1864,38 @@ def connect_get_namespaced_service_proxy_with_http_info(self, name, namespace, * connect GET requests to proxy of Service # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_get_namespaced_service_proxy_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ServiceProxyOptions (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str path: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. + :param name: name of the ServiceProxyOptions (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param path: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. + :type path: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1573,7 +1910,10 @@ def connect_get_namespaced_service_proxy_with_http_info(self, name, namespace, * 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1586,12 +1926,10 @@ def connect_get_namespaced_service_proxy_with_http_info(self, name, namespace, * local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `connect_get_namespaced_service_proxy`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `connect_get_namespaced_service_proxy`") # noqa: E501 collection_formats = {} @@ -1603,10 +1941,10 @@ def connect_get_namespaced_service_proxy_with_http_info(self, name, namespace, * path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'path' in local_var_params and local_var_params['path'] is not None: # noqa: E501 + if local_var_params.get('path') is not None: # noqa: E501 query_params.append(('path', local_var_params['path'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1619,6 +1957,11 @@ def connect_get_namespaced_service_proxy_with_http_info(self, name, namespace, * # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "str", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/services/{name}/proxy', 'GET', path_params, @@ -1627,13 +1970,14 @@ def connect_get_namespaced_service_proxy_with_http_info(self, name, namespace, * body=body_params, post_params=form_params, files=local_var_files, - response_type='str', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def connect_get_namespaced_service_proxy_with_path(self, name, namespace, path, **kwargs): # noqa: E501 """connect_get_namespaced_service_proxy_with_path # noqa: E501 @@ -1641,24 +1985,32 @@ def connect_get_namespaced_service_proxy_with_path(self, name, namespace, path, connect GET requests to proxy of Service # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_get_namespaced_service_proxy_with_path(name, namespace, path, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ServiceProxyOptions (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str path: path to the resource (required) - :param str path2: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. + :param name: name of the ServiceProxyOptions (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param path: path to the resource (required) + :type path: str + :param path2: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. + :type path2: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: str + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: str """ kwargs['_return_http_data_only'] = True return self.connect_get_namespaced_service_proxy_with_path_with_http_info(name, namespace, path, **kwargs) # noqa: E501 @@ -1669,26 +2021,40 @@ def connect_get_namespaced_service_proxy_with_path_with_http_info(self, name, na connect GET requests to proxy of Service # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_get_namespaced_service_proxy_with_path_with_http_info(name, namespace, path, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ServiceProxyOptions (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str path: path to the resource (required) - :param str path2: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. + :param name: name of the ServiceProxyOptions (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param path: path to the resource (required) + :type path: str + :param path2: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. + :type path2: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1704,7 +2070,10 @@ def connect_get_namespaced_service_proxy_with_path_with_http_info(self, name, na 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1717,16 +2086,13 @@ def connect_get_namespaced_service_proxy_with_path_with_http_info(self, name, na local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `connect_get_namespaced_service_proxy_with_path`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `connect_get_namespaced_service_proxy_with_path`") # noqa: E501 # verify the required parameter 'path' is set - if self.api_client.client_side_validation and ('path' not in local_var_params or # noqa: E501 - local_var_params['path'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('path') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `path` when calling `connect_get_namespaced_service_proxy_with_path`") # noqa: E501 collection_formats = {} @@ -1740,10 +2106,10 @@ def connect_get_namespaced_service_proxy_with_path_with_http_info(self, name, na path_params['path'] = local_var_params['path'] # noqa: E501 query_params = [] - if 'path2' in local_var_params and local_var_params['path2'] is not None: # noqa: E501 + if local_var_params.get('path2') is not None: # noqa: E501 query_params.append(('path', local_var_params['path2'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1756,6 +2122,11 @@ def connect_get_namespaced_service_proxy_with_path_with_http_info(self, name, na # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "str", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}', 'GET', path_params, @@ -1764,13 +2135,14 @@ def connect_get_namespaced_service_proxy_with_path_with_http_info(self, name, na body=body_params, post_params=form_params, files=local_var_files, - response_type='str', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def connect_get_node_proxy(self, name, **kwargs): # noqa: E501 """connect_get_node_proxy # noqa: E501 @@ -1778,22 +2150,28 @@ def connect_get_node_proxy(self, name, **kwargs): # noqa: E501 connect GET requests to proxy of Node # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_get_node_proxy(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the NodeProxyOptions (required) - :param str path: Path is the URL path to use for the current proxy request to node. + :param name: name of the NodeProxyOptions (required) + :type name: str + :param path: Path is the URL path to use for the current proxy request to node. + :type path: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: str + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: str """ kwargs['_return_http_data_only'] = True return self.connect_get_node_proxy_with_http_info(name, **kwargs) # noqa: E501 @@ -1804,24 +2182,36 @@ def connect_get_node_proxy_with_http_info(self, name, **kwargs): # noqa: E501 connect GET requests to proxy of Node # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_get_node_proxy_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the NodeProxyOptions (required) - :param str path: Path is the URL path to use for the current proxy request to node. + :param name: name of the NodeProxyOptions (required) + :type name: str + :param path: Path is the URL path to use for the current proxy request to node. + :type path: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1835,7 +2225,10 @@ def connect_get_node_proxy_with_http_info(self, name, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1848,8 +2241,7 @@ def connect_get_node_proxy_with_http_info(self, name, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `connect_get_node_proxy`") # noqa: E501 collection_formats = {} @@ -1859,10 +2251,10 @@ def connect_get_node_proxy_with_http_info(self, name, **kwargs): # noqa: E501 path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'path' in local_var_params and local_var_params['path'] is not None: # noqa: E501 + if local_var_params.get('path') is not None: # noqa: E501 query_params.append(('path', local_var_params['path'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1875,6 +2267,11 @@ def connect_get_node_proxy_with_http_info(self, name, **kwargs): # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "str", + 401: None, + } + return self.api_client.call_api( '/api/v1/nodes/{name}/proxy', 'GET', path_params, @@ -1883,13 +2280,14 @@ def connect_get_node_proxy_with_http_info(self, name, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='str', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def connect_get_node_proxy_with_path(self, name, path, **kwargs): # noqa: E501 """connect_get_node_proxy_with_path # noqa: E501 @@ -1897,23 +2295,30 @@ def connect_get_node_proxy_with_path(self, name, path, **kwargs): # noqa: E501 connect GET requests to proxy of Node # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_get_node_proxy_with_path(name, path, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the NodeProxyOptions (required) - :param str path: path to the resource (required) - :param str path2: Path is the URL path to use for the current proxy request to node. + :param name: name of the NodeProxyOptions (required) + :type name: str + :param path: path to the resource (required) + :type path: str + :param path2: Path is the URL path to use for the current proxy request to node. + :type path2: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: str + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: str """ kwargs['_return_http_data_only'] = True return self.connect_get_node_proxy_with_path_with_http_info(name, path, **kwargs) # noqa: E501 @@ -1924,25 +2329,38 @@ def connect_get_node_proxy_with_path_with_http_info(self, name, path, **kwargs): connect GET requests to proxy of Node # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_get_node_proxy_with_path_with_http_info(name, path, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the NodeProxyOptions (required) - :param str path: path to the resource (required) - :param str path2: Path is the URL path to use for the current proxy request to node. + :param name: name of the NodeProxyOptions (required) + :type name: str + :param path: path to the resource (required) + :type path: str + :param path2: Path is the URL path to use for the current proxy request to node. + :type path2: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1957,7 +2375,10 @@ def connect_get_node_proxy_with_path_with_http_info(self, name, path, **kwargs): 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1970,12 +2391,10 @@ def connect_get_node_proxy_with_path_with_http_info(self, name, path, **kwargs): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `connect_get_node_proxy_with_path`") # noqa: E501 # verify the required parameter 'path' is set - if self.api_client.client_side_validation and ('path' not in local_var_params or # noqa: E501 - local_var_params['path'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('path') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `path` when calling `connect_get_node_proxy_with_path`") # noqa: E501 collection_formats = {} @@ -1987,10 +2406,10 @@ def connect_get_node_proxy_with_path_with_http_info(self, name, path, **kwargs): path_params['path'] = local_var_params['path'] # noqa: E501 query_params = [] - if 'path2' in local_var_params and local_var_params['path2'] is not None: # noqa: E501 + if local_var_params.get('path2') is not None: # noqa: E501 query_params.append(('path', local_var_params['path2'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2003,6 +2422,11 @@ def connect_get_node_proxy_with_path_with_http_info(self, name, path, **kwargs): # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "str", + 401: None, + } + return self.api_client.call_api( '/api/v1/nodes/{name}/proxy/{path}', 'GET', path_params, @@ -2011,13 +2435,14 @@ def connect_get_node_proxy_with_path_with_http_info(self, name, path, **kwargs): body=body_params, post_params=form_params, files=local_var_files, - response_type='str', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def connect_head_namespaced_pod_proxy(self, name, namespace, **kwargs): # noqa: E501 """connect_head_namespaced_pod_proxy # noqa: E501 @@ -2025,23 +2450,30 @@ def connect_head_namespaced_pod_proxy(self, name, namespace, **kwargs): # noqa: connect HEAD requests to proxy of Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_head_namespaced_pod_proxy(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PodProxyOptions (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str path: Path is the URL path to use for the current proxy request to pod. + :param name: name of the PodProxyOptions (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param path: Path is the URL path to use for the current proxy request to pod. + :type path: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: str + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: str """ kwargs['_return_http_data_only'] = True return self.connect_head_namespaced_pod_proxy_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -2052,25 +2484,38 @@ def connect_head_namespaced_pod_proxy_with_http_info(self, name, namespace, **kw connect HEAD requests to proxy of Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_head_namespaced_pod_proxy_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PodProxyOptions (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str path: Path is the URL path to use for the current proxy request to pod. + :param name: name of the PodProxyOptions (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param path: Path is the URL path to use for the current proxy request to pod. + :type path: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -2085,7 +2530,10 @@ def connect_head_namespaced_pod_proxy_with_http_info(self, name, namespace, **kw 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2098,12 +2546,10 @@ def connect_head_namespaced_pod_proxy_with_http_info(self, name, namespace, **kw local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `connect_head_namespaced_pod_proxy`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `connect_head_namespaced_pod_proxy`") # noqa: E501 collection_formats = {} @@ -2115,10 +2561,10 @@ def connect_head_namespaced_pod_proxy_with_http_info(self, name, namespace, **kw path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'path' in local_var_params and local_var_params['path'] is not None: # noqa: E501 + if local_var_params.get('path') is not None: # noqa: E501 query_params.append(('path', local_var_params['path'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2131,6 +2577,11 @@ def connect_head_namespaced_pod_proxy_with_http_info(self, name, namespace, **kw # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "str", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/pods/{name}/proxy', 'HEAD', path_params, @@ -2139,13 +2590,14 @@ def connect_head_namespaced_pod_proxy_with_http_info(self, name, namespace, **kw body=body_params, post_params=form_params, files=local_var_files, - response_type='str', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def connect_head_namespaced_pod_proxy_with_path(self, name, namespace, path, **kwargs): # noqa: E501 """connect_head_namespaced_pod_proxy_with_path # noqa: E501 @@ -2153,24 +2605,32 @@ def connect_head_namespaced_pod_proxy_with_path(self, name, namespace, path, **k connect HEAD requests to proxy of Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_head_namespaced_pod_proxy_with_path(name, namespace, path, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PodProxyOptions (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str path: path to the resource (required) - :param str path2: Path is the URL path to use for the current proxy request to pod. + :param name: name of the PodProxyOptions (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param path: path to the resource (required) + :type path: str + :param path2: Path is the URL path to use for the current proxy request to pod. + :type path2: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: str + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: str """ kwargs['_return_http_data_only'] = True return self.connect_head_namespaced_pod_proxy_with_path_with_http_info(name, namespace, path, **kwargs) # noqa: E501 @@ -2181,26 +2641,40 @@ def connect_head_namespaced_pod_proxy_with_path_with_http_info(self, name, names connect HEAD requests to proxy of Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_head_namespaced_pod_proxy_with_path_with_http_info(name, namespace, path, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PodProxyOptions (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str path: path to the resource (required) - :param str path2: Path is the URL path to use for the current proxy request to pod. + :param name: name of the PodProxyOptions (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param path: path to the resource (required) + :type path: str + :param path2: Path is the URL path to use for the current proxy request to pod. + :type path2: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -2216,7 +2690,10 @@ def connect_head_namespaced_pod_proxy_with_path_with_http_info(self, name, names 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2229,16 +2706,13 @@ def connect_head_namespaced_pod_proxy_with_path_with_http_info(self, name, names local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `connect_head_namespaced_pod_proxy_with_path`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `connect_head_namespaced_pod_proxy_with_path`") # noqa: E501 # verify the required parameter 'path' is set - if self.api_client.client_side_validation and ('path' not in local_var_params or # noqa: E501 - local_var_params['path'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('path') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `path` when calling `connect_head_namespaced_pod_proxy_with_path`") # noqa: E501 collection_formats = {} @@ -2252,10 +2726,10 @@ def connect_head_namespaced_pod_proxy_with_path_with_http_info(self, name, names path_params['path'] = local_var_params['path'] # noqa: E501 query_params = [] - if 'path2' in local_var_params and local_var_params['path2'] is not None: # noqa: E501 + if local_var_params.get('path2') is not None: # noqa: E501 query_params.append(('path', local_var_params['path2'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2268,6 +2742,11 @@ def connect_head_namespaced_pod_proxy_with_path_with_http_info(self, name, names # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "str", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}', 'HEAD', path_params, @@ -2276,13 +2755,14 @@ def connect_head_namespaced_pod_proxy_with_path_with_http_info(self, name, names body=body_params, post_params=form_params, files=local_var_files, - response_type='str', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def connect_head_namespaced_service_proxy(self, name, namespace, **kwargs): # noqa: E501 """connect_head_namespaced_service_proxy # noqa: E501 @@ -2290,23 +2770,30 @@ def connect_head_namespaced_service_proxy(self, name, namespace, **kwargs): # n connect HEAD requests to proxy of Service # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_head_namespaced_service_proxy(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ServiceProxyOptions (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str path: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. + :param name: name of the ServiceProxyOptions (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param path: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. + :type path: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: str + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: str """ kwargs['_return_http_data_only'] = True return self.connect_head_namespaced_service_proxy_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -2317,25 +2804,38 @@ def connect_head_namespaced_service_proxy_with_http_info(self, name, namespace, connect HEAD requests to proxy of Service # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_head_namespaced_service_proxy_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ServiceProxyOptions (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str path: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. + :param name: name of the ServiceProxyOptions (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param path: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. + :type path: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -2350,7 +2850,10 @@ def connect_head_namespaced_service_proxy_with_http_info(self, name, namespace, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2363,12 +2866,10 @@ def connect_head_namespaced_service_proxy_with_http_info(self, name, namespace, local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `connect_head_namespaced_service_proxy`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `connect_head_namespaced_service_proxy`") # noqa: E501 collection_formats = {} @@ -2380,10 +2881,10 @@ def connect_head_namespaced_service_proxy_with_http_info(self, name, namespace, path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'path' in local_var_params and local_var_params['path'] is not None: # noqa: E501 + if local_var_params.get('path') is not None: # noqa: E501 query_params.append(('path', local_var_params['path'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2396,6 +2897,11 @@ def connect_head_namespaced_service_proxy_with_http_info(self, name, namespace, # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "str", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/services/{name}/proxy', 'HEAD', path_params, @@ -2404,13 +2910,14 @@ def connect_head_namespaced_service_proxy_with_http_info(self, name, namespace, body=body_params, post_params=form_params, files=local_var_files, - response_type='str', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def connect_head_namespaced_service_proxy_with_path(self, name, namespace, path, **kwargs): # noqa: E501 """connect_head_namespaced_service_proxy_with_path # noqa: E501 @@ -2418,24 +2925,32 @@ def connect_head_namespaced_service_proxy_with_path(self, name, namespace, path, connect HEAD requests to proxy of Service # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_head_namespaced_service_proxy_with_path(name, namespace, path, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ServiceProxyOptions (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str path: path to the resource (required) - :param str path2: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. + :param name: name of the ServiceProxyOptions (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param path: path to the resource (required) + :type path: str + :param path2: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. + :type path2: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: str + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: str """ kwargs['_return_http_data_only'] = True return self.connect_head_namespaced_service_proxy_with_path_with_http_info(name, namespace, path, **kwargs) # noqa: E501 @@ -2446,26 +2961,40 @@ def connect_head_namespaced_service_proxy_with_path_with_http_info(self, name, n connect HEAD requests to proxy of Service # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_head_namespaced_service_proxy_with_path_with_http_info(name, namespace, path, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ServiceProxyOptions (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str path: path to the resource (required) - :param str path2: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. + :param name: name of the ServiceProxyOptions (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param path: path to the resource (required) + :type path: str + :param path2: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. + :type path2: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -2481,7 +3010,10 @@ def connect_head_namespaced_service_proxy_with_path_with_http_info(self, name, n 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2494,16 +3026,13 @@ def connect_head_namespaced_service_proxy_with_path_with_http_info(self, name, n local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `connect_head_namespaced_service_proxy_with_path`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `connect_head_namespaced_service_proxy_with_path`") # noqa: E501 # verify the required parameter 'path' is set - if self.api_client.client_side_validation and ('path' not in local_var_params or # noqa: E501 - local_var_params['path'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('path') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `path` when calling `connect_head_namespaced_service_proxy_with_path`") # noqa: E501 collection_formats = {} @@ -2517,10 +3046,10 @@ def connect_head_namespaced_service_proxy_with_path_with_http_info(self, name, n path_params['path'] = local_var_params['path'] # noqa: E501 query_params = [] - if 'path2' in local_var_params and local_var_params['path2'] is not None: # noqa: E501 + if local_var_params.get('path2') is not None: # noqa: E501 query_params.append(('path', local_var_params['path2'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2533,6 +3062,11 @@ def connect_head_namespaced_service_proxy_with_path_with_http_info(self, name, n # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "str", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}', 'HEAD', path_params, @@ -2541,13 +3075,14 @@ def connect_head_namespaced_service_proxy_with_path_with_http_info(self, name, n body=body_params, post_params=form_params, files=local_var_files, - response_type='str', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def connect_head_node_proxy(self, name, **kwargs): # noqa: E501 """connect_head_node_proxy # noqa: E501 @@ -2555,22 +3090,28 @@ def connect_head_node_proxy(self, name, **kwargs): # noqa: E501 connect HEAD requests to proxy of Node # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_head_node_proxy(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the NodeProxyOptions (required) - :param str path: Path is the URL path to use for the current proxy request to node. + :param name: name of the NodeProxyOptions (required) + :type name: str + :param path: Path is the URL path to use for the current proxy request to node. + :type path: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: str + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: str """ kwargs['_return_http_data_only'] = True return self.connect_head_node_proxy_with_http_info(name, **kwargs) # noqa: E501 @@ -2581,24 +3122,36 @@ def connect_head_node_proxy_with_http_info(self, name, **kwargs): # noqa: E501 connect HEAD requests to proxy of Node # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_head_node_proxy_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the NodeProxyOptions (required) - :param str path: Path is the URL path to use for the current proxy request to node. + :param name: name of the NodeProxyOptions (required) + :type name: str + :param path: Path is the URL path to use for the current proxy request to node. + :type path: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -2612,7 +3165,10 @@ def connect_head_node_proxy_with_http_info(self, name, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2625,8 +3181,7 @@ def connect_head_node_proxy_with_http_info(self, name, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `connect_head_node_proxy`") # noqa: E501 collection_formats = {} @@ -2636,10 +3191,10 @@ def connect_head_node_proxy_with_http_info(self, name, **kwargs): # noqa: E501 path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'path' in local_var_params and local_var_params['path'] is not None: # noqa: E501 + if local_var_params.get('path') is not None: # noqa: E501 query_params.append(('path', local_var_params['path'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2652,6 +3207,11 @@ def connect_head_node_proxy_with_http_info(self, name, **kwargs): # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "str", + 401: None, + } + return self.api_client.call_api( '/api/v1/nodes/{name}/proxy', 'HEAD', path_params, @@ -2660,13 +3220,14 @@ def connect_head_node_proxy_with_http_info(self, name, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='str', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def connect_head_node_proxy_with_path(self, name, path, **kwargs): # noqa: E501 """connect_head_node_proxy_with_path # noqa: E501 @@ -2674,23 +3235,30 @@ def connect_head_node_proxy_with_path(self, name, path, **kwargs): # noqa: E501 connect HEAD requests to proxy of Node # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_head_node_proxy_with_path(name, path, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the NodeProxyOptions (required) - :param str path: path to the resource (required) - :param str path2: Path is the URL path to use for the current proxy request to node. + :param name: name of the NodeProxyOptions (required) + :type name: str + :param path: path to the resource (required) + :type path: str + :param path2: Path is the URL path to use for the current proxy request to node. + :type path2: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: str + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: str """ kwargs['_return_http_data_only'] = True return self.connect_head_node_proxy_with_path_with_http_info(name, path, **kwargs) # noqa: E501 @@ -2701,25 +3269,38 @@ def connect_head_node_proxy_with_path_with_http_info(self, name, path, **kwargs) connect HEAD requests to proxy of Node # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_head_node_proxy_with_path_with_http_info(name, path, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the NodeProxyOptions (required) - :param str path: path to the resource (required) - :param str path2: Path is the URL path to use for the current proxy request to node. + :param name: name of the NodeProxyOptions (required) + :type name: str + :param path: path to the resource (required) + :type path: str + :param path2: Path is the URL path to use for the current proxy request to node. + :type path2: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -2734,7 +3315,10 @@ def connect_head_node_proxy_with_path_with_http_info(self, name, path, **kwargs) 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2747,12 +3331,10 @@ def connect_head_node_proxy_with_path_with_http_info(self, name, path, **kwargs) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `connect_head_node_proxy_with_path`") # noqa: E501 # verify the required parameter 'path' is set - if self.api_client.client_side_validation and ('path' not in local_var_params or # noqa: E501 - local_var_params['path'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('path') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `path` when calling `connect_head_node_proxy_with_path`") # noqa: E501 collection_formats = {} @@ -2764,10 +3346,10 @@ def connect_head_node_proxy_with_path_with_http_info(self, name, path, **kwargs) path_params['path'] = local_var_params['path'] # noqa: E501 query_params = [] - if 'path2' in local_var_params and local_var_params['path2'] is not None: # noqa: E501 + if local_var_params.get('path2') is not None: # noqa: E501 query_params.append(('path', local_var_params['path2'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2780,6 +3362,11 @@ def connect_head_node_proxy_with_path_with_http_info(self, name, path, **kwargs) # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "str", + 401: None, + } + return self.api_client.call_api( '/api/v1/nodes/{name}/proxy/{path}', 'HEAD', path_params, @@ -2788,13 +3375,14 @@ def connect_head_node_proxy_with_path_with_http_info(self, name, path, **kwargs) body=body_params, post_params=form_params, files=local_var_files, - response_type='str', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def connect_options_namespaced_pod_proxy(self, name, namespace, **kwargs): # noqa: E501 """connect_options_namespaced_pod_proxy # noqa: E501 @@ -2802,23 +3390,30 @@ def connect_options_namespaced_pod_proxy(self, name, namespace, **kwargs): # no connect OPTIONS requests to proxy of Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_options_namespaced_pod_proxy(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PodProxyOptions (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str path: Path is the URL path to use for the current proxy request to pod. + :param name: name of the PodProxyOptions (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param path: Path is the URL path to use for the current proxy request to pod. + :type path: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: str + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: str """ kwargs['_return_http_data_only'] = True return self.connect_options_namespaced_pod_proxy_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -2829,25 +3424,38 @@ def connect_options_namespaced_pod_proxy_with_http_info(self, name, namespace, * connect OPTIONS requests to proxy of Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_options_namespaced_pod_proxy_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PodProxyOptions (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str path: Path is the URL path to use for the current proxy request to pod. + :param name: name of the PodProxyOptions (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param path: Path is the URL path to use for the current proxy request to pod. + :type path: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -2862,7 +3470,10 @@ def connect_options_namespaced_pod_proxy_with_http_info(self, name, namespace, * 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2875,12 +3486,10 @@ def connect_options_namespaced_pod_proxy_with_http_info(self, name, namespace, * local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `connect_options_namespaced_pod_proxy`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `connect_options_namespaced_pod_proxy`") # noqa: E501 collection_formats = {} @@ -2892,10 +3501,10 @@ def connect_options_namespaced_pod_proxy_with_http_info(self, name, namespace, * path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'path' in local_var_params and local_var_params['path'] is not None: # noqa: E501 + if local_var_params.get('path') is not None: # noqa: E501 query_params.append(('path', local_var_params['path'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2908,6 +3517,11 @@ def connect_options_namespaced_pod_proxy_with_http_info(self, name, namespace, * # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "str", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/pods/{name}/proxy', 'OPTIONS', path_params, @@ -2916,13 +3530,14 @@ def connect_options_namespaced_pod_proxy_with_http_info(self, name, namespace, * body=body_params, post_params=form_params, files=local_var_files, - response_type='str', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def connect_options_namespaced_pod_proxy_with_path(self, name, namespace, path, **kwargs): # noqa: E501 """connect_options_namespaced_pod_proxy_with_path # noqa: E501 @@ -2930,24 +3545,32 @@ def connect_options_namespaced_pod_proxy_with_path(self, name, namespace, path, connect OPTIONS requests to proxy of Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_options_namespaced_pod_proxy_with_path(name, namespace, path, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PodProxyOptions (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str path: path to the resource (required) - :param str path2: Path is the URL path to use for the current proxy request to pod. + :param name: name of the PodProxyOptions (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param path: path to the resource (required) + :type path: str + :param path2: Path is the URL path to use for the current proxy request to pod. + :type path2: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: str + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: str """ kwargs['_return_http_data_only'] = True return self.connect_options_namespaced_pod_proxy_with_path_with_http_info(name, namespace, path, **kwargs) # noqa: E501 @@ -2958,26 +3581,40 @@ def connect_options_namespaced_pod_proxy_with_path_with_http_info(self, name, na connect OPTIONS requests to proxy of Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_options_namespaced_pod_proxy_with_path_with_http_info(name, namespace, path, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PodProxyOptions (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str path: path to the resource (required) - :param str path2: Path is the URL path to use for the current proxy request to pod. + :param name: name of the PodProxyOptions (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param path: path to the resource (required) + :type path: str + :param path2: Path is the URL path to use for the current proxy request to pod. + :type path2: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -2993,7 +3630,10 @@ def connect_options_namespaced_pod_proxy_with_path_with_http_info(self, name, na 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -3006,16 +3646,13 @@ def connect_options_namespaced_pod_proxy_with_path_with_http_info(self, name, na local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `connect_options_namespaced_pod_proxy_with_path`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `connect_options_namespaced_pod_proxy_with_path`") # noqa: E501 # verify the required parameter 'path' is set - if self.api_client.client_side_validation and ('path' not in local_var_params or # noqa: E501 - local_var_params['path'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('path') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `path` when calling `connect_options_namespaced_pod_proxy_with_path`") # noqa: E501 collection_formats = {} @@ -3029,10 +3666,10 @@ def connect_options_namespaced_pod_proxy_with_path_with_http_info(self, name, na path_params['path'] = local_var_params['path'] # noqa: E501 query_params = [] - if 'path2' in local_var_params and local_var_params['path2'] is not None: # noqa: E501 + if local_var_params.get('path2') is not None: # noqa: E501 query_params.append(('path', local_var_params['path2'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -3045,6 +3682,11 @@ def connect_options_namespaced_pod_proxy_with_path_with_http_info(self, name, na # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "str", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}', 'OPTIONS', path_params, @@ -3053,13 +3695,14 @@ def connect_options_namespaced_pod_proxy_with_path_with_http_info(self, name, na body=body_params, post_params=form_params, files=local_var_files, - response_type='str', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def connect_options_namespaced_service_proxy(self, name, namespace, **kwargs): # noqa: E501 """connect_options_namespaced_service_proxy # noqa: E501 @@ -3067,23 +3710,30 @@ def connect_options_namespaced_service_proxy(self, name, namespace, **kwargs): connect OPTIONS requests to proxy of Service # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_options_namespaced_service_proxy(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ServiceProxyOptions (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str path: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. + :param name: name of the ServiceProxyOptions (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param path: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. + :type path: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: str + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: str """ kwargs['_return_http_data_only'] = True return self.connect_options_namespaced_service_proxy_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -3094,25 +3744,38 @@ def connect_options_namespaced_service_proxy_with_http_info(self, name, namespac connect OPTIONS requests to proxy of Service # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_options_namespaced_service_proxy_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ServiceProxyOptions (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str path: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. + :param name: name of the ServiceProxyOptions (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param path: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. + :type path: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -3127,7 +3790,10 @@ def connect_options_namespaced_service_proxy_with_http_info(self, name, namespac 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -3140,12 +3806,10 @@ def connect_options_namespaced_service_proxy_with_http_info(self, name, namespac local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `connect_options_namespaced_service_proxy`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `connect_options_namespaced_service_proxy`") # noqa: E501 collection_formats = {} @@ -3157,10 +3821,10 @@ def connect_options_namespaced_service_proxy_with_http_info(self, name, namespac path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'path' in local_var_params and local_var_params['path'] is not None: # noqa: E501 + if local_var_params.get('path') is not None: # noqa: E501 query_params.append(('path', local_var_params['path'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -3173,6 +3837,11 @@ def connect_options_namespaced_service_proxy_with_http_info(self, name, namespac # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "str", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/services/{name}/proxy', 'OPTIONS', path_params, @@ -3181,13 +3850,14 @@ def connect_options_namespaced_service_proxy_with_http_info(self, name, namespac body=body_params, post_params=form_params, files=local_var_files, - response_type='str', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def connect_options_namespaced_service_proxy_with_path(self, name, namespace, path, **kwargs): # noqa: E501 """connect_options_namespaced_service_proxy_with_path # noqa: E501 @@ -3195,24 +3865,32 @@ def connect_options_namespaced_service_proxy_with_path(self, name, namespace, pa connect OPTIONS requests to proxy of Service # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_options_namespaced_service_proxy_with_path(name, namespace, path, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ServiceProxyOptions (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str path: path to the resource (required) - :param str path2: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. + :param name: name of the ServiceProxyOptions (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param path: path to the resource (required) + :type path: str + :param path2: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. + :type path2: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: str + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: str """ kwargs['_return_http_data_only'] = True return self.connect_options_namespaced_service_proxy_with_path_with_http_info(name, namespace, path, **kwargs) # noqa: E501 @@ -3223,26 +3901,40 @@ def connect_options_namespaced_service_proxy_with_path_with_http_info(self, name connect OPTIONS requests to proxy of Service # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_options_namespaced_service_proxy_with_path_with_http_info(name, namespace, path, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ServiceProxyOptions (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str path: path to the resource (required) - :param str path2: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. + :param name: name of the ServiceProxyOptions (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param path: path to the resource (required) + :type path: str + :param path2: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. + :type path2: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -3258,7 +3950,10 @@ def connect_options_namespaced_service_proxy_with_path_with_http_info(self, name 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -3271,16 +3966,13 @@ def connect_options_namespaced_service_proxy_with_path_with_http_info(self, name local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `connect_options_namespaced_service_proxy_with_path`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `connect_options_namespaced_service_proxy_with_path`") # noqa: E501 # verify the required parameter 'path' is set - if self.api_client.client_side_validation and ('path' not in local_var_params or # noqa: E501 - local_var_params['path'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('path') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `path` when calling `connect_options_namespaced_service_proxy_with_path`") # noqa: E501 collection_formats = {} @@ -3294,10 +3986,10 @@ def connect_options_namespaced_service_proxy_with_path_with_http_info(self, name path_params['path'] = local_var_params['path'] # noqa: E501 query_params = [] - if 'path2' in local_var_params and local_var_params['path2'] is not None: # noqa: E501 + if local_var_params.get('path2') is not None: # noqa: E501 query_params.append(('path', local_var_params['path2'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -3310,6 +4002,11 @@ def connect_options_namespaced_service_proxy_with_path_with_http_info(self, name # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "str", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}', 'OPTIONS', path_params, @@ -3318,13 +4015,14 @@ def connect_options_namespaced_service_proxy_with_path_with_http_info(self, name body=body_params, post_params=form_params, files=local_var_files, - response_type='str', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def connect_options_node_proxy(self, name, **kwargs): # noqa: E501 """connect_options_node_proxy # noqa: E501 @@ -3332,22 +4030,28 @@ def connect_options_node_proxy(self, name, **kwargs): # noqa: E501 connect OPTIONS requests to proxy of Node # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_options_node_proxy(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the NodeProxyOptions (required) - :param str path: Path is the URL path to use for the current proxy request to node. + :param name: name of the NodeProxyOptions (required) + :type name: str + :param path: Path is the URL path to use for the current proxy request to node. + :type path: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: str + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: str """ kwargs['_return_http_data_only'] = True return self.connect_options_node_proxy_with_http_info(name, **kwargs) # noqa: E501 @@ -3358,24 +4062,36 @@ def connect_options_node_proxy_with_http_info(self, name, **kwargs): # noqa: E5 connect OPTIONS requests to proxy of Node # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_options_node_proxy_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the NodeProxyOptions (required) - :param str path: Path is the URL path to use for the current proxy request to node. + :param name: name of the NodeProxyOptions (required) + :type name: str + :param path: Path is the URL path to use for the current proxy request to node. + :type path: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -3389,7 +4105,10 @@ def connect_options_node_proxy_with_http_info(self, name, **kwargs): # noqa: E5 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -3402,8 +4121,7 @@ def connect_options_node_proxy_with_http_info(self, name, **kwargs): # noqa: E5 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `connect_options_node_proxy`") # noqa: E501 collection_formats = {} @@ -3413,10 +4131,10 @@ def connect_options_node_proxy_with_http_info(self, name, **kwargs): # noqa: E5 path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'path' in local_var_params and local_var_params['path'] is not None: # noqa: E501 + if local_var_params.get('path') is not None: # noqa: E501 query_params.append(('path', local_var_params['path'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -3429,6 +4147,11 @@ def connect_options_node_proxy_with_http_info(self, name, **kwargs): # noqa: E5 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "str", + 401: None, + } + return self.api_client.call_api( '/api/v1/nodes/{name}/proxy', 'OPTIONS', path_params, @@ -3437,13 +4160,14 @@ def connect_options_node_proxy_with_http_info(self, name, **kwargs): # noqa: E5 body=body_params, post_params=form_params, files=local_var_files, - response_type='str', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def connect_options_node_proxy_with_path(self, name, path, **kwargs): # noqa: E501 """connect_options_node_proxy_with_path # noqa: E501 @@ -3451,23 +4175,30 @@ def connect_options_node_proxy_with_path(self, name, path, **kwargs): # noqa: E connect OPTIONS requests to proxy of Node # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_options_node_proxy_with_path(name, path, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the NodeProxyOptions (required) - :param str path: path to the resource (required) - :param str path2: Path is the URL path to use for the current proxy request to node. + :param name: name of the NodeProxyOptions (required) + :type name: str + :param path: path to the resource (required) + :type path: str + :param path2: Path is the URL path to use for the current proxy request to node. + :type path2: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: str + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: str """ kwargs['_return_http_data_only'] = True return self.connect_options_node_proxy_with_path_with_http_info(name, path, **kwargs) # noqa: E501 @@ -3478,25 +4209,38 @@ def connect_options_node_proxy_with_path_with_http_info(self, name, path, **kwar connect OPTIONS requests to proxy of Node # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_options_node_proxy_with_path_with_http_info(name, path, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the NodeProxyOptions (required) - :param str path: path to the resource (required) - :param str path2: Path is the URL path to use for the current proxy request to node. + :param name: name of the NodeProxyOptions (required) + :type name: str + :param path: path to the resource (required) + :type path: str + :param path2: Path is the URL path to use for the current proxy request to node. + :type path2: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -3511,7 +4255,10 @@ def connect_options_node_proxy_with_path_with_http_info(self, name, path, **kwar 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -3524,12 +4271,10 @@ def connect_options_node_proxy_with_path_with_http_info(self, name, path, **kwar local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `connect_options_node_proxy_with_path`") # noqa: E501 # verify the required parameter 'path' is set - if self.api_client.client_side_validation and ('path' not in local_var_params or # noqa: E501 - local_var_params['path'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('path') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `path` when calling `connect_options_node_proxy_with_path`") # noqa: E501 collection_formats = {} @@ -3541,10 +4286,10 @@ def connect_options_node_proxy_with_path_with_http_info(self, name, path, **kwar path_params['path'] = local_var_params['path'] # noqa: E501 query_params = [] - if 'path2' in local_var_params and local_var_params['path2'] is not None: # noqa: E501 + if local_var_params.get('path2') is not None: # noqa: E501 query_params.append(('path', local_var_params['path2'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -3557,6 +4302,11 @@ def connect_options_node_proxy_with_path_with_http_info(self, name, path, **kwar # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "str", + 401: None, + } + return self.api_client.call_api( '/api/v1/nodes/{name}/proxy/{path}', 'OPTIONS', path_params, @@ -3565,13 +4315,14 @@ def connect_options_node_proxy_with_path_with_http_info(self, name, path, **kwar body=body_params, post_params=form_params, files=local_var_files, - response_type='str', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def connect_patch_namespaced_pod_proxy(self, name, namespace, **kwargs): # noqa: E501 """connect_patch_namespaced_pod_proxy # noqa: E501 @@ -3579,23 +4330,30 @@ def connect_patch_namespaced_pod_proxy(self, name, namespace, **kwargs): # noqa connect PATCH requests to proxy of Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_patch_namespaced_pod_proxy(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PodProxyOptions (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str path: Path is the URL path to use for the current proxy request to pod. + :param name: name of the PodProxyOptions (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param path: Path is the URL path to use for the current proxy request to pod. + :type path: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: str + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: str """ kwargs['_return_http_data_only'] = True return self.connect_patch_namespaced_pod_proxy_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -3606,25 +4364,38 @@ def connect_patch_namespaced_pod_proxy_with_http_info(self, name, namespace, **k connect PATCH requests to proxy of Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_patch_namespaced_pod_proxy_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PodProxyOptions (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str path: Path is the URL path to use for the current proxy request to pod. + :param name: name of the PodProxyOptions (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param path: Path is the URL path to use for the current proxy request to pod. + :type path: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -3639,7 +4410,10 @@ def connect_patch_namespaced_pod_proxy_with_http_info(self, name, namespace, **k 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -3652,12 +4426,10 @@ def connect_patch_namespaced_pod_proxy_with_http_info(self, name, namespace, **k local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `connect_patch_namespaced_pod_proxy`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `connect_patch_namespaced_pod_proxy`") # noqa: E501 collection_formats = {} @@ -3669,10 +4441,10 @@ def connect_patch_namespaced_pod_proxy_with_http_info(self, name, namespace, **k path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'path' in local_var_params and local_var_params['path'] is not None: # noqa: E501 + if local_var_params.get('path') is not None: # noqa: E501 query_params.append(('path', local_var_params['path'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -3685,6 +4457,11 @@ def connect_patch_namespaced_pod_proxy_with_http_info(self, name, namespace, **k # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "str", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/pods/{name}/proxy', 'PATCH', path_params, @@ -3693,13 +4470,14 @@ def connect_patch_namespaced_pod_proxy_with_http_info(self, name, namespace, **k body=body_params, post_params=form_params, files=local_var_files, - response_type='str', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def connect_patch_namespaced_pod_proxy_with_path(self, name, namespace, path, **kwargs): # noqa: E501 """connect_patch_namespaced_pod_proxy_with_path # noqa: E501 @@ -3707,24 +4485,32 @@ def connect_patch_namespaced_pod_proxy_with_path(self, name, namespace, path, ** connect PATCH requests to proxy of Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_patch_namespaced_pod_proxy_with_path(name, namespace, path, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PodProxyOptions (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str path: path to the resource (required) - :param str path2: Path is the URL path to use for the current proxy request to pod. + :param name: name of the PodProxyOptions (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param path: path to the resource (required) + :type path: str + :param path2: Path is the URL path to use for the current proxy request to pod. + :type path2: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: str + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: str """ kwargs['_return_http_data_only'] = True return self.connect_patch_namespaced_pod_proxy_with_path_with_http_info(name, namespace, path, **kwargs) # noqa: E501 @@ -3735,26 +4521,40 @@ def connect_patch_namespaced_pod_proxy_with_path_with_http_info(self, name, name connect PATCH requests to proxy of Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_patch_namespaced_pod_proxy_with_path_with_http_info(name, namespace, path, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PodProxyOptions (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str path: path to the resource (required) - :param str path2: Path is the URL path to use for the current proxy request to pod. + :param name: name of the PodProxyOptions (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param path: path to the resource (required) + :type path: str + :param path2: Path is the URL path to use for the current proxy request to pod. + :type path2: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -3770,7 +4570,10 @@ def connect_patch_namespaced_pod_proxy_with_path_with_http_info(self, name, name 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -3783,16 +4586,13 @@ def connect_patch_namespaced_pod_proxy_with_path_with_http_info(self, name, name local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `connect_patch_namespaced_pod_proxy_with_path`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `connect_patch_namespaced_pod_proxy_with_path`") # noqa: E501 # verify the required parameter 'path' is set - if self.api_client.client_side_validation and ('path' not in local_var_params or # noqa: E501 - local_var_params['path'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('path') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `path` when calling `connect_patch_namespaced_pod_proxy_with_path`") # noqa: E501 collection_formats = {} @@ -3806,10 +4606,10 @@ def connect_patch_namespaced_pod_proxy_with_path_with_http_info(self, name, name path_params['path'] = local_var_params['path'] # noqa: E501 query_params = [] - if 'path2' in local_var_params and local_var_params['path2'] is not None: # noqa: E501 + if local_var_params.get('path2') is not None: # noqa: E501 query_params.append(('path', local_var_params['path2'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -3822,6 +4622,11 @@ def connect_patch_namespaced_pod_proxy_with_path_with_http_info(self, name, name # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "str", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}', 'PATCH', path_params, @@ -3830,13 +4635,14 @@ def connect_patch_namespaced_pod_proxy_with_path_with_http_info(self, name, name body=body_params, post_params=form_params, files=local_var_files, - response_type='str', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def connect_patch_namespaced_service_proxy(self, name, namespace, **kwargs): # noqa: E501 """connect_patch_namespaced_service_proxy # noqa: E501 @@ -3844,23 +4650,30 @@ def connect_patch_namespaced_service_proxy(self, name, namespace, **kwargs): # connect PATCH requests to proxy of Service # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_patch_namespaced_service_proxy(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ServiceProxyOptions (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str path: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. + :param name: name of the ServiceProxyOptions (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param path: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. + :type path: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: str + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: str """ kwargs['_return_http_data_only'] = True return self.connect_patch_namespaced_service_proxy_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -3871,25 +4684,38 @@ def connect_patch_namespaced_service_proxy_with_http_info(self, name, namespace, connect PATCH requests to proxy of Service # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_patch_namespaced_service_proxy_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ServiceProxyOptions (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str path: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. + :param name: name of the ServiceProxyOptions (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param path: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. + :type path: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -3904,7 +4730,10 @@ def connect_patch_namespaced_service_proxy_with_http_info(self, name, namespace, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -3917,12 +4746,10 @@ def connect_patch_namespaced_service_proxy_with_http_info(self, name, namespace, local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `connect_patch_namespaced_service_proxy`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `connect_patch_namespaced_service_proxy`") # noqa: E501 collection_formats = {} @@ -3934,10 +4761,10 @@ def connect_patch_namespaced_service_proxy_with_http_info(self, name, namespace, path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'path' in local_var_params and local_var_params['path'] is not None: # noqa: E501 + if local_var_params.get('path') is not None: # noqa: E501 query_params.append(('path', local_var_params['path'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -3950,6 +4777,11 @@ def connect_patch_namespaced_service_proxy_with_http_info(self, name, namespace, # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "str", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/services/{name}/proxy', 'PATCH', path_params, @@ -3958,13 +4790,14 @@ def connect_patch_namespaced_service_proxy_with_http_info(self, name, namespace, body=body_params, post_params=form_params, files=local_var_files, - response_type='str', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def connect_patch_namespaced_service_proxy_with_path(self, name, namespace, path, **kwargs): # noqa: E501 """connect_patch_namespaced_service_proxy_with_path # noqa: E501 @@ -3972,24 +4805,32 @@ def connect_patch_namespaced_service_proxy_with_path(self, name, namespace, path connect PATCH requests to proxy of Service # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_patch_namespaced_service_proxy_with_path(name, namespace, path, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ServiceProxyOptions (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str path: path to the resource (required) - :param str path2: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. + :param name: name of the ServiceProxyOptions (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param path: path to the resource (required) + :type path: str + :param path2: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. + :type path2: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: str + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: str """ kwargs['_return_http_data_only'] = True return self.connect_patch_namespaced_service_proxy_with_path_with_http_info(name, namespace, path, **kwargs) # noqa: E501 @@ -4000,26 +4841,40 @@ def connect_patch_namespaced_service_proxy_with_path_with_http_info(self, name, connect PATCH requests to proxy of Service # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_patch_namespaced_service_proxy_with_path_with_http_info(name, namespace, path, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ServiceProxyOptions (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str path: path to the resource (required) - :param str path2: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. + :param name: name of the ServiceProxyOptions (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param path: path to the resource (required) + :type path: str + :param path2: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. + :type path2: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -4035,7 +4890,10 @@ def connect_patch_namespaced_service_proxy_with_path_with_http_info(self, name, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -4048,16 +4906,13 @@ def connect_patch_namespaced_service_proxy_with_path_with_http_info(self, name, local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `connect_patch_namespaced_service_proxy_with_path`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `connect_patch_namespaced_service_proxy_with_path`") # noqa: E501 # verify the required parameter 'path' is set - if self.api_client.client_side_validation and ('path' not in local_var_params or # noqa: E501 - local_var_params['path'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('path') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `path` when calling `connect_patch_namespaced_service_proxy_with_path`") # noqa: E501 collection_formats = {} @@ -4071,10 +4926,10 @@ def connect_patch_namespaced_service_proxy_with_path_with_http_info(self, name, path_params['path'] = local_var_params['path'] # noqa: E501 query_params = [] - if 'path2' in local_var_params and local_var_params['path2'] is not None: # noqa: E501 + if local_var_params.get('path2') is not None: # noqa: E501 query_params.append(('path', local_var_params['path2'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -4087,6 +4942,11 @@ def connect_patch_namespaced_service_proxy_with_path_with_http_info(self, name, # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "str", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}', 'PATCH', path_params, @@ -4095,13 +4955,14 @@ def connect_patch_namespaced_service_proxy_with_path_with_http_info(self, name, body=body_params, post_params=form_params, files=local_var_files, - response_type='str', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def connect_patch_node_proxy(self, name, **kwargs): # noqa: E501 """connect_patch_node_proxy # noqa: E501 @@ -4109,22 +4970,28 @@ def connect_patch_node_proxy(self, name, **kwargs): # noqa: E501 connect PATCH requests to proxy of Node # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_patch_node_proxy(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the NodeProxyOptions (required) - :param str path: Path is the URL path to use for the current proxy request to node. + :param name: name of the NodeProxyOptions (required) + :type name: str + :param path: Path is the URL path to use for the current proxy request to node. + :type path: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: str + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: str """ kwargs['_return_http_data_only'] = True return self.connect_patch_node_proxy_with_http_info(name, **kwargs) # noqa: E501 @@ -4135,24 +5002,36 @@ def connect_patch_node_proxy_with_http_info(self, name, **kwargs): # noqa: E501 connect PATCH requests to proxy of Node # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_patch_node_proxy_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the NodeProxyOptions (required) - :param str path: Path is the URL path to use for the current proxy request to node. + :param name: name of the NodeProxyOptions (required) + :type name: str + :param path: Path is the URL path to use for the current proxy request to node. + :type path: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -4166,7 +5045,10 @@ def connect_patch_node_proxy_with_http_info(self, name, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -4179,8 +5061,7 @@ def connect_patch_node_proxy_with_http_info(self, name, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `connect_patch_node_proxy`") # noqa: E501 collection_formats = {} @@ -4190,10 +5071,10 @@ def connect_patch_node_proxy_with_http_info(self, name, **kwargs): # noqa: E501 path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'path' in local_var_params and local_var_params['path'] is not None: # noqa: E501 + if local_var_params.get('path') is not None: # noqa: E501 query_params.append(('path', local_var_params['path'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -4206,6 +5087,11 @@ def connect_patch_node_proxy_with_http_info(self, name, **kwargs): # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "str", + 401: None, + } + return self.api_client.call_api( '/api/v1/nodes/{name}/proxy', 'PATCH', path_params, @@ -4214,13 +5100,14 @@ def connect_patch_node_proxy_with_http_info(self, name, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='str', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def connect_patch_node_proxy_with_path(self, name, path, **kwargs): # noqa: E501 """connect_patch_node_proxy_with_path # noqa: E501 @@ -4228,23 +5115,30 @@ def connect_patch_node_proxy_with_path(self, name, path, **kwargs): # noqa: E50 connect PATCH requests to proxy of Node # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_patch_node_proxy_with_path(name, path, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the NodeProxyOptions (required) - :param str path: path to the resource (required) - :param str path2: Path is the URL path to use for the current proxy request to node. + :param name: name of the NodeProxyOptions (required) + :type name: str + :param path: path to the resource (required) + :type path: str + :param path2: Path is the URL path to use for the current proxy request to node. + :type path2: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: str + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: str """ kwargs['_return_http_data_only'] = True return self.connect_patch_node_proxy_with_path_with_http_info(name, path, **kwargs) # noqa: E501 @@ -4255,25 +5149,38 @@ def connect_patch_node_proxy_with_path_with_http_info(self, name, path, **kwargs connect PATCH requests to proxy of Node # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_patch_node_proxy_with_path_with_http_info(name, path, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the NodeProxyOptions (required) - :param str path: path to the resource (required) - :param str path2: Path is the URL path to use for the current proxy request to node. + :param name: name of the NodeProxyOptions (required) + :type name: str + :param path: path to the resource (required) + :type path: str + :param path2: Path is the URL path to use for the current proxy request to node. + :type path2: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -4288,7 +5195,10 @@ def connect_patch_node_proxy_with_path_with_http_info(self, name, path, **kwargs 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -4301,12 +5211,10 @@ def connect_patch_node_proxy_with_path_with_http_info(self, name, path, **kwargs local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `connect_patch_node_proxy_with_path`") # noqa: E501 # verify the required parameter 'path' is set - if self.api_client.client_side_validation and ('path' not in local_var_params or # noqa: E501 - local_var_params['path'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('path') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `path` when calling `connect_patch_node_proxy_with_path`") # noqa: E501 collection_formats = {} @@ -4318,10 +5226,10 @@ def connect_patch_node_proxy_with_path_with_http_info(self, name, path, **kwargs path_params['path'] = local_var_params['path'] # noqa: E501 query_params = [] - if 'path2' in local_var_params and local_var_params['path2'] is not None: # noqa: E501 + if local_var_params.get('path2') is not None: # noqa: E501 query_params.append(('path', local_var_params['path2'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -4334,6 +5242,11 @@ def connect_patch_node_proxy_with_path_with_http_info(self, name, path, **kwargs # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "str", + 401: None, + } + return self.api_client.call_api( '/api/v1/nodes/{name}/proxy/{path}', 'PATCH', path_params, @@ -4342,13 +5255,14 @@ def connect_patch_node_proxy_with_path_with_http_info(self, name, path, **kwargs body=body_params, post_params=form_params, files=local_var_files, - response_type='str', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def connect_post_namespaced_pod_attach(self, name, namespace, **kwargs): # noqa: E501 """connect_post_namespaced_pod_attach # noqa: E501 @@ -4356,27 +5270,38 @@ def connect_post_namespaced_pod_attach(self, name, namespace, **kwargs): # noqa connect POST requests to attach of Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_post_namespaced_pod_attach(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PodAttachOptions (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str container: The container in which to execute the command. Defaults to only container if there is only one container in the pod. - :param bool stderr: Stderr if true indicates that stderr is to be redirected for the attach call. Defaults to true. - :param bool stdin: Stdin if true, redirects the standard input stream of the pod for this call. Defaults to false. - :param bool stdout: Stdout if true indicates that stdout is to be redirected for the attach call. Defaults to true. - :param bool tty: TTY if true indicates that a tty will be allocated for the attach call. This is passed through the container runtime so the tty is allocated on the worker node by the container runtime. Defaults to false. + :param name: name of the PodAttachOptions (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param container: The container in which to execute the command. Defaults to only container if there is only one container in the pod. + :type container: str + :param stderr: Stderr if true indicates that stderr is to be redirected for the attach call. Defaults to true. + :type stderr: bool + :param stdin: Stdin if true, redirects the standard input stream of the pod for this call. Defaults to false. + :type stdin: bool + :param stdout: Stdout if true indicates that stdout is to be redirected for the attach call. Defaults to true. + :type stdout: bool + :param tty: TTY if true indicates that a tty will be allocated for the attach call. This is passed through the container runtime so the tty is allocated on the worker node by the container runtime. Defaults to false. + :type tty: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: str + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: str """ kwargs['_return_http_data_only'] = True return self.connect_post_namespaced_pod_attach_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -4387,29 +5312,46 @@ def connect_post_namespaced_pod_attach_with_http_info(self, name, namespace, **k connect POST requests to attach of Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_post_namespaced_pod_attach_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PodAttachOptions (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str container: The container in which to execute the command. Defaults to only container if there is only one container in the pod. - :param bool stderr: Stderr if true indicates that stderr is to be redirected for the attach call. Defaults to true. - :param bool stdin: Stdin if true, redirects the standard input stream of the pod for this call. Defaults to false. - :param bool stdout: Stdout if true indicates that stdout is to be redirected for the attach call. Defaults to true. - :param bool tty: TTY if true indicates that a tty will be allocated for the attach call. This is passed through the container runtime so the tty is allocated on the worker node by the container runtime. Defaults to false. + :param name: name of the PodAttachOptions (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param container: The container in which to execute the command. Defaults to only container if there is only one container in the pod. + :type container: str + :param stderr: Stderr if true indicates that stderr is to be redirected for the attach call. Defaults to true. + :type stderr: bool + :param stdin: Stdin if true, redirects the standard input stream of the pod for this call. Defaults to false. + :type stdin: bool + :param stdout: Stdout if true indicates that stdout is to be redirected for the attach call. Defaults to true. + :type stdout: bool + :param tty: TTY if true indicates that a tty will be allocated for the attach call. This is passed through the container runtime so the tty is allocated on the worker node by the container runtime. Defaults to false. + :type tty: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -4428,7 +5370,10 @@ def connect_post_namespaced_pod_attach_with_http_info(self, name, namespace, **k 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -4441,12 +5386,10 @@ def connect_post_namespaced_pod_attach_with_http_info(self, name, namespace, **k local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `connect_post_namespaced_pod_attach`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `connect_post_namespaced_pod_attach`") # noqa: E501 collection_formats = {} @@ -4458,18 +5401,18 @@ def connect_post_namespaced_pod_attach_with_http_info(self, name, namespace, **k path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'container' in local_var_params and local_var_params['container'] is not None: # noqa: E501 + if local_var_params.get('container') is not None: # noqa: E501 query_params.append(('container', local_var_params['container'])) # noqa: E501 - if 'stderr' in local_var_params and local_var_params['stderr'] is not None: # noqa: E501 + if local_var_params.get('stderr') is not None: # noqa: E501 query_params.append(('stderr', local_var_params['stderr'])) # noqa: E501 - if 'stdin' in local_var_params and local_var_params['stdin'] is not None: # noqa: E501 + if local_var_params.get('stdin') is not None: # noqa: E501 query_params.append(('stdin', local_var_params['stdin'])) # noqa: E501 - if 'stdout' in local_var_params and local_var_params['stdout'] is not None: # noqa: E501 + if local_var_params.get('stdout') is not None: # noqa: E501 query_params.append(('stdout', local_var_params['stdout'])) # noqa: E501 - if 'tty' in local_var_params and local_var_params['tty'] is not None: # noqa: E501 + if local_var_params.get('tty') is not None: # noqa: E501 query_params.append(('tty', local_var_params['tty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -4482,6 +5425,11 @@ def connect_post_namespaced_pod_attach_with_http_info(self, name, namespace, **k # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "str", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/pods/{name}/attach', 'POST', path_params, @@ -4490,13 +5438,14 @@ def connect_post_namespaced_pod_attach_with_http_info(self, name, namespace, **k body=body_params, post_params=form_params, files=local_var_files, - response_type='str', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def connect_post_namespaced_pod_exec(self, name, namespace, **kwargs): # noqa: E501 """connect_post_namespaced_pod_exec # noqa: E501 @@ -4504,28 +5453,40 @@ def connect_post_namespaced_pod_exec(self, name, namespace, **kwargs): # noqa: connect POST requests to exec of Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_post_namespaced_pod_exec(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PodExecOptions (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str command: Command is the remote command to execute. argv array. Not executed within a shell. - :param str container: Container in which to execute the command. Defaults to only container if there is only one container in the pod. - :param bool stderr: Redirect the standard error stream of the pod for this call. - :param bool stdin: Redirect the standard input stream of the pod for this call. Defaults to false. - :param bool stdout: Redirect the standard output stream of the pod for this call. - :param bool tty: TTY if true indicates that a tty will be allocated for the exec call. Defaults to false. + :param name: name of the PodExecOptions (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param command: Command is the remote command to execute. argv array. Not executed within a shell. + :type command: str + :param container: Container in which to execute the command. Defaults to only container if there is only one container in the pod. + :type container: str + :param stderr: Redirect the standard error stream of the pod for this call. + :type stderr: bool + :param stdin: Redirect the standard input stream of the pod for this call. Defaults to false. + :type stdin: bool + :param stdout: Redirect the standard output stream of the pod for this call. + :type stdout: bool + :param tty: TTY if true indicates that a tty will be allocated for the exec call. Defaults to false. + :type tty: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: str + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: str """ kwargs['_return_http_data_only'] = True return self.connect_post_namespaced_pod_exec_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -4536,30 +5497,48 @@ def connect_post_namespaced_pod_exec_with_http_info(self, name, namespace, **kwa connect POST requests to exec of Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_post_namespaced_pod_exec_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PodExecOptions (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str command: Command is the remote command to execute. argv array. Not executed within a shell. - :param str container: Container in which to execute the command. Defaults to only container if there is only one container in the pod. - :param bool stderr: Redirect the standard error stream of the pod for this call. - :param bool stdin: Redirect the standard input stream of the pod for this call. Defaults to false. - :param bool stdout: Redirect the standard output stream of the pod for this call. - :param bool tty: TTY if true indicates that a tty will be allocated for the exec call. Defaults to false. + :param name: name of the PodExecOptions (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param command: Command is the remote command to execute. argv array. Not executed within a shell. + :type command: str + :param container: Container in which to execute the command. Defaults to only container if there is only one container in the pod. + :type container: str + :param stderr: Redirect the standard error stream of the pod for this call. + :type stderr: bool + :param stdin: Redirect the standard input stream of the pod for this call. Defaults to false. + :type stdin: bool + :param stdout: Redirect the standard output stream of the pod for this call. + :type stdout: bool + :param tty: TTY if true indicates that a tty will be allocated for the exec call. Defaults to false. + :type tty: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -4579,7 +5558,10 @@ def connect_post_namespaced_pod_exec_with_http_info(self, name, namespace, **kwa 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -4592,12 +5574,10 @@ def connect_post_namespaced_pod_exec_with_http_info(self, name, namespace, **kwa local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `connect_post_namespaced_pod_exec`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `connect_post_namespaced_pod_exec`") # noqa: E501 collection_formats = {} @@ -4609,20 +5589,20 @@ def connect_post_namespaced_pod_exec_with_http_info(self, name, namespace, **kwa path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'command' in local_var_params and local_var_params['command'] is not None: # noqa: E501 + if local_var_params.get('command') is not None: # noqa: E501 query_params.append(('command', local_var_params['command'])) # noqa: E501 - if 'container' in local_var_params and local_var_params['container'] is not None: # noqa: E501 + if local_var_params.get('container') is not None: # noqa: E501 query_params.append(('container', local_var_params['container'])) # noqa: E501 - if 'stderr' in local_var_params and local_var_params['stderr'] is not None: # noqa: E501 + if local_var_params.get('stderr') is not None: # noqa: E501 query_params.append(('stderr', local_var_params['stderr'])) # noqa: E501 - if 'stdin' in local_var_params and local_var_params['stdin'] is not None: # noqa: E501 + if local_var_params.get('stdin') is not None: # noqa: E501 query_params.append(('stdin', local_var_params['stdin'])) # noqa: E501 - if 'stdout' in local_var_params and local_var_params['stdout'] is not None: # noqa: E501 + if local_var_params.get('stdout') is not None: # noqa: E501 query_params.append(('stdout', local_var_params['stdout'])) # noqa: E501 - if 'tty' in local_var_params and local_var_params['tty'] is not None: # noqa: E501 + if local_var_params.get('tty') is not None: # noqa: E501 query_params.append(('tty', local_var_params['tty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -4635,6 +5615,11 @@ def connect_post_namespaced_pod_exec_with_http_info(self, name, namespace, **kwa # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "str", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/pods/{name}/exec', 'POST', path_params, @@ -4643,13 +5628,14 @@ def connect_post_namespaced_pod_exec_with_http_info(self, name, namespace, **kwa body=body_params, post_params=form_params, files=local_var_files, - response_type='str', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def connect_post_namespaced_pod_portforward(self, name, namespace, **kwargs): # noqa: E501 """connect_post_namespaced_pod_portforward # noqa: E501 @@ -4657,23 +5643,30 @@ def connect_post_namespaced_pod_portforward(self, name, namespace, **kwargs): # connect POST requests to portforward of Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_post_namespaced_pod_portforward(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PodPortForwardOptions (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param int ports: List of ports to forward Required when using WebSockets + :param name: name of the PodPortForwardOptions (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param ports: List of ports to forward Required when using WebSockets + :type ports: int + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: str + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: str """ kwargs['_return_http_data_only'] = True return self.connect_post_namespaced_pod_portforward_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -4684,25 +5677,38 @@ def connect_post_namespaced_pod_portforward_with_http_info(self, name, namespace connect POST requests to portforward of Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_post_namespaced_pod_portforward_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PodPortForwardOptions (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param int ports: List of ports to forward Required when using WebSockets + :param name: name of the PodPortForwardOptions (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param ports: List of ports to forward Required when using WebSockets + :type ports: int + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -4717,7 +5723,10 @@ def connect_post_namespaced_pod_portforward_with_http_info(self, name, namespace 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -4730,12 +5739,10 @@ def connect_post_namespaced_pod_portforward_with_http_info(self, name, namespace local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `connect_post_namespaced_pod_portforward`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `connect_post_namespaced_pod_portforward`") # noqa: E501 collection_formats = {} @@ -4747,10 +5754,10 @@ def connect_post_namespaced_pod_portforward_with_http_info(self, name, namespace path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'ports' in local_var_params and local_var_params['ports'] is not None: # noqa: E501 + if local_var_params.get('ports') is not None: # noqa: E501 query_params.append(('ports', local_var_params['ports'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -4763,6 +5770,11 @@ def connect_post_namespaced_pod_portforward_with_http_info(self, name, namespace # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "str", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/pods/{name}/portforward', 'POST', path_params, @@ -4771,13 +5783,14 @@ def connect_post_namespaced_pod_portforward_with_http_info(self, name, namespace body=body_params, post_params=form_params, files=local_var_files, - response_type='str', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def connect_post_namespaced_pod_proxy(self, name, namespace, **kwargs): # noqa: E501 """connect_post_namespaced_pod_proxy # noqa: E501 @@ -4785,23 +5798,30 @@ def connect_post_namespaced_pod_proxy(self, name, namespace, **kwargs): # noqa: connect POST requests to proxy of Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_post_namespaced_pod_proxy(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PodProxyOptions (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str path: Path is the URL path to use for the current proxy request to pod. + :param name: name of the PodProxyOptions (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param path: Path is the URL path to use for the current proxy request to pod. + :type path: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: str + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: str """ kwargs['_return_http_data_only'] = True return self.connect_post_namespaced_pod_proxy_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -4812,25 +5832,38 @@ def connect_post_namespaced_pod_proxy_with_http_info(self, name, namespace, **kw connect POST requests to proxy of Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_post_namespaced_pod_proxy_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PodProxyOptions (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str path: Path is the URL path to use for the current proxy request to pod. + :param name: name of the PodProxyOptions (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param path: Path is the URL path to use for the current proxy request to pod. + :type path: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -4845,7 +5878,10 @@ def connect_post_namespaced_pod_proxy_with_http_info(self, name, namespace, **kw 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -4858,12 +5894,10 @@ def connect_post_namespaced_pod_proxy_with_http_info(self, name, namespace, **kw local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `connect_post_namespaced_pod_proxy`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `connect_post_namespaced_pod_proxy`") # noqa: E501 collection_formats = {} @@ -4875,10 +5909,10 @@ def connect_post_namespaced_pod_proxy_with_http_info(self, name, namespace, **kw path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'path' in local_var_params and local_var_params['path'] is not None: # noqa: E501 + if local_var_params.get('path') is not None: # noqa: E501 query_params.append(('path', local_var_params['path'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -4891,6 +5925,11 @@ def connect_post_namespaced_pod_proxy_with_http_info(self, name, namespace, **kw # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "str", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/pods/{name}/proxy', 'POST', path_params, @@ -4899,13 +5938,14 @@ def connect_post_namespaced_pod_proxy_with_http_info(self, name, namespace, **kw body=body_params, post_params=form_params, files=local_var_files, - response_type='str', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def connect_post_namespaced_pod_proxy_with_path(self, name, namespace, path, **kwargs): # noqa: E501 """connect_post_namespaced_pod_proxy_with_path # noqa: E501 @@ -4913,24 +5953,32 @@ def connect_post_namespaced_pod_proxy_with_path(self, name, namespace, path, **k connect POST requests to proxy of Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_post_namespaced_pod_proxy_with_path(name, namespace, path, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PodProxyOptions (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str path: path to the resource (required) - :param str path2: Path is the URL path to use for the current proxy request to pod. + :param name: name of the PodProxyOptions (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param path: path to the resource (required) + :type path: str + :param path2: Path is the URL path to use for the current proxy request to pod. + :type path2: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: str + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: str """ kwargs['_return_http_data_only'] = True return self.connect_post_namespaced_pod_proxy_with_path_with_http_info(name, namespace, path, **kwargs) # noqa: E501 @@ -4941,26 +5989,40 @@ def connect_post_namespaced_pod_proxy_with_path_with_http_info(self, name, names connect POST requests to proxy of Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_post_namespaced_pod_proxy_with_path_with_http_info(name, namespace, path, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PodProxyOptions (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str path: path to the resource (required) - :param str path2: Path is the URL path to use for the current proxy request to pod. + :param name: name of the PodProxyOptions (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param path: path to the resource (required) + :type path: str + :param path2: Path is the URL path to use for the current proxy request to pod. + :type path2: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -4976,7 +6038,10 @@ def connect_post_namespaced_pod_proxy_with_path_with_http_info(self, name, names 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -4989,16 +6054,13 @@ def connect_post_namespaced_pod_proxy_with_path_with_http_info(self, name, names local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `connect_post_namespaced_pod_proxy_with_path`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `connect_post_namespaced_pod_proxy_with_path`") # noqa: E501 # verify the required parameter 'path' is set - if self.api_client.client_side_validation and ('path' not in local_var_params or # noqa: E501 - local_var_params['path'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('path') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `path` when calling `connect_post_namespaced_pod_proxy_with_path`") # noqa: E501 collection_formats = {} @@ -5012,10 +6074,10 @@ def connect_post_namespaced_pod_proxy_with_path_with_http_info(self, name, names path_params['path'] = local_var_params['path'] # noqa: E501 query_params = [] - if 'path2' in local_var_params and local_var_params['path2'] is not None: # noqa: E501 + if local_var_params.get('path2') is not None: # noqa: E501 query_params.append(('path', local_var_params['path2'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -5028,6 +6090,11 @@ def connect_post_namespaced_pod_proxy_with_path_with_http_info(self, name, names # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "str", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}', 'POST', path_params, @@ -5036,13 +6103,14 @@ def connect_post_namespaced_pod_proxy_with_path_with_http_info(self, name, names body=body_params, post_params=form_params, files=local_var_files, - response_type='str', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def connect_post_namespaced_service_proxy(self, name, namespace, **kwargs): # noqa: E501 """connect_post_namespaced_service_proxy # noqa: E501 @@ -5050,23 +6118,30 @@ def connect_post_namespaced_service_proxy(self, name, namespace, **kwargs): # n connect POST requests to proxy of Service # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_post_namespaced_service_proxy(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ServiceProxyOptions (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str path: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. + :param name: name of the ServiceProxyOptions (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param path: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. + :type path: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: str + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: str """ kwargs['_return_http_data_only'] = True return self.connect_post_namespaced_service_proxy_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -5077,25 +6152,38 @@ def connect_post_namespaced_service_proxy_with_http_info(self, name, namespace, connect POST requests to proxy of Service # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_post_namespaced_service_proxy_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ServiceProxyOptions (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str path: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. + :param name: name of the ServiceProxyOptions (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param path: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. + :type path: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -5110,7 +6198,10 @@ def connect_post_namespaced_service_proxy_with_http_info(self, name, namespace, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -5123,12 +6214,10 @@ def connect_post_namespaced_service_proxy_with_http_info(self, name, namespace, local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `connect_post_namespaced_service_proxy`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `connect_post_namespaced_service_proxy`") # noqa: E501 collection_formats = {} @@ -5140,10 +6229,10 @@ def connect_post_namespaced_service_proxy_with_http_info(self, name, namespace, path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'path' in local_var_params and local_var_params['path'] is not None: # noqa: E501 + if local_var_params.get('path') is not None: # noqa: E501 query_params.append(('path', local_var_params['path'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -5156,6 +6245,11 @@ def connect_post_namespaced_service_proxy_with_http_info(self, name, namespace, # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "str", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/services/{name}/proxy', 'POST', path_params, @@ -5164,13 +6258,14 @@ def connect_post_namespaced_service_proxy_with_http_info(self, name, namespace, body=body_params, post_params=form_params, files=local_var_files, - response_type='str', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def connect_post_namespaced_service_proxy_with_path(self, name, namespace, path, **kwargs): # noqa: E501 """connect_post_namespaced_service_proxy_with_path # noqa: E501 @@ -5178,24 +6273,32 @@ def connect_post_namespaced_service_proxy_with_path(self, name, namespace, path, connect POST requests to proxy of Service # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_post_namespaced_service_proxy_with_path(name, namespace, path, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ServiceProxyOptions (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str path: path to the resource (required) - :param str path2: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. + :param name: name of the ServiceProxyOptions (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param path: path to the resource (required) + :type path: str + :param path2: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. + :type path2: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: str + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: str """ kwargs['_return_http_data_only'] = True return self.connect_post_namespaced_service_proxy_with_path_with_http_info(name, namespace, path, **kwargs) # noqa: E501 @@ -5206,26 +6309,40 @@ def connect_post_namespaced_service_proxy_with_path_with_http_info(self, name, n connect POST requests to proxy of Service # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_post_namespaced_service_proxy_with_path_with_http_info(name, namespace, path, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ServiceProxyOptions (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str path: path to the resource (required) - :param str path2: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. + :param name: name of the ServiceProxyOptions (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param path: path to the resource (required) + :type path: str + :param path2: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. + :type path2: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -5241,7 +6358,10 @@ def connect_post_namespaced_service_proxy_with_path_with_http_info(self, name, n 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -5254,16 +6374,13 @@ def connect_post_namespaced_service_proxy_with_path_with_http_info(self, name, n local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `connect_post_namespaced_service_proxy_with_path`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `connect_post_namespaced_service_proxy_with_path`") # noqa: E501 # verify the required parameter 'path' is set - if self.api_client.client_side_validation and ('path' not in local_var_params or # noqa: E501 - local_var_params['path'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('path') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `path` when calling `connect_post_namespaced_service_proxy_with_path`") # noqa: E501 collection_formats = {} @@ -5277,10 +6394,10 @@ def connect_post_namespaced_service_proxy_with_path_with_http_info(self, name, n path_params['path'] = local_var_params['path'] # noqa: E501 query_params = [] - if 'path2' in local_var_params and local_var_params['path2'] is not None: # noqa: E501 + if local_var_params.get('path2') is not None: # noqa: E501 query_params.append(('path', local_var_params['path2'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -5293,6 +6410,11 @@ def connect_post_namespaced_service_proxy_with_path_with_http_info(self, name, n # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "str", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}', 'POST', path_params, @@ -5301,13 +6423,14 @@ def connect_post_namespaced_service_proxy_with_path_with_http_info(self, name, n body=body_params, post_params=form_params, files=local_var_files, - response_type='str', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def connect_post_node_proxy(self, name, **kwargs): # noqa: E501 """connect_post_node_proxy # noqa: E501 @@ -5315,22 +6438,28 @@ def connect_post_node_proxy(self, name, **kwargs): # noqa: E501 connect POST requests to proxy of Node # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_post_node_proxy(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the NodeProxyOptions (required) - :param str path: Path is the URL path to use for the current proxy request to node. + :param name: name of the NodeProxyOptions (required) + :type name: str + :param path: Path is the URL path to use for the current proxy request to node. + :type path: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: str + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: str """ kwargs['_return_http_data_only'] = True return self.connect_post_node_proxy_with_http_info(name, **kwargs) # noqa: E501 @@ -5341,24 +6470,36 @@ def connect_post_node_proxy_with_http_info(self, name, **kwargs): # noqa: E501 connect POST requests to proxy of Node # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_post_node_proxy_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the NodeProxyOptions (required) - :param str path: Path is the URL path to use for the current proxy request to node. + :param name: name of the NodeProxyOptions (required) + :type name: str + :param path: Path is the URL path to use for the current proxy request to node. + :type path: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -5372,7 +6513,10 @@ def connect_post_node_proxy_with_http_info(self, name, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -5385,8 +6529,7 @@ def connect_post_node_proxy_with_http_info(self, name, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `connect_post_node_proxy`") # noqa: E501 collection_formats = {} @@ -5396,10 +6539,10 @@ def connect_post_node_proxy_with_http_info(self, name, **kwargs): # noqa: E501 path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'path' in local_var_params and local_var_params['path'] is not None: # noqa: E501 + if local_var_params.get('path') is not None: # noqa: E501 query_params.append(('path', local_var_params['path'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -5412,6 +6555,11 @@ def connect_post_node_proxy_with_http_info(self, name, **kwargs): # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "str", + 401: None, + } + return self.api_client.call_api( '/api/v1/nodes/{name}/proxy', 'POST', path_params, @@ -5420,13 +6568,14 @@ def connect_post_node_proxy_with_http_info(self, name, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='str', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def connect_post_node_proxy_with_path(self, name, path, **kwargs): # noqa: E501 """connect_post_node_proxy_with_path # noqa: E501 @@ -5434,23 +6583,30 @@ def connect_post_node_proxy_with_path(self, name, path, **kwargs): # noqa: E501 connect POST requests to proxy of Node # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_post_node_proxy_with_path(name, path, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the NodeProxyOptions (required) - :param str path: path to the resource (required) - :param str path2: Path is the URL path to use for the current proxy request to node. + :param name: name of the NodeProxyOptions (required) + :type name: str + :param path: path to the resource (required) + :type path: str + :param path2: Path is the URL path to use for the current proxy request to node. + :type path2: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: str + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: str """ kwargs['_return_http_data_only'] = True return self.connect_post_node_proxy_with_path_with_http_info(name, path, **kwargs) # noqa: E501 @@ -5461,25 +6617,38 @@ def connect_post_node_proxy_with_path_with_http_info(self, name, path, **kwargs) connect POST requests to proxy of Node # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_post_node_proxy_with_path_with_http_info(name, path, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the NodeProxyOptions (required) - :param str path: path to the resource (required) - :param str path2: Path is the URL path to use for the current proxy request to node. + :param name: name of the NodeProxyOptions (required) + :type name: str + :param path: path to the resource (required) + :type path: str + :param path2: Path is the URL path to use for the current proxy request to node. + :type path2: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -5494,7 +6663,10 @@ def connect_post_node_proxy_with_path_with_http_info(self, name, path, **kwargs) 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -5507,12 +6679,10 @@ def connect_post_node_proxy_with_path_with_http_info(self, name, path, **kwargs) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `connect_post_node_proxy_with_path`") # noqa: E501 # verify the required parameter 'path' is set - if self.api_client.client_side_validation and ('path' not in local_var_params or # noqa: E501 - local_var_params['path'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('path') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `path` when calling `connect_post_node_proxy_with_path`") # noqa: E501 collection_formats = {} @@ -5524,10 +6694,10 @@ def connect_post_node_proxy_with_path_with_http_info(self, name, path, **kwargs) path_params['path'] = local_var_params['path'] # noqa: E501 query_params = [] - if 'path2' in local_var_params and local_var_params['path2'] is not None: # noqa: E501 + if local_var_params.get('path2') is not None: # noqa: E501 query_params.append(('path', local_var_params['path2'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -5540,6 +6710,11 @@ def connect_post_node_proxy_with_path_with_http_info(self, name, path, **kwargs) # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "str", + 401: None, + } + return self.api_client.call_api( '/api/v1/nodes/{name}/proxy/{path}', 'POST', path_params, @@ -5548,13 +6723,14 @@ def connect_post_node_proxy_with_path_with_http_info(self, name, path, **kwargs) body=body_params, post_params=form_params, files=local_var_files, - response_type='str', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def connect_put_namespaced_pod_proxy(self, name, namespace, **kwargs): # noqa: E501 """connect_put_namespaced_pod_proxy # noqa: E501 @@ -5562,23 +6738,30 @@ def connect_put_namespaced_pod_proxy(self, name, namespace, **kwargs): # noqa: connect PUT requests to proxy of Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_put_namespaced_pod_proxy(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PodProxyOptions (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str path: Path is the URL path to use for the current proxy request to pod. + :param name: name of the PodProxyOptions (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param path: Path is the URL path to use for the current proxy request to pod. + :type path: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: str + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: str """ kwargs['_return_http_data_only'] = True return self.connect_put_namespaced_pod_proxy_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -5589,25 +6772,38 @@ def connect_put_namespaced_pod_proxy_with_http_info(self, name, namespace, **kwa connect PUT requests to proxy of Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_put_namespaced_pod_proxy_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PodProxyOptions (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str path: Path is the URL path to use for the current proxy request to pod. + :param name: name of the PodProxyOptions (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param path: Path is the URL path to use for the current proxy request to pod. + :type path: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -5622,7 +6818,10 @@ def connect_put_namespaced_pod_proxy_with_http_info(self, name, namespace, **kwa 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -5635,12 +6834,10 @@ def connect_put_namespaced_pod_proxy_with_http_info(self, name, namespace, **kwa local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `connect_put_namespaced_pod_proxy`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `connect_put_namespaced_pod_proxy`") # noqa: E501 collection_formats = {} @@ -5652,10 +6849,10 @@ def connect_put_namespaced_pod_proxy_with_http_info(self, name, namespace, **kwa path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'path' in local_var_params and local_var_params['path'] is not None: # noqa: E501 + if local_var_params.get('path') is not None: # noqa: E501 query_params.append(('path', local_var_params['path'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -5668,6 +6865,11 @@ def connect_put_namespaced_pod_proxy_with_http_info(self, name, namespace, **kwa # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "str", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/pods/{name}/proxy', 'PUT', path_params, @@ -5676,13 +6878,14 @@ def connect_put_namespaced_pod_proxy_with_http_info(self, name, namespace, **kwa body=body_params, post_params=form_params, files=local_var_files, - response_type='str', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def connect_put_namespaced_pod_proxy_with_path(self, name, namespace, path, **kwargs): # noqa: E501 """connect_put_namespaced_pod_proxy_with_path # noqa: E501 @@ -5690,24 +6893,32 @@ def connect_put_namespaced_pod_proxy_with_path(self, name, namespace, path, **kw connect PUT requests to proxy of Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_put_namespaced_pod_proxy_with_path(name, namespace, path, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PodProxyOptions (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str path: path to the resource (required) - :param str path2: Path is the URL path to use for the current proxy request to pod. + :param name: name of the PodProxyOptions (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param path: path to the resource (required) + :type path: str + :param path2: Path is the URL path to use for the current proxy request to pod. + :type path2: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: str + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: str """ kwargs['_return_http_data_only'] = True return self.connect_put_namespaced_pod_proxy_with_path_with_http_info(name, namespace, path, **kwargs) # noqa: E501 @@ -5718,26 +6929,40 @@ def connect_put_namespaced_pod_proxy_with_path_with_http_info(self, name, namesp connect PUT requests to proxy of Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_put_namespaced_pod_proxy_with_path_with_http_info(name, namespace, path, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PodProxyOptions (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str path: path to the resource (required) - :param str path2: Path is the URL path to use for the current proxy request to pod. + :param name: name of the PodProxyOptions (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param path: path to the resource (required) + :type path: str + :param path2: Path is the URL path to use for the current proxy request to pod. + :type path2: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -5753,7 +6978,10 @@ def connect_put_namespaced_pod_proxy_with_path_with_http_info(self, name, namesp 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -5766,16 +6994,13 @@ def connect_put_namespaced_pod_proxy_with_path_with_http_info(self, name, namesp local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `connect_put_namespaced_pod_proxy_with_path`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `connect_put_namespaced_pod_proxy_with_path`") # noqa: E501 # verify the required parameter 'path' is set - if self.api_client.client_side_validation and ('path' not in local_var_params or # noqa: E501 - local_var_params['path'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('path') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `path` when calling `connect_put_namespaced_pod_proxy_with_path`") # noqa: E501 collection_formats = {} @@ -5789,10 +7014,10 @@ def connect_put_namespaced_pod_proxy_with_path_with_http_info(self, name, namesp path_params['path'] = local_var_params['path'] # noqa: E501 query_params = [] - if 'path2' in local_var_params and local_var_params['path2'] is not None: # noqa: E501 + if local_var_params.get('path2') is not None: # noqa: E501 query_params.append(('path', local_var_params['path2'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -5805,6 +7030,11 @@ def connect_put_namespaced_pod_proxy_with_path_with_http_info(self, name, namesp # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "str", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}', 'PUT', path_params, @@ -5813,13 +7043,14 @@ def connect_put_namespaced_pod_proxy_with_path_with_http_info(self, name, namesp body=body_params, post_params=form_params, files=local_var_files, - response_type='str', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def connect_put_namespaced_service_proxy(self, name, namespace, **kwargs): # noqa: E501 """connect_put_namespaced_service_proxy # noqa: E501 @@ -5827,23 +7058,30 @@ def connect_put_namespaced_service_proxy(self, name, namespace, **kwargs): # no connect PUT requests to proxy of Service # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_put_namespaced_service_proxy(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ServiceProxyOptions (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str path: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. + :param name: name of the ServiceProxyOptions (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param path: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. + :type path: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: str + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: str """ kwargs['_return_http_data_only'] = True return self.connect_put_namespaced_service_proxy_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -5854,25 +7092,38 @@ def connect_put_namespaced_service_proxy_with_http_info(self, name, namespace, * connect PUT requests to proxy of Service # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_put_namespaced_service_proxy_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ServiceProxyOptions (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str path: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. + :param name: name of the ServiceProxyOptions (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param path: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. + :type path: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -5887,7 +7138,10 @@ def connect_put_namespaced_service_proxy_with_http_info(self, name, namespace, * 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -5900,12 +7154,10 @@ def connect_put_namespaced_service_proxy_with_http_info(self, name, namespace, * local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `connect_put_namespaced_service_proxy`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `connect_put_namespaced_service_proxy`") # noqa: E501 collection_formats = {} @@ -5917,10 +7169,10 @@ def connect_put_namespaced_service_proxy_with_http_info(self, name, namespace, * path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'path' in local_var_params and local_var_params['path'] is not None: # noqa: E501 + if local_var_params.get('path') is not None: # noqa: E501 query_params.append(('path', local_var_params['path'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -5933,6 +7185,11 @@ def connect_put_namespaced_service_proxy_with_http_info(self, name, namespace, * # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "str", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/services/{name}/proxy', 'PUT', path_params, @@ -5941,13 +7198,14 @@ def connect_put_namespaced_service_proxy_with_http_info(self, name, namespace, * body=body_params, post_params=form_params, files=local_var_files, - response_type='str', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def connect_put_namespaced_service_proxy_with_path(self, name, namespace, path, **kwargs): # noqa: E501 """connect_put_namespaced_service_proxy_with_path # noqa: E501 @@ -5955,24 +7213,32 @@ def connect_put_namespaced_service_proxy_with_path(self, name, namespace, path, connect PUT requests to proxy of Service # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_put_namespaced_service_proxy_with_path(name, namespace, path, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ServiceProxyOptions (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str path: path to the resource (required) - :param str path2: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. + :param name: name of the ServiceProxyOptions (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param path: path to the resource (required) + :type path: str + :param path2: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. + :type path2: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: str + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: str """ kwargs['_return_http_data_only'] = True return self.connect_put_namespaced_service_proxy_with_path_with_http_info(name, namespace, path, **kwargs) # noqa: E501 @@ -5983,26 +7249,40 @@ def connect_put_namespaced_service_proxy_with_path_with_http_info(self, name, na connect PUT requests to proxy of Service # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_put_namespaced_service_proxy_with_path_with_http_info(name, namespace, path, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ServiceProxyOptions (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str path: path to the resource (required) - :param str path2: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. + :param name: name of the ServiceProxyOptions (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param path: path to the resource (required) + :type path: str + :param path2: Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. + :type path2: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -6018,7 +7298,10 @@ def connect_put_namespaced_service_proxy_with_path_with_http_info(self, name, na 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -6031,16 +7314,13 @@ def connect_put_namespaced_service_proxy_with_path_with_http_info(self, name, na local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `connect_put_namespaced_service_proxy_with_path`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `connect_put_namespaced_service_proxy_with_path`") # noqa: E501 # verify the required parameter 'path' is set - if self.api_client.client_side_validation and ('path' not in local_var_params or # noqa: E501 - local_var_params['path'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('path') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `path` when calling `connect_put_namespaced_service_proxy_with_path`") # noqa: E501 collection_formats = {} @@ -6054,10 +7334,10 @@ def connect_put_namespaced_service_proxy_with_path_with_http_info(self, name, na path_params['path'] = local_var_params['path'] # noqa: E501 query_params = [] - if 'path2' in local_var_params and local_var_params['path2'] is not None: # noqa: E501 + if local_var_params.get('path2') is not None: # noqa: E501 query_params.append(('path', local_var_params['path2'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -6070,6 +7350,11 @@ def connect_put_namespaced_service_proxy_with_path_with_http_info(self, name, na # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "str", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}', 'PUT', path_params, @@ -6078,13 +7363,14 @@ def connect_put_namespaced_service_proxy_with_path_with_http_info(self, name, na body=body_params, post_params=form_params, files=local_var_files, - response_type='str', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def connect_put_node_proxy(self, name, **kwargs): # noqa: E501 """connect_put_node_proxy # noqa: E501 @@ -6092,22 +7378,28 @@ def connect_put_node_proxy(self, name, **kwargs): # noqa: E501 connect PUT requests to proxy of Node # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_put_node_proxy(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the NodeProxyOptions (required) - :param str path: Path is the URL path to use for the current proxy request to node. + :param name: name of the NodeProxyOptions (required) + :type name: str + :param path: Path is the URL path to use for the current proxy request to node. + :type path: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: str + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: str """ kwargs['_return_http_data_only'] = True return self.connect_put_node_proxy_with_http_info(name, **kwargs) # noqa: E501 @@ -6118,24 +7410,36 @@ def connect_put_node_proxy_with_http_info(self, name, **kwargs): # noqa: E501 connect PUT requests to proxy of Node # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_put_node_proxy_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the NodeProxyOptions (required) - :param str path: Path is the URL path to use for the current proxy request to node. + :param name: name of the NodeProxyOptions (required) + :type name: str + :param path: Path is the URL path to use for the current proxy request to node. + :type path: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -6149,7 +7453,10 @@ def connect_put_node_proxy_with_http_info(self, name, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -6162,8 +7469,7 @@ def connect_put_node_proxy_with_http_info(self, name, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `connect_put_node_proxy`") # noqa: E501 collection_formats = {} @@ -6173,10 +7479,10 @@ def connect_put_node_proxy_with_http_info(self, name, **kwargs): # noqa: E501 path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'path' in local_var_params and local_var_params['path'] is not None: # noqa: E501 + if local_var_params.get('path') is not None: # noqa: E501 query_params.append(('path', local_var_params['path'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -6189,6 +7495,11 @@ def connect_put_node_proxy_with_http_info(self, name, **kwargs): # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "str", + 401: None, + } + return self.api_client.call_api( '/api/v1/nodes/{name}/proxy', 'PUT', path_params, @@ -6197,13 +7508,14 @@ def connect_put_node_proxy_with_http_info(self, name, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='str', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def connect_put_node_proxy_with_path(self, name, path, **kwargs): # noqa: E501 """connect_put_node_proxy_with_path # noqa: E501 @@ -6211,23 +7523,30 @@ def connect_put_node_proxy_with_path(self, name, path, **kwargs): # noqa: E501 connect PUT requests to proxy of Node # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_put_node_proxy_with_path(name, path, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the NodeProxyOptions (required) - :param str path: path to the resource (required) - :param str path2: Path is the URL path to use for the current proxy request to node. + :param name: name of the NodeProxyOptions (required) + :type name: str + :param path: path to the resource (required) + :type path: str + :param path2: Path is the URL path to use for the current proxy request to node. + :type path2: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: str + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: str """ kwargs['_return_http_data_only'] = True return self.connect_put_node_proxy_with_path_with_http_info(name, path, **kwargs) # noqa: E501 @@ -6238,25 +7557,38 @@ def connect_put_node_proxy_with_path_with_http_info(self, name, path, **kwargs): connect PUT requests to proxy of Node # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_put_node_proxy_with_path_with_http_info(name, path, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the NodeProxyOptions (required) - :param str path: path to the resource (required) - :param str path2: Path is the URL path to use for the current proxy request to node. + :param name: name of the NodeProxyOptions (required) + :type name: str + :param path: path to the resource (required) + :type path: str + :param path2: Path is the URL path to use for the current proxy request to node. + :type path2: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -6271,7 +7603,10 @@ def connect_put_node_proxy_with_path_with_http_info(self, name, path, **kwargs): 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -6284,12 +7619,10 @@ def connect_put_node_proxy_with_path_with_http_info(self, name, path, **kwargs): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `connect_put_node_proxy_with_path`") # noqa: E501 # verify the required parameter 'path' is set - if self.api_client.client_side_validation and ('path' not in local_var_params or # noqa: E501 - local_var_params['path'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('path') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `path` when calling `connect_put_node_proxy_with_path`") # noqa: E501 collection_formats = {} @@ -6301,10 +7634,10 @@ def connect_put_node_proxy_with_path_with_http_info(self, name, path, **kwargs): path_params['path'] = local_var_params['path'] # noqa: E501 query_params = [] - if 'path2' in local_var_params and local_var_params['path2'] is not None: # noqa: E501 + if local_var_params.get('path2') is not None: # noqa: E501 query_params.append(('path', local_var_params['path2'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -6317,6 +7650,11 @@ def connect_put_node_proxy_with_path_with_http_info(self, name, path, **kwargs): # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "str", + 401: None, + } + return self.api_client.call_api( '/api/v1/nodes/{name}/proxy/{path}', 'PUT', path_params, @@ -6325,13 +7663,14 @@ def connect_put_node_proxy_with_path_with_http_info(self, name, path, **kwargs): body=body_params, post_params=form_params, files=local_var_files, - response_type='str', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def create_namespace(self, body, **kwargs): # noqa: E501 """create_namespace # noqa: E501 @@ -6339,25 +7678,34 @@ def create_namespace(self, body, **kwargs): # noqa: E501 create a Namespace # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_namespace(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param V1Namespace body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param body: (required) + :type body: V1Namespace + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Namespace + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Namespace """ kwargs['_return_http_data_only'] = True return self.create_namespace_with_http_info(body, **kwargs) # noqa: E501 @@ -6368,27 +7716,42 @@ def create_namespace_with_http_info(self, body, **kwargs): # noqa: E501 create a Namespace # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_namespace_with_http_info(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param V1Namespace body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param body: (required) + :type body: V1Namespace + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Namespace, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Namespace, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -6405,7 +7768,10 @@ def create_namespace_with_http_info(self, body, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -6418,8 +7784,7 @@ def create_namespace_with_http_info(self, body, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_namespace`") # noqa: E501 collection_formats = {} @@ -6427,16 +7792,16 @@ def create_namespace_with_http_info(self, body, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -6446,11 +7811,18 @@ def create_namespace_with_http_info(self, body, **kwargs): # noqa: E501 body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Namespace", + 201: "V1Namespace", + 202: "V1Namespace", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces', 'POST', path_params, @@ -6459,13 +7831,14 @@ def create_namespace_with_http_info(self, body, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Namespace', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def create_namespaced_binding(self, namespace, body, **kwargs): # noqa: E501 """create_namespaced_binding # noqa: E501 @@ -6473,26 +7846,36 @@ def create_namespaced_binding(self, namespace, body, **kwargs): # noqa: E501 create a Binding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_namespaced_binding(namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1Binding body: (required) - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1Binding + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Binding + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Binding """ kwargs['_return_http_data_only'] = True return self.create_namespaced_binding_with_http_info(namespace, body, **kwargs) # noqa: E501 @@ -6503,28 +7886,44 @@ def create_namespaced_binding_with_http_info(self, namespace, body, **kwargs): create a Binding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_namespaced_binding_with_http_info(namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1Binding body: (required) - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1Binding + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Binding, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Binding, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -6542,7 +7941,10 @@ def create_namespaced_binding_with_http_info(self, namespace, body, **kwargs): 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -6555,12 +7957,10 @@ def create_namespaced_binding_with_http_info(self, namespace, body, **kwargs): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_binding`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_binding`") # noqa: E501 collection_formats = {} @@ -6570,16 +7970,16 @@ def create_namespaced_binding_with_http_info(self, namespace, body, **kwargs): path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -6589,11 +7989,18 @@ def create_namespaced_binding_with_http_info(self, namespace, body, **kwargs): body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Binding", + 201: "V1Binding", + 202: "V1Binding", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/bindings', 'POST', path_params, @@ -6602,13 +8009,14 @@ def create_namespaced_binding_with_http_info(self, namespace, body, **kwargs): body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Binding', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def create_namespaced_config_map(self, namespace, body, **kwargs): # noqa: E501 """create_namespaced_config_map # noqa: E501 @@ -6616,26 +8024,36 @@ def create_namespaced_config_map(self, namespace, body, **kwargs): # noqa: E501 create a ConfigMap # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_namespaced_config_map(namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1ConfigMap body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1ConfigMap + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ConfigMap + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ConfigMap """ kwargs['_return_http_data_only'] = True return self.create_namespaced_config_map_with_http_info(namespace, body, **kwargs) # noqa: E501 @@ -6646,28 +8064,44 @@ def create_namespaced_config_map_with_http_info(self, namespace, body, **kwargs) create a ConfigMap # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_namespaced_config_map_with_http_info(namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1ConfigMap body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1ConfigMap + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ConfigMap, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ConfigMap, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -6685,7 +8119,10 @@ def create_namespaced_config_map_with_http_info(self, namespace, body, **kwargs) 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -6698,12 +8135,10 @@ def create_namespaced_config_map_with_http_info(self, namespace, body, **kwargs) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_config_map`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_config_map`") # noqa: E501 collection_formats = {} @@ -6713,16 +8148,16 @@ def create_namespaced_config_map_with_http_info(self, namespace, body, **kwargs) path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -6732,11 +8167,18 @@ def create_namespaced_config_map_with_http_info(self, namespace, body, **kwargs) body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ConfigMap", + 201: "V1ConfigMap", + 202: "V1ConfigMap", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/configmaps', 'POST', path_params, @@ -6745,13 +8187,14 @@ def create_namespaced_config_map_with_http_info(self, namespace, body, **kwargs) body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ConfigMap', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def create_namespaced_endpoints(self, namespace, body, **kwargs): # noqa: E501 """create_namespaced_endpoints # noqa: E501 @@ -6759,26 +8202,36 @@ def create_namespaced_endpoints(self, namespace, body, **kwargs): # noqa: E501 create Endpoints # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_namespaced_endpoints(namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1Endpoints body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1Endpoints + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Endpoints + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Endpoints """ kwargs['_return_http_data_only'] = True return self.create_namespaced_endpoints_with_http_info(namespace, body, **kwargs) # noqa: E501 @@ -6789,28 +8242,44 @@ def create_namespaced_endpoints_with_http_info(self, namespace, body, **kwargs): create Endpoints # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_namespaced_endpoints_with_http_info(namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1Endpoints body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1Endpoints + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Endpoints, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Endpoints, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -6828,7 +8297,10 @@ def create_namespaced_endpoints_with_http_info(self, namespace, body, **kwargs): 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -6841,12 +8313,10 @@ def create_namespaced_endpoints_with_http_info(self, namespace, body, **kwargs): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_endpoints`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_endpoints`") # noqa: E501 collection_formats = {} @@ -6856,16 +8326,16 @@ def create_namespaced_endpoints_with_http_info(self, namespace, body, **kwargs): path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -6875,11 +8345,18 @@ def create_namespaced_endpoints_with_http_info(self, namespace, body, **kwargs): body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Endpoints", + 201: "V1Endpoints", + 202: "V1Endpoints", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/endpoints', 'POST', path_params, @@ -6888,13 +8365,14 @@ def create_namespaced_endpoints_with_http_info(self, namespace, body, **kwargs): body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Endpoints', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def create_namespaced_event(self, namespace, body, **kwargs): # noqa: E501 """create_namespaced_event # noqa: E501 @@ -6902,26 +8380,36 @@ def create_namespaced_event(self, namespace, body, **kwargs): # noqa: E501 create an Event # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_namespaced_event(namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param CoreV1Event body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: CoreV1Event + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: CoreV1Event + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: CoreV1Event """ kwargs['_return_http_data_only'] = True return self.create_namespaced_event_with_http_info(namespace, body, **kwargs) # noqa: E501 @@ -6932,28 +8420,44 @@ def create_namespaced_event_with_http_info(self, namespace, body, **kwargs): # create an Event # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_namespaced_event_with_http_info(namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param CoreV1Event body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: CoreV1Event + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(CoreV1Event, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(CoreV1Event, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -6971,7 +8475,10 @@ def create_namespaced_event_with_http_info(self, namespace, body, **kwargs): # 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -6984,12 +8491,10 @@ def create_namespaced_event_with_http_info(self, namespace, body, **kwargs): # local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_event`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_event`") # noqa: E501 collection_formats = {} @@ -6999,16 +8504,16 @@ def create_namespaced_event_with_http_info(self, namespace, body, **kwargs): # path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -7018,11 +8523,18 @@ def create_namespaced_event_with_http_info(self, namespace, body, **kwargs): # body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "CoreV1Event", + 201: "CoreV1Event", + 202: "CoreV1Event", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/events', 'POST', path_params, @@ -7031,13 +8543,14 @@ def create_namespaced_event_with_http_info(self, namespace, body, **kwargs): # body=body_params, post_params=form_params, files=local_var_files, - response_type='CoreV1Event', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def create_namespaced_limit_range(self, namespace, body, **kwargs): # noqa: E501 """create_namespaced_limit_range # noqa: E501 @@ -7045,26 +8558,36 @@ def create_namespaced_limit_range(self, namespace, body, **kwargs): # noqa: E50 create a LimitRange # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_namespaced_limit_range(namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1LimitRange body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1LimitRange + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1LimitRange + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1LimitRange """ kwargs['_return_http_data_only'] = True return self.create_namespaced_limit_range_with_http_info(namespace, body, **kwargs) # noqa: E501 @@ -7075,28 +8598,44 @@ def create_namespaced_limit_range_with_http_info(self, namespace, body, **kwargs create a LimitRange # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_namespaced_limit_range_with_http_info(namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1LimitRange body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1LimitRange + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1LimitRange, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1LimitRange, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -7114,7 +8653,10 @@ def create_namespaced_limit_range_with_http_info(self, namespace, body, **kwargs 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -7127,12 +8669,10 @@ def create_namespaced_limit_range_with_http_info(self, namespace, body, **kwargs local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_limit_range`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_limit_range`") # noqa: E501 collection_formats = {} @@ -7142,16 +8682,16 @@ def create_namespaced_limit_range_with_http_info(self, namespace, body, **kwargs path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -7161,11 +8701,18 @@ def create_namespaced_limit_range_with_http_info(self, namespace, body, **kwargs body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1LimitRange", + 201: "V1LimitRange", + 202: "V1LimitRange", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/limitranges', 'POST', path_params, @@ -7174,13 +8721,14 @@ def create_namespaced_limit_range_with_http_info(self, namespace, body, **kwargs body=body_params, post_params=form_params, files=local_var_files, - response_type='V1LimitRange', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def create_namespaced_persistent_volume_claim(self, namespace, body, **kwargs): # noqa: E501 """create_namespaced_persistent_volume_claim # noqa: E501 @@ -7188,26 +8736,36 @@ def create_namespaced_persistent_volume_claim(self, namespace, body, **kwargs): create a PersistentVolumeClaim # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_namespaced_persistent_volume_claim(namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1PersistentVolumeClaim body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1PersistentVolumeClaim + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1PersistentVolumeClaim + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1PersistentVolumeClaim """ kwargs['_return_http_data_only'] = True return self.create_namespaced_persistent_volume_claim_with_http_info(namespace, body, **kwargs) # noqa: E501 @@ -7218,28 +8776,44 @@ def create_namespaced_persistent_volume_claim_with_http_info(self, namespace, bo create a PersistentVolumeClaim # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_namespaced_persistent_volume_claim_with_http_info(namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1PersistentVolumeClaim body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1PersistentVolumeClaim + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1PersistentVolumeClaim, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1PersistentVolumeClaim, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -7257,7 +8831,10 @@ def create_namespaced_persistent_volume_claim_with_http_info(self, namespace, bo 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -7270,12 +8847,10 @@ def create_namespaced_persistent_volume_claim_with_http_info(self, namespace, bo local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_persistent_volume_claim`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_persistent_volume_claim`") # noqa: E501 collection_formats = {} @@ -7285,16 +8860,16 @@ def create_namespaced_persistent_volume_claim_with_http_info(self, namespace, bo path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -7304,11 +8879,18 @@ def create_namespaced_persistent_volume_claim_with_http_info(self, namespace, bo body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1PersistentVolumeClaim", + 201: "V1PersistentVolumeClaim", + 202: "V1PersistentVolumeClaim", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/persistentvolumeclaims', 'POST', path_params, @@ -7317,13 +8899,14 @@ def create_namespaced_persistent_volume_claim_with_http_info(self, namespace, bo body=body_params, post_params=form_params, files=local_var_files, - response_type='V1PersistentVolumeClaim', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def create_namespaced_pod(self, namespace, body, **kwargs): # noqa: E501 """create_namespaced_pod # noqa: E501 @@ -7331,26 +8914,36 @@ def create_namespaced_pod(self, namespace, body, **kwargs): # noqa: E501 create a Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_namespaced_pod(namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1Pod body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1Pod + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Pod + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Pod """ kwargs['_return_http_data_only'] = True return self.create_namespaced_pod_with_http_info(namespace, body, **kwargs) # noqa: E501 @@ -7361,28 +8954,44 @@ def create_namespaced_pod_with_http_info(self, namespace, body, **kwargs): # no create a Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_namespaced_pod_with_http_info(namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1Pod body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1Pod + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Pod, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Pod, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -7400,7 +9009,10 @@ def create_namespaced_pod_with_http_info(self, namespace, body, **kwargs): # no 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -7413,12 +9025,10 @@ def create_namespaced_pod_with_http_info(self, namespace, body, **kwargs): # no local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_pod`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_pod`") # noqa: E501 collection_formats = {} @@ -7428,16 +9038,16 @@ def create_namespaced_pod_with_http_info(self, namespace, body, **kwargs): # no path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -7447,11 +9057,18 @@ def create_namespaced_pod_with_http_info(self, namespace, body, **kwargs): # no body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Pod", + 201: "V1Pod", + 202: "V1Pod", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/pods', 'POST', path_params, @@ -7460,13 +9077,14 @@ def create_namespaced_pod_with_http_info(self, namespace, body, **kwargs): # no body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Pod', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def create_namespaced_pod_binding(self, name, namespace, body, **kwargs): # noqa: E501 """create_namespaced_pod_binding # noqa: E501 @@ -7474,27 +9092,38 @@ def create_namespaced_pod_binding(self, name, namespace, body, **kwargs): # noq create binding of a Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_namespaced_pod_binding(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Binding (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1Binding body: (required) - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the Binding (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1Binding + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Binding + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Binding """ kwargs['_return_http_data_only'] = True return self.create_namespaced_pod_binding_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -7505,29 +9134,46 @@ def create_namespaced_pod_binding_with_http_info(self, name, namespace, body, ** create binding of a Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_namespaced_pod_binding_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Binding (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1Binding body: (required) - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the Binding (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1Binding + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Binding, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Binding, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -7546,7 +9192,10 @@ def create_namespaced_pod_binding_with_http_info(self, name, namespace, body, ** 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -7559,16 +9208,13 @@ def create_namespaced_pod_binding_with_http_info(self, name, namespace, body, ** local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `create_namespaced_pod_binding`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_pod_binding`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_pod_binding`") # noqa: E501 collection_formats = {} @@ -7580,16 +9226,16 @@ def create_namespaced_pod_binding_with_http_info(self, name, namespace, body, ** path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -7599,11 +9245,18 @@ def create_namespaced_pod_binding_with_http_info(self, name, namespace, body, ** body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Binding", + 201: "V1Binding", + 202: "V1Binding", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/pods/{name}/binding', 'POST', path_params, @@ -7612,13 +9265,14 @@ def create_namespaced_pod_binding_with_http_info(self, name, namespace, body, ** body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Binding', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def create_namespaced_pod_eviction(self, name, namespace, body, **kwargs): # noqa: E501 """create_namespaced_pod_eviction # noqa: E501 @@ -7626,27 +9280,38 @@ def create_namespaced_pod_eviction(self, name, namespace, body, **kwargs): # no create eviction of a Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_namespaced_pod_eviction(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Eviction (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1Eviction body: (required) - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the Eviction (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1Eviction + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Eviction + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Eviction """ kwargs['_return_http_data_only'] = True return self.create_namespaced_pod_eviction_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -7657,29 +9322,46 @@ def create_namespaced_pod_eviction_with_http_info(self, name, namespace, body, * create eviction of a Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_namespaced_pod_eviction_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Eviction (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1Eviction body: (required) - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the Eviction (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1Eviction + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Eviction, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Eviction, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -7698,7 +9380,10 @@ def create_namespaced_pod_eviction_with_http_info(self, name, namespace, body, * 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -7711,16 +9396,13 @@ def create_namespaced_pod_eviction_with_http_info(self, name, namespace, body, * local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `create_namespaced_pod_eviction`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_pod_eviction`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_pod_eviction`") # noqa: E501 collection_formats = {} @@ -7732,16 +9414,16 @@ def create_namespaced_pod_eviction_with_http_info(self, name, namespace, body, * path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -7751,11 +9433,18 @@ def create_namespaced_pod_eviction_with_http_info(self, name, namespace, body, * body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Eviction", + 201: "V1Eviction", + 202: "V1Eviction", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/pods/{name}/eviction', 'POST', path_params, @@ -7764,13 +9453,14 @@ def create_namespaced_pod_eviction_with_http_info(self, name, namespace, body, * body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Eviction', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def create_namespaced_pod_template(self, namespace, body, **kwargs): # noqa: E501 """create_namespaced_pod_template # noqa: E501 @@ -7778,26 +9468,36 @@ def create_namespaced_pod_template(self, namespace, body, **kwargs): # noqa: E5 create a PodTemplate # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_namespaced_pod_template(namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1PodTemplate body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1PodTemplate + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1PodTemplate + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1PodTemplate """ kwargs['_return_http_data_only'] = True return self.create_namespaced_pod_template_with_http_info(namespace, body, **kwargs) # noqa: E501 @@ -7808,28 +9508,44 @@ def create_namespaced_pod_template_with_http_info(self, namespace, body, **kwarg create a PodTemplate # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_namespaced_pod_template_with_http_info(namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1PodTemplate body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1PodTemplate + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1PodTemplate, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1PodTemplate, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -7847,7 +9563,10 @@ def create_namespaced_pod_template_with_http_info(self, namespace, body, **kwarg 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -7860,12 +9579,10 @@ def create_namespaced_pod_template_with_http_info(self, namespace, body, **kwarg local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_pod_template`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_pod_template`") # noqa: E501 collection_formats = {} @@ -7875,16 +9592,16 @@ def create_namespaced_pod_template_with_http_info(self, namespace, body, **kwarg path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -7894,11 +9611,18 @@ def create_namespaced_pod_template_with_http_info(self, namespace, body, **kwarg body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1PodTemplate", + 201: "V1PodTemplate", + 202: "V1PodTemplate", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/podtemplates', 'POST', path_params, @@ -7907,13 +9631,14 @@ def create_namespaced_pod_template_with_http_info(self, namespace, body, **kwarg body=body_params, post_params=form_params, files=local_var_files, - response_type='V1PodTemplate', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def create_namespaced_replication_controller(self, namespace, body, **kwargs): # noqa: E501 """create_namespaced_replication_controller # noqa: E501 @@ -7921,26 +9646,36 @@ def create_namespaced_replication_controller(self, namespace, body, **kwargs): create a ReplicationController # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_namespaced_replication_controller(namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1ReplicationController body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1ReplicationController + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ReplicationController + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ReplicationController """ kwargs['_return_http_data_only'] = True return self.create_namespaced_replication_controller_with_http_info(namespace, body, **kwargs) # noqa: E501 @@ -7951,28 +9686,44 @@ def create_namespaced_replication_controller_with_http_info(self, namespace, bod create a ReplicationController # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_namespaced_replication_controller_with_http_info(namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1ReplicationController body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1ReplicationController + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ReplicationController, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ReplicationController, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -7990,7 +9741,10 @@ def create_namespaced_replication_controller_with_http_info(self, namespace, bod 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -8003,12 +9757,10 @@ def create_namespaced_replication_controller_with_http_info(self, namespace, bod local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_replication_controller`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_replication_controller`") # noqa: E501 collection_formats = {} @@ -8018,16 +9770,16 @@ def create_namespaced_replication_controller_with_http_info(self, namespace, bod path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -8037,11 +9789,18 @@ def create_namespaced_replication_controller_with_http_info(self, namespace, bod body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ReplicationController", + 201: "V1ReplicationController", + 202: "V1ReplicationController", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/replicationcontrollers', 'POST', path_params, @@ -8050,13 +9809,14 @@ def create_namespaced_replication_controller_with_http_info(self, namespace, bod body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ReplicationController', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def create_namespaced_resource_quota(self, namespace, body, **kwargs): # noqa: E501 """create_namespaced_resource_quota # noqa: E501 @@ -8064,26 +9824,36 @@ def create_namespaced_resource_quota(self, namespace, body, **kwargs): # noqa: create a ResourceQuota # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_namespaced_resource_quota(namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1ResourceQuota body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1ResourceQuota + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ResourceQuota + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ResourceQuota """ kwargs['_return_http_data_only'] = True return self.create_namespaced_resource_quota_with_http_info(namespace, body, **kwargs) # noqa: E501 @@ -8094,28 +9864,44 @@ def create_namespaced_resource_quota_with_http_info(self, namespace, body, **kwa create a ResourceQuota # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_namespaced_resource_quota_with_http_info(namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1ResourceQuota body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1ResourceQuota + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ResourceQuota, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ResourceQuota, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -8133,7 +9919,10 @@ def create_namespaced_resource_quota_with_http_info(self, namespace, body, **kwa 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -8146,12 +9935,10 @@ def create_namespaced_resource_quota_with_http_info(self, namespace, body, **kwa local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_resource_quota`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_resource_quota`") # noqa: E501 collection_formats = {} @@ -8161,16 +9948,16 @@ def create_namespaced_resource_quota_with_http_info(self, namespace, body, **kwa path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -8180,11 +9967,18 @@ def create_namespaced_resource_quota_with_http_info(self, namespace, body, **kwa body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ResourceQuota", + 201: "V1ResourceQuota", + 202: "V1ResourceQuota", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/resourcequotas', 'POST', path_params, @@ -8193,13 +9987,14 @@ def create_namespaced_resource_quota_with_http_info(self, namespace, body, **kwa body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ResourceQuota', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def create_namespaced_secret(self, namespace, body, **kwargs): # noqa: E501 """create_namespaced_secret # noqa: E501 @@ -8207,26 +10002,36 @@ def create_namespaced_secret(self, namespace, body, **kwargs): # noqa: E501 create a Secret # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_namespaced_secret(namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1Secret body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1Secret + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Secret + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Secret """ kwargs['_return_http_data_only'] = True return self.create_namespaced_secret_with_http_info(namespace, body, **kwargs) # noqa: E501 @@ -8237,28 +10042,44 @@ def create_namespaced_secret_with_http_info(self, namespace, body, **kwargs): # create a Secret # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_namespaced_secret_with_http_info(namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1Secret body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1Secret + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Secret, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Secret, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -8276,7 +10097,10 @@ def create_namespaced_secret_with_http_info(self, namespace, body, **kwargs): # 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -8289,12 +10113,10 @@ def create_namespaced_secret_with_http_info(self, namespace, body, **kwargs): # local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_secret`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_secret`") # noqa: E501 collection_formats = {} @@ -8304,16 +10126,16 @@ def create_namespaced_secret_with_http_info(self, namespace, body, **kwargs): # path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -8323,11 +10145,18 @@ def create_namespaced_secret_with_http_info(self, namespace, body, **kwargs): # body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Secret", + 201: "V1Secret", + 202: "V1Secret", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/secrets', 'POST', path_params, @@ -8336,13 +10165,14 @@ def create_namespaced_secret_with_http_info(self, namespace, body, **kwargs): # body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Secret', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def create_namespaced_service(self, namespace, body, **kwargs): # noqa: E501 """create_namespaced_service # noqa: E501 @@ -8350,26 +10180,36 @@ def create_namespaced_service(self, namespace, body, **kwargs): # noqa: E501 create a Service # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_namespaced_service(namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1Service body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1Service + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Service + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Service """ kwargs['_return_http_data_only'] = True return self.create_namespaced_service_with_http_info(namespace, body, **kwargs) # noqa: E501 @@ -8380,28 +10220,44 @@ def create_namespaced_service_with_http_info(self, namespace, body, **kwargs): create a Service # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_namespaced_service_with_http_info(namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1Service body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1Service + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Service, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Service, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -8419,7 +10275,10 @@ def create_namespaced_service_with_http_info(self, namespace, body, **kwargs): 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -8432,12 +10291,10 @@ def create_namespaced_service_with_http_info(self, namespace, body, **kwargs): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_service`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_service`") # noqa: E501 collection_formats = {} @@ -8447,16 +10304,16 @@ def create_namespaced_service_with_http_info(self, namespace, body, **kwargs): path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -8466,11 +10323,18 @@ def create_namespaced_service_with_http_info(self, namespace, body, **kwargs): body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Service", + 201: "V1Service", + 202: "V1Service", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/services', 'POST', path_params, @@ -8479,13 +10343,14 @@ def create_namespaced_service_with_http_info(self, namespace, body, **kwargs): body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Service', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def create_namespaced_service_account(self, namespace, body, **kwargs): # noqa: E501 """create_namespaced_service_account # noqa: E501 @@ -8493,26 +10358,36 @@ def create_namespaced_service_account(self, namespace, body, **kwargs): # noqa: create a ServiceAccount # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_namespaced_service_account(namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1ServiceAccount body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1ServiceAccount + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ServiceAccount + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ServiceAccount """ kwargs['_return_http_data_only'] = True return self.create_namespaced_service_account_with_http_info(namespace, body, **kwargs) # noqa: E501 @@ -8523,28 +10398,44 @@ def create_namespaced_service_account_with_http_info(self, namespace, body, **kw create a ServiceAccount # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_namespaced_service_account_with_http_info(namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1ServiceAccount body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1ServiceAccount + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ServiceAccount, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ServiceAccount, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -8562,7 +10453,10 @@ def create_namespaced_service_account_with_http_info(self, namespace, body, **kw 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -8575,12 +10469,10 @@ def create_namespaced_service_account_with_http_info(self, namespace, body, **kw local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_service_account`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_service_account`") # noqa: E501 collection_formats = {} @@ -8590,16 +10482,16 @@ def create_namespaced_service_account_with_http_info(self, namespace, body, **kw path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -8609,11 +10501,18 @@ def create_namespaced_service_account_with_http_info(self, namespace, body, **kw body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ServiceAccount", + 201: "V1ServiceAccount", + 202: "V1ServiceAccount", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/serviceaccounts', 'POST', path_params, @@ -8622,13 +10521,14 @@ def create_namespaced_service_account_with_http_info(self, namespace, body, **kw body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ServiceAccount', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def create_namespaced_service_account_token(self, name, namespace, body, **kwargs): # noqa: E501 """create_namespaced_service_account_token # noqa: E501 @@ -8636,27 +10536,38 @@ def create_namespaced_service_account_token(self, name, namespace, body, **kwarg create token of a ServiceAccount # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_namespaced_service_account_token(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the TokenRequest (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param AuthenticationV1TokenRequest body: (required) - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the TokenRequest (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: AuthenticationV1TokenRequest + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: AuthenticationV1TokenRequest + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: AuthenticationV1TokenRequest """ kwargs['_return_http_data_only'] = True return self.create_namespaced_service_account_token_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -8667,29 +10578,46 @@ def create_namespaced_service_account_token_with_http_info(self, name, namespace create token of a ServiceAccount # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_namespaced_service_account_token_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the TokenRequest (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param AuthenticationV1TokenRequest body: (required) - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the TokenRequest (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: AuthenticationV1TokenRequest + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(AuthenticationV1TokenRequest, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(AuthenticationV1TokenRequest, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -8708,7 +10636,10 @@ def create_namespaced_service_account_token_with_http_info(self, name, namespace 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -8721,16 +10652,13 @@ def create_namespaced_service_account_token_with_http_info(self, name, namespace local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `create_namespaced_service_account_token`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_service_account_token`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_service_account_token`") # noqa: E501 collection_formats = {} @@ -8742,16 +10670,16 @@ def create_namespaced_service_account_token_with_http_info(self, name, namespace path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -8761,11 +10689,18 @@ def create_namespaced_service_account_token_with_http_info(self, name, namespace body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "AuthenticationV1TokenRequest", + 201: "AuthenticationV1TokenRequest", + 202: "AuthenticationV1TokenRequest", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/serviceaccounts/{name}/token', 'POST', path_params, @@ -8774,13 +10709,14 @@ def create_namespaced_service_account_token_with_http_info(self, name, namespace body=body_params, post_params=form_params, files=local_var_files, - response_type='AuthenticationV1TokenRequest', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def create_node(self, body, **kwargs): # noqa: E501 """create_node # noqa: E501 @@ -8788,25 +10724,34 @@ def create_node(self, body, **kwargs): # noqa: E501 create a Node # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_node(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param V1Node body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param body: (required) + :type body: V1Node + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Node + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Node """ kwargs['_return_http_data_only'] = True return self.create_node_with_http_info(body, **kwargs) # noqa: E501 @@ -8817,27 +10762,42 @@ def create_node_with_http_info(self, body, **kwargs): # noqa: E501 create a Node # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_node_with_http_info(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param V1Node body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param body: (required) + :type body: V1Node + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Node, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Node, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -8854,7 +10814,10 @@ def create_node_with_http_info(self, body, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -8867,8 +10830,7 @@ def create_node_with_http_info(self, body, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_node`") # noqa: E501 collection_formats = {} @@ -8876,16 +10838,16 @@ def create_node_with_http_info(self, body, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -8895,11 +10857,18 @@ def create_node_with_http_info(self, body, **kwargs): # noqa: E501 body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Node", + 201: "V1Node", + 202: "V1Node", + 401: None, + } + return self.api_client.call_api( '/api/v1/nodes', 'POST', path_params, @@ -8908,13 +10877,14 @@ def create_node_with_http_info(self, body, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Node', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def create_persistent_volume(self, body, **kwargs): # noqa: E501 """create_persistent_volume # noqa: E501 @@ -8922,25 +10892,34 @@ def create_persistent_volume(self, body, **kwargs): # noqa: E501 create a PersistentVolume # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_persistent_volume(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param V1PersistentVolume body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param body: (required) + :type body: V1PersistentVolume + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1PersistentVolume + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1PersistentVolume """ kwargs['_return_http_data_only'] = True return self.create_persistent_volume_with_http_info(body, **kwargs) # noqa: E501 @@ -8951,27 +10930,42 @@ def create_persistent_volume_with_http_info(self, body, **kwargs): # noqa: E501 create a PersistentVolume # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_persistent_volume_with_http_info(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param V1PersistentVolume body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param body: (required) + :type body: V1PersistentVolume + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1PersistentVolume, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1PersistentVolume, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -8988,7 +10982,10 @@ def create_persistent_volume_with_http_info(self, body, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -9001,8 +10998,7 @@ def create_persistent_volume_with_http_info(self, body, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_persistent_volume`") # noqa: E501 collection_formats = {} @@ -9010,16 +11006,16 @@ def create_persistent_volume_with_http_info(self, body, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -9029,11 +11025,18 @@ def create_persistent_volume_with_http_info(self, body, **kwargs): # noqa: E501 body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1PersistentVolume", + 201: "V1PersistentVolume", + 202: "V1PersistentVolume", + 401: None, + } + return self.api_client.call_api( '/api/v1/persistentvolumes', 'POST', path_params, @@ -9042,13 +11045,14 @@ def create_persistent_volume_with_http_info(self, body, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1PersistentVolume', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_collection_namespaced_config_map(self, namespace, **kwargs): # noqa: E501 """delete_collection_namespaced_config_map # noqa: E501 @@ -9056,35 +11060,56 @@ def delete_collection_namespaced_config_map(self, namespace, **kwargs): # noqa: delete collection of ConfigMap # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_namespaced_config_map(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_collection_namespaced_config_map_with_http_info(namespace, **kwargs) # noqa: E501 @@ -9095,37 +11120,64 @@ def delete_collection_namespaced_config_map_with_http_info(self, namespace, **kw delete collection of ConfigMap # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_namespaced_config_map_with_http_info(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -9137,6 +11189,7 @@ def delete_collection_namespaced_config_map_with_http_info(self, namespace, **kw 'dry_run', 'field_selector', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'label_selector', 'limit', 'orphan_dependents', @@ -9152,7 +11205,10 @@ def delete_collection_namespaced_config_map_with_http_info(self, namespace, **kw 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -9165,8 +11221,7 @@ def delete_collection_namespaced_config_map_with_http_info(self, namespace, **kw local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_config_map`") # noqa: E501 collection_formats = {} @@ -9176,34 +11231,36 @@ def delete_collection_namespaced_config_map_with_http_info(self, namespace, **kw path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -9213,11 +11270,16 @@ def delete_collection_namespaced_config_map_with_http_info(self, namespace, **kw body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/configmaps', 'DELETE', path_params, @@ -9226,13 +11288,14 @@ def delete_collection_namespaced_config_map_with_http_info(self, namespace, **kw body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_collection_namespaced_endpoints(self, namespace, **kwargs): # noqa: E501 """delete_collection_namespaced_endpoints # noqa: E501 @@ -9240,35 +11303,56 @@ def delete_collection_namespaced_endpoints(self, namespace, **kwargs): # noqa: delete collection of Endpoints # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_namespaced_endpoints(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_collection_namespaced_endpoints_with_http_info(namespace, **kwargs) # noqa: E501 @@ -9279,37 +11363,64 @@ def delete_collection_namespaced_endpoints_with_http_info(self, namespace, **kwa delete collection of Endpoints # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_namespaced_endpoints_with_http_info(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -9321,6 +11432,7 @@ def delete_collection_namespaced_endpoints_with_http_info(self, namespace, **kwa 'dry_run', 'field_selector', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'label_selector', 'limit', 'orphan_dependents', @@ -9336,7 +11448,10 @@ def delete_collection_namespaced_endpoints_with_http_info(self, namespace, **kwa 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -9349,8 +11464,7 @@ def delete_collection_namespaced_endpoints_with_http_info(self, namespace, **kwa local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_endpoints`") # noqa: E501 collection_formats = {} @@ -9360,34 +11474,36 @@ def delete_collection_namespaced_endpoints_with_http_info(self, namespace, **kwa path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -9397,11 +11513,16 @@ def delete_collection_namespaced_endpoints_with_http_info(self, namespace, **kwa body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/endpoints', 'DELETE', path_params, @@ -9410,13 +11531,14 @@ def delete_collection_namespaced_endpoints_with_http_info(self, namespace, **kwa body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_collection_namespaced_event(self, namespace, **kwargs): # noqa: E501 """delete_collection_namespaced_event # noqa: E501 @@ -9424,35 +11546,56 @@ def delete_collection_namespaced_event(self, namespace, **kwargs): # noqa: E501 delete collection of Event # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_namespaced_event(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_collection_namespaced_event_with_http_info(namespace, **kwargs) # noqa: E501 @@ -9463,37 +11606,64 @@ def delete_collection_namespaced_event_with_http_info(self, namespace, **kwargs) delete collection of Event # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_namespaced_event_with_http_info(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -9505,6 +11675,7 @@ def delete_collection_namespaced_event_with_http_info(self, namespace, **kwargs) 'dry_run', 'field_selector', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'label_selector', 'limit', 'orphan_dependents', @@ -9520,7 +11691,10 @@ def delete_collection_namespaced_event_with_http_info(self, namespace, **kwargs) 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -9533,8 +11707,7 @@ def delete_collection_namespaced_event_with_http_info(self, namespace, **kwargs) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_event`") # noqa: E501 collection_formats = {} @@ -9544,34 +11717,36 @@ def delete_collection_namespaced_event_with_http_info(self, namespace, **kwargs) path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -9581,11 +11756,16 @@ def delete_collection_namespaced_event_with_http_info(self, namespace, **kwargs) body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/events', 'DELETE', path_params, @@ -9594,13 +11774,14 @@ def delete_collection_namespaced_event_with_http_info(self, namespace, **kwargs) body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_collection_namespaced_limit_range(self, namespace, **kwargs): # noqa: E501 """delete_collection_namespaced_limit_range # noqa: E501 @@ -9608,35 +11789,56 @@ def delete_collection_namespaced_limit_range(self, namespace, **kwargs): # noqa delete collection of LimitRange # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_namespaced_limit_range(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_collection_namespaced_limit_range_with_http_info(namespace, **kwargs) # noqa: E501 @@ -9647,37 +11849,64 @@ def delete_collection_namespaced_limit_range_with_http_info(self, namespace, **k delete collection of LimitRange # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_namespaced_limit_range_with_http_info(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -9689,6 +11918,7 @@ def delete_collection_namespaced_limit_range_with_http_info(self, namespace, **k 'dry_run', 'field_selector', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'label_selector', 'limit', 'orphan_dependents', @@ -9704,7 +11934,10 @@ def delete_collection_namespaced_limit_range_with_http_info(self, namespace, **k 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -9717,8 +11950,7 @@ def delete_collection_namespaced_limit_range_with_http_info(self, namespace, **k local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_limit_range`") # noqa: E501 collection_formats = {} @@ -9728,34 +11960,36 @@ def delete_collection_namespaced_limit_range_with_http_info(self, namespace, **k path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -9765,11 +11999,16 @@ def delete_collection_namespaced_limit_range_with_http_info(self, namespace, **k body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/limitranges', 'DELETE', path_params, @@ -9778,13 +12017,14 @@ def delete_collection_namespaced_limit_range_with_http_info(self, namespace, **k body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_collection_namespaced_persistent_volume_claim(self, namespace, **kwargs): # noqa: E501 """delete_collection_namespaced_persistent_volume_claim # noqa: E501 @@ -9792,35 +12032,56 @@ def delete_collection_namespaced_persistent_volume_claim(self, namespace, **kwar delete collection of PersistentVolumeClaim # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_namespaced_persistent_volume_claim(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_collection_namespaced_persistent_volume_claim_with_http_info(namespace, **kwargs) # noqa: E501 @@ -9831,37 +12092,64 @@ def delete_collection_namespaced_persistent_volume_claim_with_http_info(self, na delete collection of PersistentVolumeClaim # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_namespaced_persistent_volume_claim_with_http_info(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -9873,6 +12161,7 @@ def delete_collection_namespaced_persistent_volume_claim_with_http_info(self, na 'dry_run', 'field_selector', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'label_selector', 'limit', 'orphan_dependents', @@ -9888,7 +12177,10 @@ def delete_collection_namespaced_persistent_volume_claim_with_http_info(self, na 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -9901,8 +12193,7 @@ def delete_collection_namespaced_persistent_volume_claim_with_http_info(self, na local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_persistent_volume_claim`") # noqa: E501 collection_formats = {} @@ -9912,34 +12203,36 @@ def delete_collection_namespaced_persistent_volume_claim_with_http_info(self, na path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -9949,11 +12242,16 @@ def delete_collection_namespaced_persistent_volume_claim_with_http_info(self, na body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/persistentvolumeclaims', 'DELETE', path_params, @@ -9962,13 +12260,14 @@ def delete_collection_namespaced_persistent_volume_claim_with_http_info(self, na body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_collection_namespaced_pod(self, namespace, **kwargs): # noqa: E501 """delete_collection_namespaced_pod # noqa: E501 @@ -9976,35 +12275,56 @@ def delete_collection_namespaced_pod(self, namespace, **kwargs): # noqa: E501 delete collection of Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_namespaced_pod(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_collection_namespaced_pod_with_http_info(namespace, **kwargs) # noqa: E501 @@ -10015,37 +12335,64 @@ def delete_collection_namespaced_pod_with_http_info(self, namespace, **kwargs): delete collection of Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_namespaced_pod_with_http_info(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -10057,6 +12404,7 @@ def delete_collection_namespaced_pod_with_http_info(self, namespace, **kwargs): 'dry_run', 'field_selector', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'label_selector', 'limit', 'orphan_dependents', @@ -10072,7 +12420,10 @@ def delete_collection_namespaced_pod_with_http_info(self, namespace, **kwargs): 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -10085,8 +12436,7 @@ def delete_collection_namespaced_pod_with_http_info(self, namespace, **kwargs): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_pod`") # noqa: E501 collection_formats = {} @@ -10096,34 +12446,36 @@ def delete_collection_namespaced_pod_with_http_info(self, namespace, **kwargs): path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -10133,11 +12485,16 @@ def delete_collection_namespaced_pod_with_http_info(self, namespace, **kwargs): body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/pods', 'DELETE', path_params, @@ -10146,13 +12503,14 @@ def delete_collection_namespaced_pod_with_http_info(self, namespace, **kwargs): body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_collection_namespaced_pod_template(self, namespace, **kwargs): # noqa: E501 """delete_collection_namespaced_pod_template # noqa: E501 @@ -10160,35 +12518,56 @@ def delete_collection_namespaced_pod_template(self, namespace, **kwargs): # noq delete collection of PodTemplate # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_namespaced_pod_template(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_collection_namespaced_pod_template_with_http_info(namespace, **kwargs) # noqa: E501 @@ -10199,37 +12578,64 @@ def delete_collection_namespaced_pod_template_with_http_info(self, namespace, ** delete collection of PodTemplate # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_namespaced_pod_template_with_http_info(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -10241,6 +12647,7 @@ def delete_collection_namespaced_pod_template_with_http_info(self, namespace, ** 'dry_run', 'field_selector', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'label_selector', 'limit', 'orphan_dependents', @@ -10256,7 +12663,10 @@ def delete_collection_namespaced_pod_template_with_http_info(self, namespace, ** 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -10269,8 +12679,7 @@ def delete_collection_namespaced_pod_template_with_http_info(self, namespace, ** local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_pod_template`") # noqa: E501 collection_formats = {} @@ -10280,34 +12689,36 @@ def delete_collection_namespaced_pod_template_with_http_info(self, namespace, ** path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -10317,11 +12728,16 @@ def delete_collection_namespaced_pod_template_with_http_info(self, namespace, ** body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/podtemplates', 'DELETE', path_params, @@ -10330,13 +12746,14 @@ def delete_collection_namespaced_pod_template_with_http_info(self, namespace, ** body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_collection_namespaced_replication_controller(self, namespace, **kwargs): # noqa: E501 """delete_collection_namespaced_replication_controller # noqa: E501 @@ -10344,35 +12761,56 @@ def delete_collection_namespaced_replication_controller(self, namespace, **kwarg delete collection of ReplicationController # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_namespaced_replication_controller(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_collection_namespaced_replication_controller_with_http_info(namespace, **kwargs) # noqa: E501 @@ -10383,37 +12821,64 @@ def delete_collection_namespaced_replication_controller_with_http_info(self, nam delete collection of ReplicationController # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_namespaced_replication_controller_with_http_info(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -10425,6 +12890,7 @@ def delete_collection_namespaced_replication_controller_with_http_info(self, nam 'dry_run', 'field_selector', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'label_selector', 'limit', 'orphan_dependents', @@ -10440,7 +12906,10 @@ def delete_collection_namespaced_replication_controller_with_http_info(self, nam 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -10453,8 +12922,7 @@ def delete_collection_namespaced_replication_controller_with_http_info(self, nam local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_replication_controller`") # noqa: E501 collection_formats = {} @@ -10464,34 +12932,36 @@ def delete_collection_namespaced_replication_controller_with_http_info(self, nam path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -10501,11 +12971,16 @@ def delete_collection_namespaced_replication_controller_with_http_info(self, nam body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/replicationcontrollers', 'DELETE', path_params, @@ -10514,13 +12989,14 @@ def delete_collection_namespaced_replication_controller_with_http_info(self, nam body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_collection_namespaced_resource_quota(self, namespace, **kwargs): # noqa: E501 """delete_collection_namespaced_resource_quota # noqa: E501 @@ -10528,35 +13004,56 @@ def delete_collection_namespaced_resource_quota(self, namespace, **kwargs): # n delete collection of ResourceQuota # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_namespaced_resource_quota(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_collection_namespaced_resource_quota_with_http_info(namespace, **kwargs) # noqa: E501 @@ -10567,37 +13064,64 @@ def delete_collection_namespaced_resource_quota_with_http_info(self, namespace, delete collection of ResourceQuota # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_namespaced_resource_quota_with_http_info(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -10609,6 +13133,7 @@ def delete_collection_namespaced_resource_quota_with_http_info(self, namespace, 'dry_run', 'field_selector', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'label_selector', 'limit', 'orphan_dependents', @@ -10624,7 +13149,10 @@ def delete_collection_namespaced_resource_quota_with_http_info(self, namespace, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -10637,8 +13165,7 @@ def delete_collection_namespaced_resource_quota_with_http_info(self, namespace, local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_resource_quota`") # noqa: E501 collection_formats = {} @@ -10648,34 +13175,36 @@ def delete_collection_namespaced_resource_quota_with_http_info(self, namespace, path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -10685,11 +13214,16 @@ def delete_collection_namespaced_resource_quota_with_http_info(self, namespace, body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/resourcequotas', 'DELETE', path_params, @@ -10698,13 +13232,14 @@ def delete_collection_namespaced_resource_quota_with_http_info(self, namespace, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_collection_namespaced_secret(self, namespace, **kwargs): # noqa: E501 """delete_collection_namespaced_secret # noqa: E501 @@ -10712,35 +13247,56 @@ def delete_collection_namespaced_secret(self, namespace, **kwargs): # noqa: E50 delete collection of Secret # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_namespaced_secret(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_collection_namespaced_secret_with_http_info(namespace, **kwargs) # noqa: E501 @@ -10751,37 +13307,64 @@ def delete_collection_namespaced_secret_with_http_info(self, namespace, **kwargs delete collection of Secret # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_namespaced_secret_with_http_info(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -10793,6 +13376,7 @@ def delete_collection_namespaced_secret_with_http_info(self, namespace, **kwargs 'dry_run', 'field_selector', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'label_selector', 'limit', 'orphan_dependents', @@ -10808,7 +13392,10 @@ def delete_collection_namespaced_secret_with_http_info(self, namespace, **kwargs 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -10821,8 +13408,7 @@ def delete_collection_namespaced_secret_with_http_info(self, namespace, **kwargs local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_secret`") # noqa: E501 collection_formats = {} @@ -10832,34 +13418,36 @@ def delete_collection_namespaced_secret_with_http_info(self, namespace, **kwargs path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -10869,11 +13457,16 @@ def delete_collection_namespaced_secret_with_http_info(self, namespace, **kwargs body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/secrets', 'DELETE', path_params, @@ -10882,13 +13475,14 @@ def delete_collection_namespaced_secret_with_http_info(self, namespace, **kwargs body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_collection_namespaced_service(self, namespace, **kwargs): # noqa: E501 """delete_collection_namespaced_service # noqa: E501 @@ -10896,35 +13490,56 @@ def delete_collection_namespaced_service(self, namespace, **kwargs): # noqa: E5 delete collection of Service # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_namespaced_service(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_collection_namespaced_service_with_http_info(namespace, **kwargs) # noqa: E501 @@ -10935,37 +13550,64 @@ def delete_collection_namespaced_service_with_http_info(self, namespace, **kwarg delete collection of Service # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_namespaced_service_with_http_info(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -10977,6 +13619,7 @@ def delete_collection_namespaced_service_with_http_info(self, namespace, **kwarg 'dry_run', 'field_selector', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'label_selector', 'limit', 'orphan_dependents', @@ -10992,7 +13635,10 @@ def delete_collection_namespaced_service_with_http_info(self, namespace, **kwarg 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -11005,8 +13651,7 @@ def delete_collection_namespaced_service_with_http_info(self, namespace, **kwarg local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_service`") # noqa: E501 collection_formats = {} @@ -11016,34 +13661,36 @@ def delete_collection_namespaced_service_with_http_info(self, namespace, **kwarg path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -11053,11 +13700,16 @@ def delete_collection_namespaced_service_with_http_info(self, namespace, **kwarg body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/services', 'DELETE', path_params, @@ -11066,13 +13718,14 @@ def delete_collection_namespaced_service_with_http_info(self, namespace, **kwarg body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_collection_namespaced_service_account(self, namespace, **kwargs): # noqa: E501 """delete_collection_namespaced_service_account # noqa: E501 @@ -11080,35 +13733,56 @@ def delete_collection_namespaced_service_account(self, namespace, **kwargs): # delete collection of ServiceAccount # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_namespaced_service_account(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_collection_namespaced_service_account_with_http_info(namespace, **kwargs) # noqa: E501 @@ -11119,37 +13793,64 @@ def delete_collection_namespaced_service_account_with_http_info(self, namespace, delete collection of ServiceAccount # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_namespaced_service_account_with_http_info(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -11161,6 +13862,7 @@ def delete_collection_namespaced_service_account_with_http_info(self, namespace, 'dry_run', 'field_selector', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'label_selector', 'limit', 'orphan_dependents', @@ -11176,7 +13878,10 @@ def delete_collection_namespaced_service_account_with_http_info(self, namespace, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -11189,8 +13894,7 @@ def delete_collection_namespaced_service_account_with_http_info(self, namespace, local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_service_account`") # noqa: E501 collection_formats = {} @@ -11200,34 +13904,36 @@ def delete_collection_namespaced_service_account_with_http_info(self, namespace, path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -11237,11 +13943,16 @@ def delete_collection_namespaced_service_account_with_http_info(self, namespace, body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/serviceaccounts', 'DELETE', path_params, @@ -11250,13 +13961,14 @@ def delete_collection_namespaced_service_account_with_http_info(self, namespace, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_collection_node(self, **kwargs): # noqa: E501 """delete_collection_node # noqa: E501 @@ -11264,34 +13976,54 @@ def delete_collection_node(self, **kwargs): # noqa: E501 delete collection of Node # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_node(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_collection_node_with_http_info(**kwargs) # noqa: E501 @@ -11302,36 +14034,62 @@ def delete_collection_node_with_http_info(self, **kwargs): # noqa: E501 delete collection of Node # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_node_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -11342,6 +14100,7 @@ def delete_collection_node_with_http_info(self, **kwargs): # noqa: E501 'dry_run', 'field_selector', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'label_selector', 'limit', 'orphan_dependents', @@ -11357,7 +14116,10 @@ def delete_collection_node_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -11375,34 +14137,36 @@ def delete_collection_node_with_http_info(self, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -11412,11 +14176,16 @@ def delete_collection_node_with_http_info(self, **kwargs): # noqa: E501 body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 401: None, + } + return self.api_client.call_api( '/api/v1/nodes', 'DELETE', path_params, @@ -11425,13 +14194,14 @@ def delete_collection_node_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_collection_persistent_volume(self, **kwargs): # noqa: E501 """delete_collection_persistent_volume # noqa: E501 @@ -11439,34 +14209,54 @@ def delete_collection_persistent_volume(self, **kwargs): # noqa: E501 delete collection of PersistentVolume # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_persistent_volume(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_collection_persistent_volume_with_http_info(**kwargs) # noqa: E501 @@ -11477,36 +14267,62 @@ def delete_collection_persistent_volume_with_http_info(self, **kwargs): # noqa: delete collection of PersistentVolume # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_persistent_volume_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -11517,6 +14333,7 @@ def delete_collection_persistent_volume_with_http_info(self, **kwargs): # noqa: 'dry_run', 'field_selector', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'label_selector', 'limit', 'orphan_dependents', @@ -11532,7 +14349,10 @@ def delete_collection_persistent_volume_with_http_info(self, **kwargs): # noqa: 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -11550,34 +14370,36 @@ def delete_collection_persistent_volume_with_http_info(self, **kwargs): # noqa: path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -11587,11 +14409,16 @@ def delete_collection_persistent_volume_with_http_info(self, **kwargs): # noqa: body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 401: None, + } + return self.api_client.call_api( '/api/v1/persistentvolumes', 'DELETE', path_params, @@ -11600,13 +14427,14 @@ def delete_collection_persistent_volume_with_http_info(self, **kwargs): # noqa: body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_namespace(self, name, **kwargs): # noqa: E501 """delete_namespace # noqa: E501 @@ -11614,27 +14442,40 @@ def delete_namespace(self, name, **kwargs): # noqa: E501 delete a Namespace # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_namespace(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Namespace (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the Namespace (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_namespace_with_http_info(name, **kwargs) # noqa: E501 @@ -11645,29 +14486,48 @@ def delete_namespace_with_http_info(self, name, **kwargs): # noqa: E501 delete a Namespace # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_namespace_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Namespace (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the Namespace (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -11677,6 +14537,7 @@ def delete_namespace_with_http_info(self, name, **kwargs): # noqa: E501 'pretty', 'dry_run', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'orphan_dependents', 'propagation_policy', 'body' @@ -11686,7 +14547,10 @@ def delete_namespace_with_http_info(self, name, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -11699,8 +14563,7 @@ def delete_namespace_with_http_info(self, name, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `delete_namespace`") # noqa: E501 collection_formats = {} @@ -11710,18 +14573,20 @@ def delete_namespace_with_http_info(self, name, **kwargs): # noqa: E501 path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -11731,11 +14596,17 @@ def delete_namespace_with_http_info(self, name, **kwargs): # noqa: E501 body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 202: "V1Status", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{name}', 'DELETE', path_params, @@ -11744,13 +14615,14 @@ def delete_namespace_with_http_info(self, name, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_namespaced_config_map(self, name, namespace, **kwargs): # noqa: E501 """delete_namespaced_config_map # noqa: E501 @@ -11758,28 +14630,42 @@ def delete_namespaced_config_map(self, name, namespace, **kwargs): # noqa: E501 delete a ConfigMap # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_namespaced_config_map(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ConfigMap (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the ConfigMap (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_namespaced_config_map_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -11790,30 +14676,50 @@ def delete_namespaced_config_map_with_http_info(self, name, namespace, **kwargs) delete a ConfigMap # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_namespaced_config_map_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ConfigMap (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the ConfigMap (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -11824,6 +14730,7 @@ def delete_namespaced_config_map_with_http_info(self, name, namespace, **kwargs) 'pretty', 'dry_run', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'orphan_dependents', 'propagation_policy', 'body' @@ -11833,7 +14740,10 @@ def delete_namespaced_config_map_with_http_info(self, name, namespace, **kwargs) 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -11846,12 +14756,10 @@ def delete_namespaced_config_map_with_http_info(self, name, namespace, **kwargs) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_config_map`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_config_map`") # noqa: E501 collection_formats = {} @@ -11863,18 +14771,20 @@ def delete_namespaced_config_map_with_http_info(self, name, namespace, **kwargs) path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -11884,11 +14794,17 @@ def delete_namespaced_config_map_with_http_info(self, name, namespace, **kwargs) body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 202: "V1Status", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/configmaps/{name}', 'DELETE', path_params, @@ -11897,13 +14813,14 @@ def delete_namespaced_config_map_with_http_info(self, name, namespace, **kwargs) body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_namespaced_endpoints(self, name, namespace, **kwargs): # noqa: E501 """delete_namespaced_endpoints # noqa: E501 @@ -11911,28 +14828,42 @@ def delete_namespaced_endpoints(self, name, namespace, **kwargs): # noqa: E501 delete Endpoints # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_namespaced_endpoints(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Endpoints (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the Endpoints (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_namespaced_endpoints_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -11943,30 +14874,50 @@ def delete_namespaced_endpoints_with_http_info(self, name, namespace, **kwargs): delete Endpoints # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_namespaced_endpoints_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Endpoints (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the Endpoints (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -11977,6 +14928,7 @@ def delete_namespaced_endpoints_with_http_info(self, name, namespace, **kwargs): 'pretty', 'dry_run', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'orphan_dependents', 'propagation_policy', 'body' @@ -11986,7 +14938,10 @@ def delete_namespaced_endpoints_with_http_info(self, name, namespace, **kwargs): 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -11999,12 +14954,10 @@ def delete_namespaced_endpoints_with_http_info(self, name, namespace, **kwargs): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_endpoints`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_endpoints`") # noqa: E501 collection_formats = {} @@ -12016,18 +14969,20 @@ def delete_namespaced_endpoints_with_http_info(self, name, namespace, **kwargs): path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -12037,11 +14992,17 @@ def delete_namespaced_endpoints_with_http_info(self, name, namespace, **kwargs): body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 202: "V1Status", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/endpoints/{name}', 'DELETE', path_params, @@ -12050,13 +15011,14 @@ def delete_namespaced_endpoints_with_http_info(self, name, namespace, **kwargs): body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_namespaced_event(self, name, namespace, **kwargs): # noqa: E501 """delete_namespaced_event # noqa: E501 @@ -12064,28 +15026,42 @@ def delete_namespaced_event(self, name, namespace, **kwargs): # noqa: E501 delete an Event # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_namespaced_event(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Event (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the Event (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_namespaced_event_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -12096,30 +15072,50 @@ def delete_namespaced_event_with_http_info(self, name, namespace, **kwargs): # delete an Event # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_namespaced_event_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Event (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the Event (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -12130,6 +15126,7 @@ def delete_namespaced_event_with_http_info(self, name, namespace, **kwargs): # 'pretty', 'dry_run', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'orphan_dependents', 'propagation_policy', 'body' @@ -12139,7 +15136,10 @@ def delete_namespaced_event_with_http_info(self, name, namespace, **kwargs): # 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -12152,12 +15152,10 @@ def delete_namespaced_event_with_http_info(self, name, namespace, **kwargs): # local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_event`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_event`") # noqa: E501 collection_formats = {} @@ -12169,18 +15167,20 @@ def delete_namespaced_event_with_http_info(self, name, namespace, **kwargs): # path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -12190,11 +15190,17 @@ def delete_namespaced_event_with_http_info(self, name, namespace, **kwargs): # body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 202: "V1Status", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/events/{name}', 'DELETE', path_params, @@ -12203,13 +15209,14 @@ def delete_namespaced_event_with_http_info(self, name, namespace, **kwargs): # body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_namespaced_limit_range(self, name, namespace, **kwargs): # noqa: E501 """delete_namespaced_limit_range # noqa: E501 @@ -12217,28 +15224,42 @@ def delete_namespaced_limit_range(self, name, namespace, **kwargs): # noqa: E50 delete a LimitRange # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_namespaced_limit_range(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the LimitRange (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the LimitRange (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_namespaced_limit_range_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -12249,30 +15270,50 @@ def delete_namespaced_limit_range_with_http_info(self, name, namespace, **kwargs delete a LimitRange # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_namespaced_limit_range_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the LimitRange (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the LimitRange (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -12283,6 +15324,7 @@ def delete_namespaced_limit_range_with_http_info(self, name, namespace, **kwargs 'pretty', 'dry_run', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'orphan_dependents', 'propagation_policy', 'body' @@ -12292,7 +15334,10 @@ def delete_namespaced_limit_range_with_http_info(self, name, namespace, **kwargs 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -12305,12 +15350,10 @@ def delete_namespaced_limit_range_with_http_info(self, name, namespace, **kwargs local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_limit_range`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_limit_range`") # noqa: E501 collection_formats = {} @@ -12322,18 +15365,20 @@ def delete_namespaced_limit_range_with_http_info(self, name, namespace, **kwargs path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -12343,11 +15388,17 @@ def delete_namespaced_limit_range_with_http_info(self, name, namespace, **kwargs body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 202: "V1Status", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/limitranges/{name}', 'DELETE', path_params, @@ -12356,13 +15407,14 @@ def delete_namespaced_limit_range_with_http_info(self, name, namespace, **kwargs body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_namespaced_persistent_volume_claim(self, name, namespace, **kwargs): # noqa: E501 """delete_namespaced_persistent_volume_claim # noqa: E501 @@ -12370,28 +15422,42 @@ def delete_namespaced_persistent_volume_claim(self, name, namespace, **kwargs): delete a PersistentVolumeClaim # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_namespaced_persistent_volume_claim(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PersistentVolumeClaim (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the PersistentVolumeClaim (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1PersistentVolumeClaim + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1PersistentVolumeClaim """ kwargs['_return_http_data_only'] = True return self.delete_namespaced_persistent_volume_claim_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -12402,30 +15468,50 @@ def delete_namespaced_persistent_volume_claim_with_http_info(self, name, namespa delete a PersistentVolumeClaim # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_namespaced_persistent_volume_claim_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PersistentVolumeClaim (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the PersistentVolumeClaim (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1PersistentVolumeClaim, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1PersistentVolumeClaim, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -12436,6 +15522,7 @@ def delete_namespaced_persistent_volume_claim_with_http_info(self, name, namespa 'pretty', 'dry_run', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'orphan_dependents', 'propagation_policy', 'body' @@ -12445,7 +15532,10 @@ def delete_namespaced_persistent_volume_claim_with_http_info(self, name, namespa 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -12458,12 +15548,10 @@ def delete_namespaced_persistent_volume_claim_with_http_info(self, name, namespa local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_persistent_volume_claim`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_persistent_volume_claim`") # noqa: E501 collection_formats = {} @@ -12475,18 +15563,20 @@ def delete_namespaced_persistent_volume_claim_with_http_info(self, name, namespa path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -12496,11 +15586,17 @@ def delete_namespaced_persistent_volume_claim_with_http_info(self, name, namespa body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1PersistentVolumeClaim", + 202: "V1PersistentVolumeClaim", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}', 'DELETE', path_params, @@ -12509,13 +15605,14 @@ def delete_namespaced_persistent_volume_claim_with_http_info(self, name, namespa body=body_params, post_params=form_params, files=local_var_files, - response_type='V1PersistentVolumeClaim', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_namespaced_pod(self, name, namespace, **kwargs): # noqa: E501 """delete_namespaced_pod # noqa: E501 @@ -12523,28 +15620,42 @@ def delete_namespaced_pod(self, name, namespace, **kwargs): # noqa: E501 delete a Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_namespaced_pod(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Pod (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the Pod (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Pod + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Pod """ kwargs['_return_http_data_only'] = True return self.delete_namespaced_pod_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -12555,30 +15666,50 @@ def delete_namespaced_pod_with_http_info(self, name, namespace, **kwargs): # no delete a Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_namespaced_pod_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Pod (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the Pod (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Pod, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Pod, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -12589,6 +15720,7 @@ def delete_namespaced_pod_with_http_info(self, name, namespace, **kwargs): # no 'pretty', 'dry_run', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'orphan_dependents', 'propagation_policy', 'body' @@ -12598,7 +15730,10 @@ def delete_namespaced_pod_with_http_info(self, name, namespace, **kwargs): # no 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -12611,12 +15746,10 @@ def delete_namespaced_pod_with_http_info(self, name, namespace, **kwargs): # no local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_pod`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_pod`") # noqa: E501 collection_formats = {} @@ -12628,18 +15761,20 @@ def delete_namespaced_pod_with_http_info(self, name, namespace, **kwargs): # no path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -12649,11 +15784,17 @@ def delete_namespaced_pod_with_http_info(self, name, namespace, **kwargs): # no body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Pod", + 202: "V1Pod", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/pods/{name}', 'DELETE', path_params, @@ -12662,13 +15803,14 @@ def delete_namespaced_pod_with_http_info(self, name, namespace, **kwargs): # no body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Pod', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_namespaced_pod_template(self, name, namespace, **kwargs): # noqa: E501 """delete_namespaced_pod_template # noqa: E501 @@ -12676,28 +15818,42 @@ def delete_namespaced_pod_template(self, name, namespace, **kwargs): # noqa: E5 delete a PodTemplate # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_namespaced_pod_template(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PodTemplate (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the PodTemplate (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1PodTemplate + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1PodTemplate """ kwargs['_return_http_data_only'] = True return self.delete_namespaced_pod_template_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -12708,30 +15864,50 @@ def delete_namespaced_pod_template_with_http_info(self, name, namespace, **kwarg delete a PodTemplate # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_namespaced_pod_template_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PodTemplate (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the PodTemplate (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1PodTemplate, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1PodTemplate, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -12742,6 +15918,7 @@ def delete_namespaced_pod_template_with_http_info(self, name, namespace, **kwarg 'pretty', 'dry_run', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'orphan_dependents', 'propagation_policy', 'body' @@ -12751,7 +15928,10 @@ def delete_namespaced_pod_template_with_http_info(self, name, namespace, **kwarg 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -12764,12 +15944,10 @@ def delete_namespaced_pod_template_with_http_info(self, name, namespace, **kwarg local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_pod_template`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_pod_template`") # noqa: E501 collection_formats = {} @@ -12781,18 +15959,20 @@ def delete_namespaced_pod_template_with_http_info(self, name, namespace, **kwarg path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -12802,11 +15982,17 @@ def delete_namespaced_pod_template_with_http_info(self, name, namespace, **kwarg body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1PodTemplate", + 202: "V1PodTemplate", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/podtemplates/{name}', 'DELETE', path_params, @@ -12815,13 +16001,14 @@ def delete_namespaced_pod_template_with_http_info(self, name, namespace, **kwarg body=body_params, post_params=form_params, files=local_var_files, - response_type='V1PodTemplate', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_namespaced_replication_controller(self, name, namespace, **kwargs): # noqa: E501 """delete_namespaced_replication_controller # noqa: E501 @@ -12829,28 +16016,42 @@ def delete_namespaced_replication_controller(self, name, namespace, **kwargs): delete a ReplicationController # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_namespaced_replication_controller(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ReplicationController (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the ReplicationController (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_namespaced_replication_controller_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -12861,30 +16062,50 @@ def delete_namespaced_replication_controller_with_http_info(self, name, namespac delete a ReplicationController # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_namespaced_replication_controller_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ReplicationController (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the ReplicationController (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -12895,6 +16116,7 @@ def delete_namespaced_replication_controller_with_http_info(self, name, namespac 'pretty', 'dry_run', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'orphan_dependents', 'propagation_policy', 'body' @@ -12904,7 +16126,10 @@ def delete_namespaced_replication_controller_with_http_info(self, name, namespac 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -12917,12 +16142,10 @@ def delete_namespaced_replication_controller_with_http_info(self, name, namespac local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_replication_controller`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_replication_controller`") # noqa: E501 collection_formats = {} @@ -12934,18 +16157,20 @@ def delete_namespaced_replication_controller_with_http_info(self, name, namespac path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -12955,11 +16180,17 @@ def delete_namespaced_replication_controller_with_http_info(self, name, namespac body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 202: "V1Status", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}', 'DELETE', path_params, @@ -12968,13 +16199,14 @@ def delete_namespaced_replication_controller_with_http_info(self, name, namespac body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_namespaced_resource_quota(self, name, namespace, **kwargs): # noqa: E501 """delete_namespaced_resource_quota # noqa: E501 @@ -12982,28 +16214,42 @@ def delete_namespaced_resource_quota(self, name, namespace, **kwargs): # noqa: delete a ResourceQuota # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_namespaced_resource_quota(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ResourceQuota (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the ResourceQuota (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ResourceQuota + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ResourceQuota """ kwargs['_return_http_data_only'] = True return self.delete_namespaced_resource_quota_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -13014,30 +16260,50 @@ def delete_namespaced_resource_quota_with_http_info(self, name, namespace, **kwa delete a ResourceQuota # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_namespaced_resource_quota_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ResourceQuota (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the ResourceQuota (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ResourceQuota, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ResourceQuota, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -13048,6 +16314,7 @@ def delete_namespaced_resource_quota_with_http_info(self, name, namespace, **kwa 'pretty', 'dry_run', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'orphan_dependents', 'propagation_policy', 'body' @@ -13057,7 +16324,10 @@ def delete_namespaced_resource_quota_with_http_info(self, name, namespace, **kwa 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -13070,12 +16340,10 @@ def delete_namespaced_resource_quota_with_http_info(self, name, namespace, **kwa local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_resource_quota`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_resource_quota`") # noqa: E501 collection_formats = {} @@ -13087,18 +16355,20 @@ def delete_namespaced_resource_quota_with_http_info(self, name, namespace, **kwa path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -13108,11 +16378,17 @@ def delete_namespaced_resource_quota_with_http_info(self, name, namespace, **kwa body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ResourceQuota", + 202: "V1ResourceQuota", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/resourcequotas/{name}', 'DELETE', path_params, @@ -13121,13 +16397,14 @@ def delete_namespaced_resource_quota_with_http_info(self, name, namespace, **kwa body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ResourceQuota', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_namespaced_secret(self, name, namespace, **kwargs): # noqa: E501 """delete_namespaced_secret # noqa: E501 @@ -13135,28 +16412,42 @@ def delete_namespaced_secret(self, name, namespace, **kwargs): # noqa: E501 delete a Secret # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_namespaced_secret(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Secret (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the Secret (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_namespaced_secret_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -13167,30 +16458,50 @@ def delete_namespaced_secret_with_http_info(self, name, namespace, **kwargs): # delete a Secret # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_namespaced_secret_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Secret (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the Secret (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -13201,6 +16512,7 @@ def delete_namespaced_secret_with_http_info(self, name, namespace, **kwargs): # 'pretty', 'dry_run', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'orphan_dependents', 'propagation_policy', 'body' @@ -13210,7 +16522,10 @@ def delete_namespaced_secret_with_http_info(self, name, namespace, **kwargs): # 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -13223,12 +16538,10 @@ def delete_namespaced_secret_with_http_info(self, name, namespace, **kwargs): # local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_secret`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_secret`") # noqa: E501 collection_formats = {} @@ -13240,18 +16553,20 @@ def delete_namespaced_secret_with_http_info(self, name, namespace, **kwargs): # path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -13261,11 +16576,17 @@ def delete_namespaced_secret_with_http_info(self, name, namespace, **kwargs): # body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 202: "V1Status", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/secrets/{name}', 'DELETE', path_params, @@ -13274,13 +16595,14 @@ def delete_namespaced_secret_with_http_info(self, name, namespace, **kwargs): # body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_namespaced_service(self, name, namespace, **kwargs): # noqa: E501 """delete_namespaced_service # noqa: E501 @@ -13288,28 +16610,42 @@ def delete_namespaced_service(self, name, namespace, **kwargs): # noqa: E501 delete a Service # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_namespaced_service(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Service (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the Service (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Service + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Service """ kwargs['_return_http_data_only'] = True return self.delete_namespaced_service_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -13320,30 +16656,50 @@ def delete_namespaced_service_with_http_info(self, name, namespace, **kwargs): delete a Service # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_namespaced_service_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Service (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the Service (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Service, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Service, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -13354,6 +16710,7 @@ def delete_namespaced_service_with_http_info(self, name, namespace, **kwargs): 'pretty', 'dry_run', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'orphan_dependents', 'propagation_policy', 'body' @@ -13363,7 +16720,10 @@ def delete_namespaced_service_with_http_info(self, name, namespace, **kwargs): 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -13376,12 +16736,10 @@ def delete_namespaced_service_with_http_info(self, name, namespace, **kwargs): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_service`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_service`") # noqa: E501 collection_formats = {} @@ -13393,18 +16751,20 @@ def delete_namespaced_service_with_http_info(self, name, namespace, **kwargs): path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -13414,11 +16774,17 @@ def delete_namespaced_service_with_http_info(self, name, namespace, **kwargs): body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Service", + 202: "V1Service", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/services/{name}', 'DELETE', path_params, @@ -13427,13 +16793,14 @@ def delete_namespaced_service_with_http_info(self, name, namespace, **kwargs): body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Service', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_namespaced_service_account(self, name, namespace, **kwargs): # noqa: E501 """delete_namespaced_service_account # noqa: E501 @@ -13441,28 +16808,42 @@ def delete_namespaced_service_account(self, name, namespace, **kwargs): # noqa: delete a ServiceAccount # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_namespaced_service_account(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ServiceAccount (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the ServiceAccount (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ServiceAccount + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ServiceAccount """ kwargs['_return_http_data_only'] = True return self.delete_namespaced_service_account_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -13473,30 +16854,50 @@ def delete_namespaced_service_account_with_http_info(self, name, namespace, **kw delete a ServiceAccount # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_namespaced_service_account_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ServiceAccount (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the ServiceAccount (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ServiceAccount, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ServiceAccount, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -13507,6 +16908,7 @@ def delete_namespaced_service_account_with_http_info(self, name, namespace, **kw 'pretty', 'dry_run', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'orphan_dependents', 'propagation_policy', 'body' @@ -13516,7 +16918,10 @@ def delete_namespaced_service_account_with_http_info(self, name, namespace, **kw 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -13529,12 +16934,10 @@ def delete_namespaced_service_account_with_http_info(self, name, namespace, **kw local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_service_account`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_service_account`") # noqa: E501 collection_formats = {} @@ -13546,18 +16949,20 @@ def delete_namespaced_service_account_with_http_info(self, name, namespace, **kw path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -13567,11 +16972,17 @@ def delete_namespaced_service_account_with_http_info(self, name, namespace, **kw body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ServiceAccount", + 202: "V1ServiceAccount", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/serviceaccounts/{name}', 'DELETE', path_params, @@ -13580,13 +16991,14 @@ def delete_namespaced_service_account_with_http_info(self, name, namespace, **kw body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ServiceAccount', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_node(self, name, **kwargs): # noqa: E501 """delete_node # noqa: E501 @@ -13594,27 +17006,40 @@ def delete_node(self, name, **kwargs): # noqa: E501 delete a Node # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_node(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Node (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the Node (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_node_with_http_info(name, **kwargs) # noqa: E501 @@ -13625,29 +17050,48 @@ def delete_node_with_http_info(self, name, **kwargs): # noqa: E501 delete a Node # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_node_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Node (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the Node (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -13657,6 +17101,7 @@ def delete_node_with_http_info(self, name, **kwargs): # noqa: E501 'pretty', 'dry_run', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'orphan_dependents', 'propagation_policy', 'body' @@ -13666,7 +17111,10 @@ def delete_node_with_http_info(self, name, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -13679,8 +17127,7 @@ def delete_node_with_http_info(self, name, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `delete_node`") # noqa: E501 collection_formats = {} @@ -13690,18 +17137,20 @@ def delete_node_with_http_info(self, name, **kwargs): # noqa: E501 path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -13711,11 +17160,17 @@ def delete_node_with_http_info(self, name, **kwargs): # noqa: E501 body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 202: "V1Status", + 401: None, + } + return self.api_client.call_api( '/api/v1/nodes/{name}', 'DELETE', path_params, @@ -13724,13 +17179,14 @@ def delete_node_with_http_info(self, name, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_persistent_volume(self, name, **kwargs): # noqa: E501 """delete_persistent_volume # noqa: E501 @@ -13738,27 +17194,40 @@ def delete_persistent_volume(self, name, **kwargs): # noqa: E501 delete a PersistentVolume # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_persistent_volume(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PersistentVolume (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the PersistentVolume (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1PersistentVolume + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1PersistentVolume """ kwargs['_return_http_data_only'] = True return self.delete_persistent_volume_with_http_info(name, **kwargs) # noqa: E501 @@ -13769,29 +17238,48 @@ def delete_persistent_volume_with_http_info(self, name, **kwargs): # noqa: E501 delete a PersistentVolume # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_persistent_volume_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PersistentVolume (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the PersistentVolume (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1PersistentVolume, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1PersistentVolume, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -13801,6 +17289,7 @@ def delete_persistent_volume_with_http_info(self, name, **kwargs): # noqa: E501 'pretty', 'dry_run', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'orphan_dependents', 'propagation_policy', 'body' @@ -13810,7 +17299,10 @@ def delete_persistent_volume_with_http_info(self, name, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -13823,8 +17315,7 @@ def delete_persistent_volume_with_http_info(self, name, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `delete_persistent_volume`") # noqa: E501 collection_formats = {} @@ -13834,18 +17325,20 @@ def delete_persistent_volume_with_http_info(self, name, **kwargs): # noqa: E501 path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -13855,11 +17348,17 @@ def delete_persistent_volume_with_http_info(self, name, **kwargs): # noqa: E501 body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1PersistentVolume", + 202: "V1PersistentVolume", + 401: None, + } + return self.api_client.call_api( '/api/v1/persistentvolumes/{name}', 'DELETE', path_params, @@ -13868,13 +17367,14 @@ def delete_persistent_volume_with_http_info(self, name, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1PersistentVolume', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def get_api_resources(self, **kwargs): # noqa: E501 """get_api_resources # noqa: E501 @@ -13882,20 +17382,24 @@ def get_api_resources(self, **kwargs): # noqa: E501 get available resources # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_resources(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1APIResourceList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1APIResourceList """ kwargs['_return_http_data_only'] = True return self.get_api_resources_with_http_info(**kwargs) # noqa: E501 @@ -13906,22 +17410,32 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 get available resources # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_resources_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -13933,7 +17447,10 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -13952,7 +17469,7 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -13960,11 +17477,16 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1APIResourceList", + 401: None, + } + return self.api_client.call_api( '/api/v1/', 'GET', path_params, @@ -13973,13 +17495,14 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1APIResourceList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_component_status(self, **kwargs): # noqa: E501 """list_component_status # noqa: E501 @@ -13987,31 +17510,46 @@ def list_component_status(self, **kwargs): # noqa: E501 list objects of kind ComponentStatus # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_component_status(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ComponentStatusList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ComponentStatusList """ kwargs['_return_http_data_only'] = True return self.list_component_status_with_http_info(**kwargs) # noqa: E501 @@ -14022,33 +17560,54 @@ def list_component_status_with_http_info(self, **kwargs): # noqa: E501 list objects of kind ComponentStatus # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_component_status_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ComponentStatusList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ComponentStatusList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -14071,7 +17630,10 @@ def list_component_status_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -14089,30 +17651,30 @@ def list_component_status_with_http_info(self, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -14120,11 +17682,16 @@ def list_component_status_with_http_info(self, **kwargs): # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ComponentStatusList", + 401: None, + } + return self.api_client.call_api( '/api/v1/componentstatuses', 'GET', path_params, @@ -14133,13 +17700,14 @@ def list_component_status_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ComponentStatusList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_config_map_for_all_namespaces(self, **kwargs): # noqa: E501 """list_config_map_for_all_namespaces # noqa: E501 @@ -14147,31 +17715,46 @@ def list_config_map_for_all_namespaces(self, **kwargs): # noqa: E501 list or watch objects of kind ConfigMap # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_config_map_for_all_namespaces(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ConfigMapList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ConfigMapList """ kwargs['_return_http_data_only'] = True return self.list_config_map_for_all_namespaces_with_http_info(**kwargs) # noqa: E501 @@ -14182,33 +17765,54 @@ def list_config_map_for_all_namespaces_with_http_info(self, **kwargs): # noqa: list or watch objects of kind ConfigMap # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_config_map_for_all_namespaces_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ConfigMapList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ConfigMapList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -14231,7 +17835,10 @@ def list_config_map_for_all_namespaces_with_http_info(self, **kwargs): # noqa: 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -14249,30 +17856,30 @@ def list_config_map_for_all_namespaces_with_http_info(self, **kwargs): # noqa: path_params = {} query_params = [] - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -14280,11 +17887,16 @@ def list_config_map_for_all_namespaces_with_http_info(self, **kwargs): # noqa: body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ConfigMapList", + 401: None, + } + return self.api_client.call_api( '/api/v1/configmaps', 'GET', path_params, @@ -14293,13 +17905,14 @@ def list_config_map_for_all_namespaces_with_http_info(self, **kwargs): # noqa: body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ConfigMapList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_endpoints_for_all_namespaces(self, **kwargs): # noqa: E501 """list_endpoints_for_all_namespaces # noqa: E501 @@ -14307,31 +17920,46 @@ def list_endpoints_for_all_namespaces(self, **kwargs): # noqa: E501 list or watch objects of kind Endpoints # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_endpoints_for_all_namespaces(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1EndpointsList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1EndpointsList """ kwargs['_return_http_data_only'] = True return self.list_endpoints_for_all_namespaces_with_http_info(**kwargs) # noqa: E501 @@ -14342,33 +17970,54 @@ def list_endpoints_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E list or watch objects of kind Endpoints # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_endpoints_for_all_namespaces_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1EndpointsList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1EndpointsList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -14391,7 +18040,10 @@ def list_endpoints_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -14409,30 +18061,30 @@ def list_endpoints_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E path_params = {} query_params = [] - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -14440,11 +18092,16 @@ def list_endpoints_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1EndpointsList", + 401: None, + } + return self.api_client.call_api( '/api/v1/endpoints', 'GET', path_params, @@ -14453,13 +18110,14 @@ def list_endpoints_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E body=body_params, post_params=form_params, files=local_var_files, - response_type='V1EndpointsList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_event_for_all_namespaces(self, **kwargs): # noqa: E501 """list_event_for_all_namespaces # noqa: E501 @@ -14467,31 +18125,46 @@ def list_event_for_all_namespaces(self, **kwargs): # noqa: E501 list or watch objects of kind Event # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_event_for_all_namespaces(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: CoreV1EventList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: CoreV1EventList """ kwargs['_return_http_data_only'] = True return self.list_event_for_all_namespaces_with_http_info(**kwargs) # noqa: E501 @@ -14502,33 +18175,54 @@ def list_event_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501 list or watch objects of kind Event # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_event_for_all_namespaces_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(CoreV1EventList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(CoreV1EventList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -14551,7 +18245,10 @@ def list_event_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -14569,30 +18266,30 @@ def list_event_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -14600,11 +18297,16 @@ def list_event_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "CoreV1EventList", + 401: None, + } + return self.api_client.call_api( '/api/v1/events', 'GET', path_params, @@ -14613,13 +18315,14 @@ def list_event_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='CoreV1EventList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_limit_range_for_all_namespaces(self, **kwargs): # noqa: E501 """list_limit_range_for_all_namespaces # noqa: E501 @@ -14627,31 +18330,46 @@ def list_limit_range_for_all_namespaces(self, **kwargs): # noqa: E501 list or watch objects of kind LimitRange # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_limit_range_for_all_namespaces(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1LimitRangeList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1LimitRangeList """ kwargs['_return_http_data_only'] = True return self.list_limit_range_for_all_namespaces_with_http_info(**kwargs) # noqa: E501 @@ -14662,33 +18380,54 @@ def list_limit_range_for_all_namespaces_with_http_info(self, **kwargs): # noqa: list or watch objects of kind LimitRange # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_limit_range_for_all_namespaces_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1LimitRangeList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1LimitRangeList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -14711,7 +18450,10 @@ def list_limit_range_for_all_namespaces_with_http_info(self, **kwargs): # noqa: 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -14729,30 +18471,30 @@ def list_limit_range_for_all_namespaces_with_http_info(self, **kwargs): # noqa: path_params = {} query_params = [] - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -14760,11 +18502,16 @@ def list_limit_range_for_all_namespaces_with_http_info(self, **kwargs): # noqa: body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1LimitRangeList", + 401: None, + } + return self.api_client.call_api( '/api/v1/limitranges', 'GET', path_params, @@ -14773,13 +18520,14 @@ def list_limit_range_for_all_namespaces_with_http_info(self, **kwargs): # noqa: body=body_params, post_params=form_params, files=local_var_files, - response_type='V1LimitRangeList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_namespace(self, **kwargs): # noqa: E501 """list_namespace # noqa: E501 @@ -14787,31 +18535,46 @@ def list_namespace(self, **kwargs): # noqa: E501 list or watch objects of kind Namespace # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_namespace(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1NamespaceList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1NamespaceList """ kwargs['_return_http_data_only'] = True return self.list_namespace_with_http_info(**kwargs) # noqa: E501 @@ -14822,33 +18585,54 @@ def list_namespace_with_http_info(self, **kwargs): # noqa: E501 list or watch objects of kind Namespace # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_namespace_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1NamespaceList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1NamespaceList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -14871,7 +18655,10 @@ def list_namespace_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -14889,30 +18676,30 @@ def list_namespace_with_http_info(self, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -14920,11 +18707,16 @@ def list_namespace_with_http_info(self, **kwargs): # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1NamespaceList", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces', 'GET', path_params, @@ -14933,13 +18725,14 @@ def list_namespace_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1NamespaceList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_namespaced_config_map(self, namespace, **kwargs): # noqa: E501 """list_namespaced_config_map # noqa: E501 @@ -14947,32 +18740,48 @@ def list_namespaced_config_map(self, namespace, **kwargs): # noqa: E501 list or watch objects of kind ConfigMap # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_namespaced_config_map(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ConfigMapList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ConfigMapList """ kwargs['_return_http_data_only'] = True return self.list_namespaced_config_map_with_http_info(namespace, **kwargs) # noqa: E501 @@ -14983,34 +18792,56 @@ def list_namespaced_config_map_with_http_info(self, namespace, **kwargs): # noq list or watch objects of kind ConfigMap # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_namespaced_config_map_with_http_info(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ConfigMapList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ConfigMapList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -15034,7 +18865,10 @@ def list_namespaced_config_map_with_http_info(self, namespace, **kwargs): # noq 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -15047,8 +18881,7 @@ def list_namespaced_config_map_with_http_info(self, namespace, **kwargs): # noq local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_config_map`") # noqa: E501 collection_formats = {} @@ -15058,30 +18891,30 @@ def list_namespaced_config_map_with_http_info(self, namespace, **kwargs): # noq path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -15089,11 +18922,16 @@ def list_namespaced_config_map_with_http_info(self, namespace, **kwargs): # noq body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ConfigMapList", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/configmaps', 'GET', path_params, @@ -15102,13 +18940,14 @@ def list_namespaced_config_map_with_http_info(self, namespace, **kwargs): # noq body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ConfigMapList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_namespaced_endpoints(self, namespace, **kwargs): # noqa: E501 """list_namespaced_endpoints # noqa: E501 @@ -15116,32 +18955,48 @@ def list_namespaced_endpoints(self, namespace, **kwargs): # noqa: E501 list or watch objects of kind Endpoints # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_namespaced_endpoints(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1EndpointsList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1EndpointsList """ kwargs['_return_http_data_only'] = True return self.list_namespaced_endpoints_with_http_info(namespace, **kwargs) # noqa: E501 @@ -15152,34 +19007,56 @@ def list_namespaced_endpoints_with_http_info(self, namespace, **kwargs): # noqa list or watch objects of kind Endpoints # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_namespaced_endpoints_with_http_info(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1EndpointsList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1EndpointsList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -15203,7 +19080,10 @@ def list_namespaced_endpoints_with_http_info(self, namespace, **kwargs): # noqa 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -15216,8 +19096,7 @@ def list_namespaced_endpoints_with_http_info(self, namespace, **kwargs): # noqa local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_endpoints`") # noqa: E501 collection_formats = {} @@ -15227,30 +19106,30 @@ def list_namespaced_endpoints_with_http_info(self, namespace, **kwargs): # noqa path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -15258,11 +19137,16 @@ def list_namespaced_endpoints_with_http_info(self, namespace, **kwargs): # noqa body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1EndpointsList", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/endpoints', 'GET', path_params, @@ -15271,13 +19155,14 @@ def list_namespaced_endpoints_with_http_info(self, namespace, **kwargs): # noqa body=body_params, post_params=form_params, files=local_var_files, - response_type='V1EndpointsList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_namespaced_event(self, namespace, **kwargs): # noqa: E501 """list_namespaced_event # noqa: E501 @@ -15285,32 +19170,48 @@ def list_namespaced_event(self, namespace, **kwargs): # noqa: E501 list or watch objects of kind Event # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_namespaced_event(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: CoreV1EventList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: CoreV1EventList """ kwargs['_return_http_data_only'] = True return self.list_namespaced_event_with_http_info(namespace, **kwargs) # noqa: E501 @@ -15321,34 +19222,56 @@ def list_namespaced_event_with_http_info(self, namespace, **kwargs): # noqa: E5 list or watch objects of kind Event # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_namespaced_event_with_http_info(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(CoreV1EventList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(CoreV1EventList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -15372,7 +19295,10 @@ def list_namespaced_event_with_http_info(self, namespace, **kwargs): # noqa: E5 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -15385,8 +19311,7 @@ def list_namespaced_event_with_http_info(self, namespace, **kwargs): # noqa: E5 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_event`") # noqa: E501 collection_formats = {} @@ -15396,30 +19321,30 @@ def list_namespaced_event_with_http_info(self, namespace, **kwargs): # noqa: E5 path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -15427,11 +19352,16 @@ def list_namespaced_event_with_http_info(self, namespace, **kwargs): # noqa: E5 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "CoreV1EventList", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/events', 'GET', path_params, @@ -15440,13 +19370,14 @@ def list_namespaced_event_with_http_info(self, namespace, **kwargs): # noqa: E5 body=body_params, post_params=form_params, files=local_var_files, - response_type='CoreV1EventList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_namespaced_limit_range(self, namespace, **kwargs): # noqa: E501 """list_namespaced_limit_range # noqa: E501 @@ -15454,32 +19385,48 @@ def list_namespaced_limit_range(self, namespace, **kwargs): # noqa: E501 list or watch objects of kind LimitRange # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_namespaced_limit_range(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1LimitRangeList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1LimitRangeList """ kwargs['_return_http_data_only'] = True return self.list_namespaced_limit_range_with_http_info(namespace, **kwargs) # noqa: E501 @@ -15490,34 +19437,56 @@ def list_namespaced_limit_range_with_http_info(self, namespace, **kwargs): # no list or watch objects of kind LimitRange # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_namespaced_limit_range_with_http_info(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1LimitRangeList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1LimitRangeList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -15541,7 +19510,10 @@ def list_namespaced_limit_range_with_http_info(self, namespace, **kwargs): # no 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -15554,8 +19526,7 @@ def list_namespaced_limit_range_with_http_info(self, namespace, **kwargs): # no local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_limit_range`") # noqa: E501 collection_formats = {} @@ -15565,30 +19536,30 @@ def list_namespaced_limit_range_with_http_info(self, namespace, **kwargs): # no path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -15596,11 +19567,16 @@ def list_namespaced_limit_range_with_http_info(self, namespace, **kwargs): # no body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1LimitRangeList", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/limitranges', 'GET', path_params, @@ -15609,13 +19585,14 @@ def list_namespaced_limit_range_with_http_info(self, namespace, **kwargs): # no body=body_params, post_params=form_params, files=local_var_files, - response_type='V1LimitRangeList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_namespaced_persistent_volume_claim(self, namespace, **kwargs): # noqa: E501 """list_namespaced_persistent_volume_claim # noqa: E501 @@ -15623,32 +19600,48 @@ def list_namespaced_persistent_volume_claim(self, namespace, **kwargs): # noqa: list or watch objects of kind PersistentVolumeClaim # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_namespaced_persistent_volume_claim(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1PersistentVolumeClaimList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1PersistentVolumeClaimList """ kwargs['_return_http_data_only'] = True return self.list_namespaced_persistent_volume_claim_with_http_info(namespace, **kwargs) # noqa: E501 @@ -15659,34 +19652,56 @@ def list_namespaced_persistent_volume_claim_with_http_info(self, namespace, **kw list or watch objects of kind PersistentVolumeClaim # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_namespaced_persistent_volume_claim_with_http_info(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1PersistentVolumeClaimList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1PersistentVolumeClaimList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -15710,7 +19725,10 @@ def list_namespaced_persistent_volume_claim_with_http_info(self, namespace, **kw 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -15723,8 +19741,7 @@ def list_namespaced_persistent_volume_claim_with_http_info(self, namespace, **kw local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_persistent_volume_claim`") # noqa: E501 collection_formats = {} @@ -15734,30 +19751,30 @@ def list_namespaced_persistent_volume_claim_with_http_info(self, namespace, **kw path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -15765,11 +19782,16 @@ def list_namespaced_persistent_volume_claim_with_http_info(self, namespace, **kw body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1PersistentVolumeClaimList", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/persistentvolumeclaims', 'GET', path_params, @@ -15778,13 +19800,14 @@ def list_namespaced_persistent_volume_claim_with_http_info(self, namespace, **kw body=body_params, post_params=form_params, files=local_var_files, - response_type='V1PersistentVolumeClaimList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_namespaced_pod(self, namespace, **kwargs): # noqa: E501 """list_namespaced_pod # noqa: E501 @@ -15792,32 +19815,48 @@ def list_namespaced_pod(self, namespace, **kwargs): # noqa: E501 list or watch objects of kind Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_namespaced_pod(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1PodList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1PodList """ kwargs['_return_http_data_only'] = True return self.list_namespaced_pod_with_http_info(namespace, **kwargs) # noqa: E501 @@ -15828,34 +19867,56 @@ def list_namespaced_pod_with_http_info(self, namespace, **kwargs): # noqa: E501 list or watch objects of kind Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_namespaced_pod_with_http_info(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1PodList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1PodList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -15879,7 +19940,10 @@ def list_namespaced_pod_with_http_info(self, namespace, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -15892,8 +19956,7 @@ def list_namespaced_pod_with_http_info(self, namespace, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_pod`") # noqa: E501 collection_formats = {} @@ -15903,30 +19966,30 @@ def list_namespaced_pod_with_http_info(self, namespace, **kwargs): # noqa: E501 path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -15934,11 +19997,16 @@ def list_namespaced_pod_with_http_info(self, namespace, **kwargs): # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1PodList", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/pods', 'GET', path_params, @@ -15947,13 +20015,14 @@ def list_namespaced_pod_with_http_info(self, namespace, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1PodList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_namespaced_pod_template(self, namespace, **kwargs): # noqa: E501 """list_namespaced_pod_template # noqa: E501 @@ -15961,32 +20030,48 @@ def list_namespaced_pod_template(self, namespace, **kwargs): # noqa: E501 list or watch objects of kind PodTemplate # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_namespaced_pod_template(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1PodTemplateList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1PodTemplateList """ kwargs['_return_http_data_only'] = True return self.list_namespaced_pod_template_with_http_info(namespace, **kwargs) # noqa: E501 @@ -15997,34 +20082,56 @@ def list_namespaced_pod_template_with_http_info(self, namespace, **kwargs): # n list or watch objects of kind PodTemplate # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_namespaced_pod_template_with_http_info(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1PodTemplateList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1PodTemplateList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -16048,7 +20155,10 @@ def list_namespaced_pod_template_with_http_info(self, namespace, **kwargs): # n 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -16061,8 +20171,7 @@ def list_namespaced_pod_template_with_http_info(self, namespace, **kwargs): # n local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_pod_template`") # noqa: E501 collection_formats = {} @@ -16072,30 +20181,30 @@ def list_namespaced_pod_template_with_http_info(self, namespace, **kwargs): # n path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -16103,11 +20212,16 @@ def list_namespaced_pod_template_with_http_info(self, namespace, **kwargs): # n body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1PodTemplateList", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/podtemplates', 'GET', path_params, @@ -16116,13 +20230,14 @@ def list_namespaced_pod_template_with_http_info(self, namespace, **kwargs): # n body=body_params, post_params=form_params, files=local_var_files, - response_type='V1PodTemplateList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_namespaced_replication_controller(self, namespace, **kwargs): # noqa: E501 """list_namespaced_replication_controller # noqa: E501 @@ -16130,32 +20245,48 @@ def list_namespaced_replication_controller(self, namespace, **kwargs): # noqa: list or watch objects of kind ReplicationController # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_namespaced_replication_controller(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ReplicationControllerList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ReplicationControllerList """ kwargs['_return_http_data_only'] = True return self.list_namespaced_replication_controller_with_http_info(namespace, **kwargs) # noqa: E501 @@ -16166,34 +20297,56 @@ def list_namespaced_replication_controller_with_http_info(self, namespace, **kwa list or watch objects of kind ReplicationController # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_namespaced_replication_controller_with_http_info(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ReplicationControllerList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ReplicationControllerList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -16217,7 +20370,10 @@ def list_namespaced_replication_controller_with_http_info(self, namespace, **kwa 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -16230,8 +20386,7 @@ def list_namespaced_replication_controller_with_http_info(self, namespace, **kwa local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_replication_controller`") # noqa: E501 collection_formats = {} @@ -16241,30 +20396,30 @@ def list_namespaced_replication_controller_with_http_info(self, namespace, **kwa path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -16272,11 +20427,16 @@ def list_namespaced_replication_controller_with_http_info(self, namespace, **kwa body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ReplicationControllerList", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/replicationcontrollers', 'GET', path_params, @@ -16285,13 +20445,14 @@ def list_namespaced_replication_controller_with_http_info(self, namespace, **kwa body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ReplicationControllerList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_namespaced_resource_quota(self, namespace, **kwargs): # noqa: E501 """list_namespaced_resource_quota # noqa: E501 @@ -16299,32 +20460,48 @@ def list_namespaced_resource_quota(self, namespace, **kwargs): # noqa: E501 list or watch objects of kind ResourceQuota # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_namespaced_resource_quota(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ResourceQuotaList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ResourceQuotaList """ kwargs['_return_http_data_only'] = True return self.list_namespaced_resource_quota_with_http_info(namespace, **kwargs) # noqa: E501 @@ -16335,34 +20512,56 @@ def list_namespaced_resource_quota_with_http_info(self, namespace, **kwargs): # list or watch objects of kind ResourceQuota # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_namespaced_resource_quota_with_http_info(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ResourceQuotaList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ResourceQuotaList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -16386,7 +20585,10 @@ def list_namespaced_resource_quota_with_http_info(self, namespace, **kwargs): # 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -16399,8 +20601,7 @@ def list_namespaced_resource_quota_with_http_info(self, namespace, **kwargs): # local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_resource_quota`") # noqa: E501 collection_formats = {} @@ -16410,30 +20611,30 @@ def list_namespaced_resource_quota_with_http_info(self, namespace, **kwargs): # path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -16441,11 +20642,16 @@ def list_namespaced_resource_quota_with_http_info(self, namespace, **kwargs): # body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ResourceQuotaList", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/resourcequotas', 'GET', path_params, @@ -16454,13 +20660,14 @@ def list_namespaced_resource_quota_with_http_info(self, namespace, **kwargs): # body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ResourceQuotaList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_namespaced_secret(self, namespace, **kwargs): # noqa: E501 """list_namespaced_secret # noqa: E501 @@ -16468,32 +20675,48 @@ def list_namespaced_secret(self, namespace, **kwargs): # noqa: E501 list or watch objects of kind Secret # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_namespaced_secret(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1SecretList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1SecretList """ kwargs['_return_http_data_only'] = True return self.list_namespaced_secret_with_http_info(namespace, **kwargs) # noqa: E501 @@ -16504,34 +20727,56 @@ def list_namespaced_secret_with_http_info(self, namespace, **kwargs): # noqa: E list or watch objects of kind Secret # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_namespaced_secret_with_http_info(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1SecretList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1SecretList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -16555,7 +20800,10 @@ def list_namespaced_secret_with_http_info(self, namespace, **kwargs): # noqa: E 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -16568,8 +20816,7 @@ def list_namespaced_secret_with_http_info(self, namespace, **kwargs): # noqa: E local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_secret`") # noqa: E501 collection_formats = {} @@ -16579,30 +20826,30 @@ def list_namespaced_secret_with_http_info(self, namespace, **kwargs): # noqa: E path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -16610,11 +20857,16 @@ def list_namespaced_secret_with_http_info(self, namespace, **kwargs): # noqa: E body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1SecretList", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/secrets', 'GET', path_params, @@ -16623,13 +20875,14 @@ def list_namespaced_secret_with_http_info(self, namespace, **kwargs): # noqa: E body=body_params, post_params=form_params, files=local_var_files, - response_type='V1SecretList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_namespaced_service(self, namespace, **kwargs): # noqa: E501 """list_namespaced_service # noqa: E501 @@ -16637,32 +20890,48 @@ def list_namespaced_service(self, namespace, **kwargs): # noqa: E501 list or watch objects of kind Service # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_namespaced_service(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ServiceList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ServiceList """ kwargs['_return_http_data_only'] = True return self.list_namespaced_service_with_http_info(namespace, **kwargs) # noqa: E501 @@ -16673,34 +20942,56 @@ def list_namespaced_service_with_http_info(self, namespace, **kwargs): # noqa: list or watch objects of kind Service # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_namespaced_service_with_http_info(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ServiceList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ServiceList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -16724,7 +21015,10 @@ def list_namespaced_service_with_http_info(self, namespace, **kwargs): # noqa: 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -16737,8 +21031,7 @@ def list_namespaced_service_with_http_info(self, namespace, **kwargs): # noqa: local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_service`") # noqa: E501 collection_formats = {} @@ -16748,30 +21041,30 @@ def list_namespaced_service_with_http_info(self, namespace, **kwargs): # noqa: path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -16779,11 +21072,16 @@ def list_namespaced_service_with_http_info(self, namespace, **kwargs): # noqa: body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ServiceList", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/services', 'GET', path_params, @@ -16792,13 +21090,14 @@ def list_namespaced_service_with_http_info(self, namespace, **kwargs): # noqa: body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ServiceList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_namespaced_service_account(self, namespace, **kwargs): # noqa: E501 """list_namespaced_service_account # noqa: E501 @@ -16806,32 +21105,48 @@ def list_namespaced_service_account(self, namespace, **kwargs): # noqa: E501 list or watch objects of kind ServiceAccount # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_namespaced_service_account(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ServiceAccountList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ServiceAccountList """ kwargs['_return_http_data_only'] = True return self.list_namespaced_service_account_with_http_info(namespace, **kwargs) # noqa: E501 @@ -16842,34 +21157,56 @@ def list_namespaced_service_account_with_http_info(self, namespace, **kwargs): list or watch objects of kind ServiceAccount # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_namespaced_service_account_with_http_info(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ServiceAccountList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ServiceAccountList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -16893,7 +21230,10 @@ def list_namespaced_service_account_with_http_info(self, namespace, **kwargs): 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -16906,8 +21246,7 @@ def list_namespaced_service_account_with_http_info(self, namespace, **kwargs): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_service_account`") # noqa: E501 collection_formats = {} @@ -16917,30 +21256,30 @@ def list_namespaced_service_account_with_http_info(self, namespace, **kwargs): path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -16948,11 +21287,16 @@ def list_namespaced_service_account_with_http_info(self, namespace, **kwargs): body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ServiceAccountList", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/serviceaccounts', 'GET', path_params, @@ -16961,13 +21305,14 @@ def list_namespaced_service_account_with_http_info(self, namespace, **kwargs): body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ServiceAccountList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_node(self, **kwargs): # noqa: E501 """list_node # noqa: E501 @@ -16975,31 +21320,46 @@ def list_node(self, **kwargs): # noqa: E501 list or watch objects of kind Node # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_node(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1NodeList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1NodeList """ kwargs['_return_http_data_only'] = True return self.list_node_with_http_info(**kwargs) # noqa: E501 @@ -17010,33 +21370,54 @@ def list_node_with_http_info(self, **kwargs): # noqa: E501 list or watch objects of kind Node # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_node_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1NodeList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1NodeList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -17059,7 +21440,10 @@ def list_node_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -17077,30 +21461,30 @@ def list_node_with_http_info(self, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -17108,11 +21492,16 @@ def list_node_with_http_info(self, **kwargs): # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1NodeList", + 401: None, + } + return self.api_client.call_api( '/api/v1/nodes', 'GET', path_params, @@ -17121,13 +21510,14 @@ def list_node_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1NodeList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_persistent_volume(self, **kwargs): # noqa: E501 """list_persistent_volume # noqa: E501 @@ -17135,31 +21525,46 @@ def list_persistent_volume(self, **kwargs): # noqa: E501 list or watch objects of kind PersistentVolume # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_persistent_volume(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1PersistentVolumeList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1PersistentVolumeList """ kwargs['_return_http_data_only'] = True return self.list_persistent_volume_with_http_info(**kwargs) # noqa: E501 @@ -17170,33 +21575,54 @@ def list_persistent_volume_with_http_info(self, **kwargs): # noqa: E501 list or watch objects of kind PersistentVolume # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_persistent_volume_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1PersistentVolumeList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1PersistentVolumeList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -17219,7 +21645,10 @@ def list_persistent_volume_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -17237,30 +21666,30 @@ def list_persistent_volume_with_http_info(self, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -17268,11 +21697,16 @@ def list_persistent_volume_with_http_info(self, **kwargs): # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1PersistentVolumeList", + 401: None, + } + return self.api_client.call_api( '/api/v1/persistentvolumes', 'GET', path_params, @@ -17281,13 +21715,14 @@ def list_persistent_volume_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1PersistentVolumeList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_persistent_volume_claim_for_all_namespaces(self, **kwargs): # noqa: E501 """list_persistent_volume_claim_for_all_namespaces # noqa: E501 @@ -17295,31 +21730,46 @@ def list_persistent_volume_claim_for_all_namespaces(self, **kwargs): # noqa: E5 list or watch objects of kind PersistentVolumeClaim # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_persistent_volume_claim_for_all_namespaces(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1PersistentVolumeClaimList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1PersistentVolumeClaimList """ kwargs['_return_http_data_only'] = True return self.list_persistent_volume_claim_for_all_namespaces_with_http_info(**kwargs) # noqa: E501 @@ -17330,33 +21780,54 @@ def list_persistent_volume_claim_for_all_namespaces_with_http_info(self, **kwarg list or watch objects of kind PersistentVolumeClaim # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_persistent_volume_claim_for_all_namespaces_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1PersistentVolumeClaimList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1PersistentVolumeClaimList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -17379,7 +21850,10 @@ def list_persistent_volume_claim_for_all_namespaces_with_http_info(self, **kwarg 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -17397,30 +21871,30 @@ def list_persistent_volume_claim_for_all_namespaces_with_http_info(self, **kwarg path_params = {} query_params = [] - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -17428,11 +21902,16 @@ def list_persistent_volume_claim_for_all_namespaces_with_http_info(self, **kwarg body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1PersistentVolumeClaimList", + 401: None, + } + return self.api_client.call_api( '/api/v1/persistentvolumeclaims', 'GET', path_params, @@ -17441,13 +21920,14 @@ def list_persistent_volume_claim_for_all_namespaces_with_http_info(self, **kwarg body=body_params, post_params=form_params, files=local_var_files, - response_type='V1PersistentVolumeClaimList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_pod_for_all_namespaces(self, **kwargs): # noqa: E501 """list_pod_for_all_namespaces # noqa: E501 @@ -17455,31 +21935,46 @@ def list_pod_for_all_namespaces(self, **kwargs): # noqa: E501 list or watch objects of kind Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_pod_for_all_namespaces(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1PodList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1PodList """ kwargs['_return_http_data_only'] = True return self.list_pod_for_all_namespaces_with_http_info(**kwargs) # noqa: E501 @@ -17490,33 +21985,54 @@ def list_pod_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501 list or watch objects of kind Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_pod_for_all_namespaces_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1PodList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1PodList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -17539,7 +22055,10 @@ def list_pod_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -17557,30 +22076,30 @@ def list_pod_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -17588,11 +22107,16 @@ def list_pod_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1PodList", + 401: None, + } + return self.api_client.call_api( '/api/v1/pods', 'GET', path_params, @@ -17601,13 +22125,14 @@ def list_pod_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1PodList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_pod_template_for_all_namespaces(self, **kwargs): # noqa: E501 """list_pod_template_for_all_namespaces # noqa: E501 @@ -17615,31 +22140,46 @@ def list_pod_template_for_all_namespaces(self, **kwargs): # noqa: E501 list or watch objects of kind PodTemplate # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_pod_template_for_all_namespaces(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1PodTemplateList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1PodTemplateList """ kwargs['_return_http_data_only'] = True return self.list_pod_template_for_all_namespaces_with_http_info(**kwargs) # noqa: E501 @@ -17650,33 +22190,54 @@ def list_pod_template_for_all_namespaces_with_http_info(self, **kwargs): # noqa list or watch objects of kind PodTemplate # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_pod_template_for_all_namespaces_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1PodTemplateList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1PodTemplateList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -17699,7 +22260,10 @@ def list_pod_template_for_all_namespaces_with_http_info(self, **kwargs): # noqa 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -17717,30 +22281,30 @@ def list_pod_template_for_all_namespaces_with_http_info(self, **kwargs): # noqa path_params = {} query_params = [] - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -17748,11 +22312,16 @@ def list_pod_template_for_all_namespaces_with_http_info(self, **kwargs): # noqa body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1PodTemplateList", + 401: None, + } + return self.api_client.call_api( '/api/v1/podtemplates', 'GET', path_params, @@ -17761,13 +22330,14 @@ def list_pod_template_for_all_namespaces_with_http_info(self, **kwargs): # noqa body=body_params, post_params=form_params, files=local_var_files, - response_type='V1PodTemplateList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_replication_controller_for_all_namespaces(self, **kwargs): # noqa: E501 """list_replication_controller_for_all_namespaces # noqa: E501 @@ -17775,31 +22345,46 @@ def list_replication_controller_for_all_namespaces(self, **kwargs): # noqa: E50 list or watch objects of kind ReplicationController # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_replication_controller_for_all_namespaces(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ReplicationControllerList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ReplicationControllerList """ kwargs['_return_http_data_only'] = True return self.list_replication_controller_for_all_namespaces_with_http_info(**kwargs) # noqa: E501 @@ -17810,33 +22395,54 @@ def list_replication_controller_for_all_namespaces_with_http_info(self, **kwargs list or watch objects of kind ReplicationController # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_replication_controller_for_all_namespaces_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ReplicationControllerList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ReplicationControllerList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -17859,7 +22465,10 @@ def list_replication_controller_for_all_namespaces_with_http_info(self, **kwargs 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -17877,30 +22486,30 @@ def list_replication_controller_for_all_namespaces_with_http_info(self, **kwargs path_params = {} query_params = [] - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -17908,11 +22517,16 @@ def list_replication_controller_for_all_namespaces_with_http_info(self, **kwargs body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ReplicationControllerList", + 401: None, + } + return self.api_client.call_api( '/api/v1/replicationcontrollers', 'GET', path_params, @@ -17921,13 +22535,14 @@ def list_replication_controller_for_all_namespaces_with_http_info(self, **kwargs body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ReplicationControllerList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_resource_quota_for_all_namespaces(self, **kwargs): # noqa: E501 """list_resource_quota_for_all_namespaces # noqa: E501 @@ -17935,31 +22550,46 @@ def list_resource_quota_for_all_namespaces(self, **kwargs): # noqa: E501 list or watch objects of kind ResourceQuota # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_resource_quota_for_all_namespaces(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ResourceQuotaList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ResourceQuotaList """ kwargs['_return_http_data_only'] = True return self.list_resource_quota_for_all_namespaces_with_http_info(**kwargs) # noqa: E501 @@ -17970,33 +22600,54 @@ def list_resource_quota_for_all_namespaces_with_http_info(self, **kwargs): # no list or watch objects of kind ResourceQuota # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_resource_quota_for_all_namespaces_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ResourceQuotaList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ResourceQuotaList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -18019,7 +22670,10 @@ def list_resource_quota_for_all_namespaces_with_http_info(self, **kwargs): # no 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -18037,30 +22691,30 @@ def list_resource_quota_for_all_namespaces_with_http_info(self, **kwargs): # no path_params = {} query_params = [] - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -18068,11 +22722,16 @@ def list_resource_quota_for_all_namespaces_with_http_info(self, **kwargs): # no body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ResourceQuotaList", + 401: None, + } + return self.api_client.call_api( '/api/v1/resourcequotas', 'GET', path_params, @@ -18081,13 +22740,14 @@ def list_resource_quota_for_all_namespaces_with_http_info(self, **kwargs): # no body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ResourceQuotaList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_secret_for_all_namespaces(self, **kwargs): # noqa: E501 """list_secret_for_all_namespaces # noqa: E501 @@ -18095,31 +22755,46 @@ def list_secret_for_all_namespaces(self, **kwargs): # noqa: E501 list or watch objects of kind Secret # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_secret_for_all_namespaces(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1SecretList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1SecretList """ kwargs['_return_http_data_only'] = True return self.list_secret_for_all_namespaces_with_http_info(**kwargs) # noqa: E501 @@ -18130,33 +22805,54 @@ def list_secret_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501 list or watch objects of kind Secret # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_secret_for_all_namespaces_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1SecretList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1SecretList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -18179,7 +22875,10 @@ def list_secret_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -18197,30 +22896,30 @@ def list_secret_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -18228,11 +22927,16 @@ def list_secret_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1SecretList", + 401: None, + } + return self.api_client.call_api( '/api/v1/secrets', 'GET', path_params, @@ -18241,13 +22945,14 @@ def list_secret_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1SecretList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_service_account_for_all_namespaces(self, **kwargs): # noqa: E501 """list_service_account_for_all_namespaces # noqa: E501 @@ -18255,31 +22960,46 @@ def list_service_account_for_all_namespaces(self, **kwargs): # noqa: E501 list or watch objects of kind ServiceAccount # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_service_account_for_all_namespaces(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ServiceAccountList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ServiceAccountList """ kwargs['_return_http_data_only'] = True return self.list_service_account_for_all_namespaces_with_http_info(**kwargs) # noqa: E501 @@ -18290,33 +23010,54 @@ def list_service_account_for_all_namespaces_with_http_info(self, **kwargs): # n list or watch objects of kind ServiceAccount # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_service_account_for_all_namespaces_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ServiceAccountList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ServiceAccountList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -18339,7 +23080,10 @@ def list_service_account_for_all_namespaces_with_http_info(self, **kwargs): # n 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -18357,30 +23101,30 @@ def list_service_account_for_all_namespaces_with_http_info(self, **kwargs): # n path_params = {} query_params = [] - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -18388,11 +23132,16 @@ def list_service_account_for_all_namespaces_with_http_info(self, **kwargs): # n body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ServiceAccountList", + 401: None, + } + return self.api_client.call_api( '/api/v1/serviceaccounts', 'GET', path_params, @@ -18401,13 +23150,14 @@ def list_service_account_for_all_namespaces_with_http_info(self, **kwargs): # n body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ServiceAccountList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_service_for_all_namespaces(self, **kwargs): # noqa: E501 """list_service_for_all_namespaces # noqa: E501 @@ -18415,31 +23165,46 @@ def list_service_for_all_namespaces(self, **kwargs): # noqa: E501 list or watch objects of kind Service # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_service_for_all_namespaces(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ServiceList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ServiceList """ kwargs['_return_http_data_only'] = True return self.list_service_for_all_namespaces_with_http_info(**kwargs) # noqa: E501 @@ -18450,33 +23215,54 @@ def list_service_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E50 list or watch objects of kind Service # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_service_for_all_namespaces_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ServiceList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ServiceList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -18499,7 +23285,10 @@ def list_service_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E50 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -18517,30 +23306,30 @@ def list_service_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E50 path_params = {} query_params = [] - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -18548,11 +23337,16 @@ def list_service_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E50 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ServiceList", + 401: None, + } + return self.api_client.call_api( '/api/v1/services', 'GET', path_params, @@ -18561,13 +23355,14 @@ def list_service_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E50 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ServiceList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_namespace(self, name, body, **kwargs): # noqa: E501 """patch_namespace # noqa: E501 @@ -18575,27 +23370,38 @@ def patch_namespace(self, name, body, **kwargs): # noqa: E501 partially update the specified Namespace # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespace(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Namespace (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the Namespace (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Namespace + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Namespace """ kwargs['_return_http_data_only'] = True return self.patch_namespace_with_http_info(name, body, **kwargs) # noqa: E501 @@ -18606,29 +23412,46 @@ def patch_namespace_with_http_info(self, name, body, **kwargs): # noqa: E501 partially update the specified Namespace # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespace_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Namespace (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the Namespace (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Namespace, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Namespace, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -18647,7 +23470,10 @@ def patch_namespace_with_http_info(self, name, body, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -18660,12 +23486,10 @@ def patch_namespace_with_http_info(self, name, body, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_namespace`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_namespace`") # noqa: E501 collection_formats = {} @@ -18675,18 +23499,18 @@ def patch_namespace_with_http_info(self, name, body, **kwargs): # noqa: E501 path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -18696,15 +23520,25 @@ def patch_namespace_with_http_info(self, name, body, **kwargs): # noqa: E501 body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Namespace", + 201: "V1Namespace", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{name}', 'PATCH', path_params, @@ -18713,13 +23547,14 @@ def patch_namespace_with_http_info(self, name, body, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Namespace', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_namespace_status(self, name, body, **kwargs): # noqa: E501 """patch_namespace_status # noqa: E501 @@ -18727,27 +23562,38 @@ def patch_namespace_status(self, name, body, **kwargs): # noqa: E501 partially update status of the specified Namespace # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespace_status(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Namespace (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the Namespace (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Namespace + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Namespace """ kwargs['_return_http_data_only'] = True return self.patch_namespace_status_with_http_info(name, body, **kwargs) # noqa: E501 @@ -18758,29 +23604,46 @@ def patch_namespace_status_with_http_info(self, name, body, **kwargs): # noqa: partially update status of the specified Namespace # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespace_status_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Namespace (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the Namespace (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Namespace, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Namespace, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -18799,7 +23662,10 @@ def patch_namespace_status_with_http_info(self, name, body, **kwargs): # noqa: 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -18812,12 +23678,10 @@ def patch_namespace_status_with_http_info(self, name, body, **kwargs): # noqa: local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_namespace_status`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_namespace_status`") # noqa: E501 collection_formats = {} @@ -18827,18 +23691,18 @@ def patch_namespace_status_with_http_info(self, name, body, **kwargs): # noqa: path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -18848,15 +23712,25 @@ def patch_namespace_status_with_http_info(self, name, body, **kwargs): # noqa: body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Namespace", + 201: "V1Namespace", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{name}/status', 'PATCH', path_params, @@ -18865,13 +23739,14 @@ def patch_namespace_status_with_http_info(self, name, body, **kwargs): # noqa: body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Namespace', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_namespaced_config_map(self, name, namespace, body, **kwargs): # noqa: E501 """patch_namespaced_config_map # noqa: E501 @@ -18879,28 +23754,40 @@ def patch_namespaced_config_map(self, name, namespace, body, **kwargs): # noqa: partially update the specified ConfigMap # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_config_map(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ConfigMap (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the ConfigMap (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ConfigMap + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ConfigMap """ kwargs['_return_http_data_only'] = True return self.patch_namespaced_config_map_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -18911,30 +23798,48 @@ def patch_namespaced_config_map_with_http_info(self, name, namespace, body, **kw partially update the specified ConfigMap # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_config_map_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ConfigMap (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the ConfigMap (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ConfigMap, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ConfigMap, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -18954,7 +23859,10 @@ def patch_namespaced_config_map_with_http_info(self, name, namespace, body, **kw 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -18967,16 +23875,13 @@ def patch_namespaced_config_map_with_http_info(self, name, namespace, body, **kw local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_config_map`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_config_map`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_config_map`") # noqa: E501 collection_formats = {} @@ -18988,18 +23893,18 @@ def patch_namespaced_config_map_with_http_info(self, name, namespace, body, **kw path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -19009,15 +23914,25 @@ def patch_namespaced_config_map_with_http_info(self, name, namespace, body, **kw body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ConfigMap", + 201: "V1ConfigMap", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/configmaps/{name}', 'PATCH', path_params, @@ -19026,13 +23941,14 @@ def patch_namespaced_config_map_with_http_info(self, name, namespace, body, **kw body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ConfigMap', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_namespaced_endpoints(self, name, namespace, body, **kwargs): # noqa: E501 """patch_namespaced_endpoints # noqa: E501 @@ -19040,28 +23956,40 @@ def patch_namespaced_endpoints(self, name, namespace, body, **kwargs): # noqa: partially update the specified Endpoints # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_endpoints(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Endpoints (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the Endpoints (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Endpoints + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Endpoints """ kwargs['_return_http_data_only'] = True return self.patch_namespaced_endpoints_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -19072,30 +24000,48 @@ def patch_namespaced_endpoints_with_http_info(self, name, namespace, body, **kwa partially update the specified Endpoints # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_endpoints_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Endpoints (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the Endpoints (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Endpoints, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Endpoints, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -19115,7 +24061,10 @@ def patch_namespaced_endpoints_with_http_info(self, name, namespace, body, **kwa 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -19128,16 +24077,13 @@ def patch_namespaced_endpoints_with_http_info(self, name, namespace, body, **kwa local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_endpoints`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_endpoints`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_endpoints`") # noqa: E501 collection_formats = {} @@ -19149,18 +24095,18 @@ def patch_namespaced_endpoints_with_http_info(self, name, namespace, body, **kwa path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -19170,15 +24116,25 @@ def patch_namespaced_endpoints_with_http_info(self, name, namespace, body, **kwa body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Endpoints", + 201: "V1Endpoints", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/endpoints/{name}', 'PATCH', path_params, @@ -19187,13 +24143,14 @@ def patch_namespaced_endpoints_with_http_info(self, name, namespace, body, **kwa body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Endpoints', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_namespaced_event(self, name, namespace, body, **kwargs): # noqa: E501 """patch_namespaced_event # noqa: E501 @@ -19201,28 +24158,40 @@ def patch_namespaced_event(self, name, namespace, body, **kwargs): # noqa: E501 partially update the specified Event # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_event(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Event (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the Event (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: CoreV1Event + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: CoreV1Event """ kwargs['_return_http_data_only'] = True return self.patch_namespaced_event_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -19233,30 +24202,48 @@ def patch_namespaced_event_with_http_info(self, name, namespace, body, **kwargs) partially update the specified Event # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_event_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Event (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the Event (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(CoreV1Event, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(CoreV1Event, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -19276,7 +24263,10 @@ def patch_namespaced_event_with_http_info(self, name, namespace, body, **kwargs) 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -19289,16 +24279,13 @@ def patch_namespaced_event_with_http_info(self, name, namespace, body, **kwargs) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_event`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_event`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_event`") # noqa: E501 collection_formats = {} @@ -19310,18 +24297,18 @@ def patch_namespaced_event_with_http_info(self, name, namespace, body, **kwargs) path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -19331,15 +24318,25 @@ def patch_namespaced_event_with_http_info(self, name, namespace, body, **kwargs) body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "CoreV1Event", + 201: "CoreV1Event", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/events/{name}', 'PATCH', path_params, @@ -19348,13 +24345,14 @@ def patch_namespaced_event_with_http_info(self, name, namespace, body, **kwargs) body=body_params, post_params=form_params, files=local_var_files, - response_type='CoreV1Event', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_namespaced_limit_range(self, name, namespace, body, **kwargs): # noqa: E501 """patch_namespaced_limit_range # noqa: E501 @@ -19362,28 +24360,40 @@ def patch_namespaced_limit_range(self, name, namespace, body, **kwargs): # noqa partially update the specified LimitRange # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_limit_range(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the LimitRange (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the LimitRange (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1LimitRange + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1LimitRange """ kwargs['_return_http_data_only'] = True return self.patch_namespaced_limit_range_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -19394,30 +24404,48 @@ def patch_namespaced_limit_range_with_http_info(self, name, namespace, body, **k partially update the specified LimitRange # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_limit_range_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the LimitRange (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the LimitRange (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1LimitRange, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1LimitRange, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -19437,7 +24465,10 @@ def patch_namespaced_limit_range_with_http_info(self, name, namespace, body, **k 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -19450,16 +24481,13 @@ def patch_namespaced_limit_range_with_http_info(self, name, namespace, body, **k local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_limit_range`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_limit_range`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_limit_range`") # noqa: E501 collection_formats = {} @@ -19471,18 +24499,18 @@ def patch_namespaced_limit_range_with_http_info(self, name, namespace, body, **k path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -19492,15 +24520,25 @@ def patch_namespaced_limit_range_with_http_info(self, name, namespace, body, **k body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1LimitRange", + 201: "V1LimitRange", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/limitranges/{name}', 'PATCH', path_params, @@ -19509,13 +24547,14 @@ def patch_namespaced_limit_range_with_http_info(self, name, namespace, body, **k body=body_params, post_params=form_params, files=local_var_files, - response_type='V1LimitRange', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_namespaced_persistent_volume_claim(self, name, namespace, body, **kwargs): # noqa: E501 """patch_namespaced_persistent_volume_claim # noqa: E501 @@ -19523,28 +24562,40 @@ def patch_namespaced_persistent_volume_claim(self, name, namespace, body, **kwar partially update the specified PersistentVolumeClaim # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_persistent_volume_claim(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PersistentVolumeClaim (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the PersistentVolumeClaim (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1PersistentVolumeClaim + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1PersistentVolumeClaim """ kwargs['_return_http_data_only'] = True return self.patch_namespaced_persistent_volume_claim_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -19555,30 +24606,48 @@ def patch_namespaced_persistent_volume_claim_with_http_info(self, name, namespac partially update the specified PersistentVolumeClaim # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_persistent_volume_claim_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PersistentVolumeClaim (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the PersistentVolumeClaim (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1PersistentVolumeClaim, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1PersistentVolumeClaim, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -19598,7 +24667,10 @@ def patch_namespaced_persistent_volume_claim_with_http_info(self, name, namespac 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -19611,16 +24683,13 @@ def patch_namespaced_persistent_volume_claim_with_http_info(self, name, namespac local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_persistent_volume_claim`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_persistent_volume_claim`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_persistent_volume_claim`") # noqa: E501 collection_formats = {} @@ -19632,18 +24701,18 @@ def patch_namespaced_persistent_volume_claim_with_http_info(self, name, namespac path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -19653,15 +24722,25 @@ def patch_namespaced_persistent_volume_claim_with_http_info(self, name, namespac body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1PersistentVolumeClaim", + 201: "V1PersistentVolumeClaim", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}', 'PATCH', path_params, @@ -19670,13 +24749,14 @@ def patch_namespaced_persistent_volume_claim_with_http_info(self, name, namespac body=body_params, post_params=form_params, files=local_var_files, - response_type='V1PersistentVolumeClaim', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_namespaced_persistent_volume_claim_status(self, name, namespace, body, **kwargs): # noqa: E501 """patch_namespaced_persistent_volume_claim_status # noqa: E501 @@ -19684,28 +24764,40 @@ def patch_namespaced_persistent_volume_claim_status(self, name, namespace, body, partially update status of the specified PersistentVolumeClaim # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_persistent_volume_claim_status(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PersistentVolumeClaim (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the PersistentVolumeClaim (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1PersistentVolumeClaim + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1PersistentVolumeClaim """ kwargs['_return_http_data_only'] = True return self.patch_namespaced_persistent_volume_claim_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -19716,30 +24808,48 @@ def patch_namespaced_persistent_volume_claim_status_with_http_info(self, name, n partially update status of the specified PersistentVolumeClaim # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_persistent_volume_claim_status_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PersistentVolumeClaim (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the PersistentVolumeClaim (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1PersistentVolumeClaim, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1PersistentVolumeClaim, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -19759,7 +24869,10 @@ def patch_namespaced_persistent_volume_claim_status_with_http_info(self, name, n 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -19772,16 +24885,13 @@ def patch_namespaced_persistent_volume_claim_status_with_http_info(self, name, n local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_persistent_volume_claim_status`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_persistent_volume_claim_status`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_persistent_volume_claim_status`") # noqa: E501 collection_formats = {} @@ -19793,18 +24903,18 @@ def patch_namespaced_persistent_volume_claim_status_with_http_info(self, name, n path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -19814,15 +24924,25 @@ def patch_namespaced_persistent_volume_claim_status_with_http_info(self, name, n body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1PersistentVolumeClaim", + 201: "V1PersistentVolumeClaim", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status', 'PATCH', path_params, @@ -19831,13 +24951,14 @@ def patch_namespaced_persistent_volume_claim_status_with_http_info(self, name, n body=body_params, post_params=form_params, files=local_var_files, - response_type='V1PersistentVolumeClaim', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_namespaced_pod(self, name, namespace, body, **kwargs): # noqa: E501 """patch_namespaced_pod # noqa: E501 @@ -19845,28 +24966,40 @@ def patch_namespaced_pod(self, name, namespace, body, **kwargs): # noqa: E501 partially update the specified Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_pod(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Pod (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the Pod (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Pod + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Pod """ kwargs['_return_http_data_only'] = True return self.patch_namespaced_pod_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -19877,30 +25010,48 @@ def patch_namespaced_pod_with_http_info(self, name, namespace, body, **kwargs): partially update the specified Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_pod_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Pod (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the Pod (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Pod, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Pod, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -19920,7 +25071,10 @@ def patch_namespaced_pod_with_http_info(self, name, namespace, body, **kwargs): 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -19933,16 +25087,13 @@ def patch_namespaced_pod_with_http_info(self, name, namespace, body, **kwargs): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_pod`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_pod`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_pod`") # noqa: E501 collection_formats = {} @@ -19954,18 +25105,18 @@ def patch_namespaced_pod_with_http_info(self, name, namespace, body, **kwargs): path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -19975,15 +25126,25 @@ def patch_namespaced_pod_with_http_info(self, name, namespace, body, **kwargs): body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Pod", + 201: "V1Pod", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/pods/{name}', 'PATCH', path_params, @@ -19992,13 +25153,14 @@ def patch_namespaced_pod_with_http_info(self, name, namespace, body, **kwargs): body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Pod', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_namespaced_pod_ephemeralcontainers(self, name, namespace, body, **kwargs): # noqa: E501 """patch_namespaced_pod_ephemeralcontainers # noqa: E501 @@ -20006,28 +25168,40 @@ def patch_namespaced_pod_ephemeralcontainers(self, name, namespace, body, **kwar partially update ephemeralcontainers of the specified Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_pod_ephemeralcontainers(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Pod (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the Pod (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Pod + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Pod """ kwargs['_return_http_data_only'] = True return self.patch_namespaced_pod_ephemeralcontainers_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -20038,30 +25212,48 @@ def patch_namespaced_pod_ephemeralcontainers_with_http_info(self, name, namespac partially update ephemeralcontainers of the specified Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_pod_ephemeralcontainers_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Pod (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the Pod (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Pod, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Pod, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -20081,7 +25273,10 @@ def patch_namespaced_pod_ephemeralcontainers_with_http_info(self, name, namespac 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -20094,16 +25289,13 @@ def patch_namespaced_pod_ephemeralcontainers_with_http_info(self, name, namespac local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_pod_ephemeralcontainers`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_pod_ephemeralcontainers`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_pod_ephemeralcontainers`") # noqa: E501 collection_formats = {} @@ -20115,18 +25307,18 @@ def patch_namespaced_pod_ephemeralcontainers_with_http_info(self, name, namespac path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -20136,15 +25328,25 @@ def patch_namespaced_pod_ephemeralcontainers_with_http_info(self, name, namespac body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Pod", + 201: "V1Pod", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/pods/{name}/ephemeralcontainers', 'PATCH', path_params, @@ -20153,76 +25355,107 @@ def patch_namespaced_pod_ephemeralcontainers_with_http_info(self, name, namespac body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Pod', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) - def patch_namespaced_pod_status(self, name, namespace, body, **kwargs): # noqa: E501 - """patch_namespaced_pod_status # noqa: E501 + def patch_namespaced_pod_resize(self, name, namespace, body, **kwargs): # noqa: E501 + """patch_namespaced_pod_resize # noqa: E501 - partially update status of the specified Pod # noqa: E501 + partially update resize of the specified Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_namespaced_pod_status(name, namespace, body, async_req=True) + + >>> thread = api.patch_namespaced_pod_resize(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Pod (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the Pod (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Pod + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Pod """ kwargs['_return_http_data_only'] = True - return self.patch_namespaced_pod_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501 + return self.patch_namespaced_pod_resize_with_http_info(name, namespace, body, **kwargs) # noqa: E501 - def patch_namespaced_pod_status_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501 - """patch_namespaced_pod_status # noqa: E501 + def patch_namespaced_pod_resize_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501 + """patch_namespaced_pod_resize # noqa: E501 - partially update status of the specified Pod # noqa: E501 + partially update resize of the specified Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_namespaced_pod_status_with_http_info(name, namespace, body, async_req=True) + + >>> thread = api.patch_namespaced_pod_resize_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Pod (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the Pod (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Pod, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Pod, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -20242,7 +25475,10 @@ def patch_namespaced_pod_status_with_http_info(self, name, namespace, body, **kw 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -20250,22 +25486,19 @@ def patch_namespaced_pod_status_with_http_info(self, name, namespace, body, **kw if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method patch_namespaced_pod_status" % key + " to method patch_namespaced_pod_resize" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_pod_status`") # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_pod_resize`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_pod_status`") # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_pod_resize`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_pod_status`") # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_pod_resize`") # noqa: E501 collection_formats = {} @@ -20276,18 +25509,18 @@ def patch_namespaced_pod_status_with_http_info(self, name, namespace, body, **kw path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -20297,93 +25530,134 @@ def patch_namespaced_pod_status_with_http_info(self, name, namespace, body, **kw body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Pod", + 201: "V1Pod", + 401: None, + } + return self.api_client.call_api( - '/api/v1/namespaces/{namespace}/pods/{name}/status', 'PATCH', + '/api/v1/namespaces/{namespace}/pods/{name}/resize', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Pod', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) - def patch_namespaced_pod_template(self, name, namespace, body, **kwargs): # noqa: E501 - """patch_namespaced_pod_template # noqa: E501 + def patch_namespaced_pod_status(self, name, namespace, body, **kwargs): # noqa: E501 + """patch_namespaced_pod_status # noqa: E501 - partially update the specified PodTemplate # noqa: E501 + partially update status of the specified Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_namespaced_pod_template(name, namespace, body, async_req=True) + + >>> thread = api.patch_namespaced_pod_status(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PodTemplate (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the Pod (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1PodTemplate + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Pod """ kwargs['_return_http_data_only'] = True - return self.patch_namespaced_pod_template_with_http_info(name, namespace, body, **kwargs) # noqa: E501 + return self.patch_namespaced_pod_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501 - def patch_namespaced_pod_template_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501 - """patch_namespaced_pod_template # noqa: E501 + def patch_namespaced_pod_status_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501 + """patch_namespaced_pod_status # noqa: E501 - partially update the specified PodTemplate # noqa: E501 + partially update status of the specified Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_namespaced_pod_template_with_http_info(name, namespace, body, async_req=True) + + >>> thread = api.patch_namespaced_pod_status_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PodTemplate (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the Pod (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1PodTemplate, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Pod, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -20403,7 +25677,10 @@ def patch_namespaced_pod_template_with_http_info(self, name, namespace, body, ** 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -20411,22 +25688,19 @@ def patch_namespaced_pod_template_with_http_info(self, name, namespace, body, ** if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method patch_namespaced_pod_template" % key + " to method patch_namespaced_pod_status" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_pod_template`") # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_pod_status`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_pod_template`") # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_pod_status`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_pod_template`") # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_pod_status`") # noqa: E501 collection_formats = {} @@ -20437,18 +25711,18 @@ def patch_namespaced_pod_template_with_http_info(self, name, namespace, body, ** path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -20458,93 +25732,134 @@ def patch_namespaced_pod_template_with_http_info(self, name, namespace, body, ** body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Pod", + 201: "V1Pod", + 401: None, + } + return self.api_client.call_api( - '/api/v1/namespaces/{namespace}/podtemplates/{name}', 'PATCH', + '/api/v1/namespaces/{namespace}/pods/{name}/status', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1PodTemplate', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) - def patch_namespaced_replication_controller(self, name, namespace, body, **kwargs): # noqa: E501 - """patch_namespaced_replication_controller # noqa: E501 + def patch_namespaced_pod_template(self, name, namespace, body, **kwargs): # noqa: E501 + """patch_namespaced_pod_template # noqa: E501 - partially update the specified ReplicationController # noqa: E501 + partially update the specified PodTemplate # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_namespaced_replication_controller(name, namespace, body, async_req=True) + + >>> thread = api.patch_namespaced_pod_template(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ReplicationController (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the PodTemplate (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ReplicationController + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1PodTemplate """ kwargs['_return_http_data_only'] = True - return self.patch_namespaced_replication_controller_with_http_info(name, namespace, body, **kwargs) # noqa: E501 + return self.patch_namespaced_pod_template_with_http_info(name, namespace, body, **kwargs) # noqa: E501 - def patch_namespaced_replication_controller_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501 - """patch_namespaced_replication_controller # noqa: E501 + def patch_namespaced_pod_template_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501 + """patch_namespaced_pod_template # noqa: E501 - partially update the specified ReplicationController # noqa: E501 + partially update the specified PodTemplate # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_namespaced_replication_controller_with_http_info(name, namespace, body, async_req=True) + + >>> thread = api.patch_namespaced_pod_template_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ReplicationController (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the PodTemplate (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ReplicationController, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1PodTemplate, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -20564,7 +25879,10 @@ def patch_namespaced_replication_controller_with_http_info(self, name, namespace 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -20572,22 +25890,19 @@ def patch_namespaced_replication_controller_with_http_info(self, name, namespace if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method patch_namespaced_replication_controller" % key + " to method patch_namespaced_pod_template" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_replication_controller`") # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_pod_template`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_replication_controller`") # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_pod_template`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_replication_controller`") # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_pod_template`") # noqa: E501 collection_formats = {} @@ -20598,18 +25913,18 @@ def patch_namespaced_replication_controller_with_http_info(self, name, namespace path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -20619,93 +25934,134 @@ def patch_namespaced_replication_controller_with_http_info(self, name, namespace body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1PodTemplate", + 201: "V1PodTemplate", + 401: None, + } + return self.api_client.call_api( - '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}', 'PATCH', + '/api/v1/namespaces/{namespace}/podtemplates/{name}', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ReplicationController', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) - def patch_namespaced_replication_controller_scale(self, name, namespace, body, **kwargs): # noqa: E501 - """patch_namespaced_replication_controller_scale # noqa: E501 + def patch_namespaced_replication_controller(self, name, namespace, body, **kwargs): # noqa: E501 + """patch_namespaced_replication_controller # noqa: E501 - partially update scale of the specified ReplicationController # noqa: E501 + partially update the specified ReplicationController # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_namespaced_replication_controller_scale(name, namespace, body, async_req=True) + + >>> thread = api.patch_namespaced_replication_controller(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Scale (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the ReplicationController (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Scale + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ReplicationController """ kwargs['_return_http_data_only'] = True - return self.patch_namespaced_replication_controller_scale_with_http_info(name, namespace, body, **kwargs) # noqa: E501 + return self.patch_namespaced_replication_controller_with_http_info(name, namespace, body, **kwargs) # noqa: E501 - def patch_namespaced_replication_controller_scale_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501 - """patch_namespaced_replication_controller_scale # noqa: E501 + def patch_namespaced_replication_controller_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501 + """patch_namespaced_replication_controller # noqa: E501 - partially update scale of the specified ReplicationController # noqa: E501 + partially update the specified ReplicationController # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_namespaced_replication_controller_scale_with_http_info(name, namespace, body, async_req=True) + + >>> thread = api.patch_namespaced_replication_controller_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Scale (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the ReplicationController (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Scale, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ReplicationController, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -20725,7 +26081,10 @@ def patch_namespaced_replication_controller_scale_with_http_info(self, name, nam 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -20733,22 +26092,19 @@ def patch_namespaced_replication_controller_scale_with_http_info(self, name, nam if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method patch_namespaced_replication_controller_scale" % key + " to method patch_namespaced_replication_controller" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_replication_controller_scale`") # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_replication_controller`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_replication_controller_scale`") # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_replication_controller`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_replication_controller_scale`") # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_replication_controller`") # noqa: E501 collection_formats = {} @@ -20759,18 +26115,18 @@ def patch_namespaced_replication_controller_scale_with_http_info(self, name, nam path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -20780,15 +26136,227 @@ def patch_namespaced_replication_controller_scale_with_http_info(self, name, nam body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ReplicationController", + 201: "V1ReplicationController", + 401: None, + } + + return self.api_client.call_api( + '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def patch_namespaced_replication_controller_scale(self, name, namespace, body, **kwargs): # noqa: E501 + """patch_namespaced_replication_controller_scale # noqa: E501 + + partially update scale of the specified ReplicationController # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_namespaced_replication_controller_scale(name, namespace, body, async_req=True) + >>> result = thread.get() + + :param name: name of the Scale (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1Scale + """ + kwargs['_return_http_data_only'] = True + return self.patch_namespaced_replication_controller_scale_with_http_info(name, namespace, body, **kwargs) # noqa: E501 + + def patch_namespaced_replication_controller_scale_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501 + """patch_namespaced_replication_controller_scale # noqa: E501 + + partially update scale of the specified ReplicationController # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_namespaced_replication_controller_scale_with_http_info(name, namespace, body, async_req=True) + >>> result = thread.get() + + :param name: name of the Scale (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1Scale, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'namespace', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation', + 'force' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method patch_namespaced_replication_controller_scale" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_replication_controller_scale`") # noqa: E501 + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_replication_controller_scale`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_replication_controller_scale`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 + query_params.append(('force', local_var_params['force'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # HTTP header `Content-Type` + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1Scale", + 201: "V1Scale", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/scale', 'PATCH', path_params, @@ -20797,13 +26365,14 @@ def patch_namespaced_replication_controller_scale_with_http_info(self, name, nam body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Scale', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_namespaced_replication_controller_status(self, name, namespace, body, **kwargs): # noqa: E501 """patch_namespaced_replication_controller_status # noqa: E501 @@ -20811,28 +26380,40 @@ def patch_namespaced_replication_controller_status(self, name, namespace, body, partially update status of the specified ReplicationController # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_replication_controller_status(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ReplicationController (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the ReplicationController (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ReplicationController + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ReplicationController """ kwargs['_return_http_data_only'] = True return self.patch_namespaced_replication_controller_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -20843,30 +26424,48 @@ def patch_namespaced_replication_controller_status_with_http_info(self, name, na partially update status of the specified ReplicationController # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_replication_controller_status_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ReplicationController (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the ReplicationController (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ReplicationController, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ReplicationController, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -20886,7 +26485,10 @@ def patch_namespaced_replication_controller_status_with_http_info(self, name, na 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -20899,16 +26501,13 @@ def patch_namespaced_replication_controller_status_with_http_info(self, name, na local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_replication_controller_status`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_replication_controller_status`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_replication_controller_status`") # noqa: E501 collection_formats = {} @@ -20920,18 +26519,18 @@ def patch_namespaced_replication_controller_status_with_http_info(self, name, na path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -20941,15 +26540,25 @@ def patch_namespaced_replication_controller_status_with_http_info(self, name, na body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ReplicationController", + 201: "V1ReplicationController", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/status', 'PATCH', path_params, @@ -20958,13 +26567,14 @@ def patch_namespaced_replication_controller_status_with_http_info(self, name, na body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ReplicationController', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_namespaced_resource_quota(self, name, namespace, body, **kwargs): # noqa: E501 """patch_namespaced_resource_quota # noqa: E501 @@ -20972,28 +26582,40 @@ def patch_namespaced_resource_quota(self, name, namespace, body, **kwargs): # n partially update the specified ResourceQuota # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_resource_quota(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ResourceQuota (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the ResourceQuota (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ResourceQuota + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ResourceQuota """ kwargs['_return_http_data_only'] = True return self.patch_namespaced_resource_quota_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -21004,30 +26626,48 @@ def patch_namespaced_resource_quota_with_http_info(self, name, namespace, body, partially update the specified ResourceQuota # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_resource_quota_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ResourceQuota (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the ResourceQuota (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ResourceQuota, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ResourceQuota, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -21047,7 +26687,10 @@ def patch_namespaced_resource_quota_with_http_info(self, name, namespace, body, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -21060,16 +26703,13 @@ def patch_namespaced_resource_quota_with_http_info(self, name, namespace, body, local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_resource_quota`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_resource_quota`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_resource_quota`") # noqa: E501 collection_formats = {} @@ -21081,18 +26721,18 @@ def patch_namespaced_resource_quota_with_http_info(self, name, namespace, body, path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -21102,15 +26742,25 @@ def patch_namespaced_resource_quota_with_http_info(self, name, namespace, body, body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ResourceQuota", + 201: "V1ResourceQuota", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/resourcequotas/{name}', 'PATCH', path_params, @@ -21119,13 +26769,14 @@ def patch_namespaced_resource_quota_with_http_info(self, name, namespace, body, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ResourceQuota', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_namespaced_resource_quota_status(self, name, namespace, body, **kwargs): # noqa: E501 """patch_namespaced_resource_quota_status # noqa: E501 @@ -21133,28 +26784,40 @@ def patch_namespaced_resource_quota_status(self, name, namespace, body, **kwargs partially update status of the specified ResourceQuota # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_resource_quota_status(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ResourceQuota (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the ResourceQuota (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ResourceQuota + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ResourceQuota """ kwargs['_return_http_data_only'] = True return self.patch_namespaced_resource_quota_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -21165,30 +26828,48 @@ def patch_namespaced_resource_quota_status_with_http_info(self, name, namespace, partially update status of the specified ResourceQuota # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_resource_quota_status_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ResourceQuota (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the ResourceQuota (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ResourceQuota, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ResourceQuota, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -21208,7 +26889,10 @@ def patch_namespaced_resource_quota_status_with_http_info(self, name, namespace, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -21221,16 +26905,13 @@ def patch_namespaced_resource_quota_status_with_http_info(self, name, namespace, local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_resource_quota_status`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_resource_quota_status`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_resource_quota_status`") # noqa: E501 collection_formats = {} @@ -21242,18 +26923,18 @@ def patch_namespaced_resource_quota_status_with_http_info(self, name, namespace, path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -21263,15 +26944,25 @@ def patch_namespaced_resource_quota_status_with_http_info(self, name, namespace, body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ResourceQuota", + 201: "V1ResourceQuota", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/resourcequotas/{name}/status', 'PATCH', path_params, @@ -21280,13 +26971,14 @@ def patch_namespaced_resource_quota_status_with_http_info(self, name, namespace, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ResourceQuota', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_namespaced_secret(self, name, namespace, body, **kwargs): # noqa: E501 """patch_namespaced_secret # noqa: E501 @@ -21294,28 +26986,40 @@ def patch_namespaced_secret(self, name, namespace, body, **kwargs): # noqa: E50 partially update the specified Secret # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_secret(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Secret (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the Secret (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Secret + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Secret """ kwargs['_return_http_data_only'] = True return self.patch_namespaced_secret_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -21326,30 +27030,48 @@ def patch_namespaced_secret_with_http_info(self, name, namespace, body, **kwargs partially update the specified Secret # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_secret_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Secret (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the Secret (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Secret, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Secret, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -21369,7 +27091,10 @@ def patch_namespaced_secret_with_http_info(self, name, namespace, body, **kwargs 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -21382,16 +27107,13 @@ def patch_namespaced_secret_with_http_info(self, name, namespace, body, **kwargs local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_secret`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_secret`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_secret`") # noqa: E501 collection_formats = {} @@ -21403,18 +27125,18 @@ def patch_namespaced_secret_with_http_info(self, name, namespace, body, **kwargs path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -21424,15 +27146,25 @@ def patch_namespaced_secret_with_http_info(self, name, namespace, body, **kwargs body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Secret", + 201: "V1Secret", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/secrets/{name}', 'PATCH', path_params, @@ -21441,13 +27173,14 @@ def patch_namespaced_secret_with_http_info(self, name, namespace, body, **kwargs body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Secret', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_namespaced_service(self, name, namespace, body, **kwargs): # noqa: E501 """patch_namespaced_service # noqa: E501 @@ -21455,28 +27188,40 @@ def patch_namespaced_service(self, name, namespace, body, **kwargs): # noqa: E5 partially update the specified Service # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_service(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Service (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the Service (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Service + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Service """ kwargs['_return_http_data_only'] = True return self.patch_namespaced_service_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -21487,30 +27232,48 @@ def patch_namespaced_service_with_http_info(self, name, namespace, body, **kwarg partially update the specified Service # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_service_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Service (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the Service (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Service, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Service, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -21530,7 +27293,10 @@ def patch_namespaced_service_with_http_info(self, name, namespace, body, **kwarg 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -21543,16 +27309,13 @@ def patch_namespaced_service_with_http_info(self, name, namespace, body, **kwarg local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_service`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_service`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_service`") # noqa: E501 collection_formats = {} @@ -21564,18 +27327,18 @@ def patch_namespaced_service_with_http_info(self, name, namespace, body, **kwarg path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -21585,15 +27348,25 @@ def patch_namespaced_service_with_http_info(self, name, namespace, body, **kwarg body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Service", + 201: "V1Service", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/services/{name}', 'PATCH', path_params, @@ -21602,13 +27375,14 @@ def patch_namespaced_service_with_http_info(self, name, namespace, body, **kwarg body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Service', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_namespaced_service_account(self, name, namespace, body, **kwargs): # noqa: E501 """patch_namespaced_service_account # noqa: E501 @@ -21616,28 +27390,40 @@ def patch_namespaced_service_account(self, name, namespace, body, **kwargs): # partially update the specified ServiceAccount # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_service_account(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ServiceAccount (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the ServiceAccount (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ServiceAccount + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ServiceAccount """ kwargs['_return_http_data_only'] = True return self.patch_namespaced_service_account_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -21648,30 +27434,48 @@ def patch_namespaced_service_account_with_http_info(self, name, namespace, body, partially update the specified ServiceAccount # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_service_account_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ServiceAccount (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the ServiceAccount (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ServiceAccount, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ServiceAccount, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -21691,7 +27495,10 @@ def patch_namespaced_service_account_with_http_info(self, name, namespace, body, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -21704,16 +27511,13 @@ def patch_namespaced_service_account_with_http_info(self, name, namespace, body, local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_service_account`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_service_account`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_service_account`") # noqa: E501 collection_formats = {} @@ -21725,18 +27529,18 @@ def patch_namespaced_service_account_with_http_info(self, name, namespace, body, path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -21746,15 +27550,25 @@ def patch_namespaced_service_account_with_http_info(self, name, namespace, body, body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ServiceAccount", + 201: "V1ServiceAccount", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/serviceaccounts/{name}', 'PATCH', path_params, @@ -21763,13 +27577,14 @@ def patch_namespaced_service_account_with_http_info(self, name, namespace, body, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ServiceAccount', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_namespaced_service_status(self, name, namespace, body, **kwargs): # noqa: E501 """patch_namespaced_service_status # noqa: E501 @@ -21777,28 +27592,40 @@ def patch_namespaced_service_status(self, name, namespace, body, **kwargs): # n partially update status of the specified Service # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_service_status(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Service (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the Service (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Service + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Service """ kwargs['_return_http_data_only'] = True return self.patch_namespaced_service_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -21809,30 +27636,48 @@ def patch_namespaced_service_status_with_http_info(self, name, namespace, body, partially update status of the specified Service # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_service_status_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Service (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the Service (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Service, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Service, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -21852,7 +27697,10 @@ def patch_namespaced_service_status_with_http_info(self, name, namespace, body, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -21865,16 +27713,13 @@ def patch_namespaced_service_status_with_http_info(self, name, namespace, body, local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_service_status`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_service_status`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_service_status`") # noqa: E501 collection_formats = {} @@ -21886,18 +27731,18 @@ def patch_namespaced_service_status_with_http_info(self, name, namespace, body, path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -21907,15 +27752,25 @@ def patch_namespaced_service_status_with_http_info(self, name, namespace, body, body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Service", + 201: "V1Service", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/services/{name}/status', 'PATCH', path_params, @@ -21924,13 +27779,14 @@ def patch_namespaced_service_status_with_http_info(self, name, namespace, body, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Service', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_node(self, name, body, **kwargs): # noqa: E501 """patch_node # noqa: E501 @@ -21938,27 +27794,38 @@ def patch_node(self, name, body, **kwargs): # noqa: E501 partially update the specified Node # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_node(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Node (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the Node (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Node + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Node """ kwargs['_return_http_data_only'] = True return self.patch_node_with_http_info(name, body, **kwargs) # noqa: E501 @@ -21969,29 +27836,46 @@ def patch_node_with_http_info(self, name, body, **kwargs): # noqa: E501 partially update the specified Node # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_node_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Node (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the Node (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Node, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Node, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -22010,7 +27894,10 @@ def patch_node_with_http_info(self, name, body, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -22023,12 +27910,10 @@ def patch_node_with_http_info(self, name, body, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_node`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_node`") # noqa: E501 collection_formats = {} @@ -22038,18 +27923,18 @@ def patch_node_with_http_info(self, name, body, **kwargs): # noqa: E501 path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -22059,15 +27944,25 @@ def patch_node_with_http_info(self, name, body, **kwargs): # noqa: E501 body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Node", + 201: "V1Node", + 401: None, + } + return self.api_client.call_api( '/api/v1/nodes/{name}', 'PATCH', path_params, @@ -22076,13 +27971,14 @@ def patch_node_with_http_info(self, name, body, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Node', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_node_status(self, name, body, **kwargs): # noqa: E501 """patch_node_status # noqa: E501 @@ -22090,27 +27986,38 @@ def patch_node_status(self, name, body, **kwargs): # noqa: E501 partially update status of the specified Node # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_node_status(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Node (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the Node (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Node + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Node """ kwargs['_return_http_data_only'] = True return self.patch_node_status_with_http_info(name, body, **kwargs) # noqa: E501 @@ -22121,29 +28028,46 @@ def patch_node_status_with_http_info(self, name, body, **kwargs): # noqa: E501 partially update status of the specified Node # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_node_status_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Node (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the Node (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Node, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Node, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -22162,7 +28086,10 @@ def patch_node_status_with_http_info(self, name, body, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -22175,12 +28102,10 @@ def patch_node_status_with_http_info(self, name, body, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_node_status`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_node_status`") # noqa: E501 collection_formats = {} @@ -22190,18 +28115,18 @@ def patch_node_status_with_http_info(self, name, body, **kwargs): # noqa: E501 path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -22211,15 +28136,25 @@ def patch_node_status_with_http_info(self, name, body, **kwargs): # noqa: E501 body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Node", + 201: "V1Node", + 401: None, + } + return self.api_client.call_api( '/api/v1/nodes/{name}/status', 'PATCH', path_params, @@ -22228,13 +28163,14 @@ def patch_node_status_with_http_info(self, name, body, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Node', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_persistent_volume(self, name, body, **kwargs): # noqa: E501 """patch_persistent_volume # noqa: E501 @@ -22242,27 +28178,38 @@ def patch_persistent_volume(self, name, body, **kwargs): # noqa: E501 partially update the specified PersistentVolume # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_persistent_volume(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PersistentVolume (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the PersistentVolume (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1PersistentVolume + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1PersistentVolume """ kwargs['_return_http_data_only'] = True return self.patch_persistent_volume_with_http_info(name, body, **kwargs) # noqa: E501 @@ -22273,29 +28220,46 @@ def patch_persistent_volume_with_http_info(self, name, body, **kwargs): # noqa: partially update the specified PersistentVolume # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_persistent_volume_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PersistentVolume (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the PersistentVolume (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1PersistentVolume, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1PersistentVolume, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -22314,7 +28278,10 @@ def patch_persistent_volume_with_http_info(self, name, body, **kwargs): # noqa: 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -22327,12 +28294,10 @@ def patch_persistent_volume_with_http_info(self, name, body, **kwargs): # noqa: local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_persistent_volume`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_persistent_volume`") # noqa: E501 collection_formats = {} @@ -22342,18 +28307,18 @@ def patch_persistent_volume_with_http_info(self, name, body, **kwargs): # noqa: path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -22363,15 +28328,25 @@ def patch_persistent_volume_with_http_info(self, name, body, **kwargs): # noqa: body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1PersistentVolume", + 201: "V1PersistentVolume", + 401: None, + } + return self.api_client.call_api( '/api/v1/persistentvolumes/{name}', 'PATCH', path_params, @@ -22380,13 +28355,14 @@ def patch_persistent_volume_with_http_info(self, name, body, **kwargs): # noqa: body=body_params, post_params=form_params, files=local_var_files, - response_type='V1PersistentVolume', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_persistent_volume_status(self, name, body, **kwargs): # noqa: E501 """patch_persistent_volume_status # noqa: E501 @@ -22394,27 +28370,38 @@ def patch_persistent_volume_status(self, name, body, **kwargs): # noqa: E501 partially update status of the specified PersistentVolume # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_persistent_volume_status(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PersistentVolume (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the PersistentVolume (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1PersistentVolume + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1PersistentVolume """ kwargs['_return_http_data_only'] = True return self.patch_persistent_volume_status_with_http_info(name, body, **kwargs) # noqa: E501 @@ -22425,29 +28412,46 @@ def patch_persistent_volume_status_with_http_info(self, name, body, **kwargs): partially update status of the specified PersistentVolume # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_persistent_volume_status_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PersistentVolume (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the PersistentVolume (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1PersistentVolume, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1PersistentVolume, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -22466,7 +28470,10 @@ def patch_persistent_volume_status_with_http_info(self, name, body, **kwargs): 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -22479,12 +28486,10 @@ def patch_persistent_volume_status_with_http_info(self, name, body, **kwargs): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_persistent_volume_status`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_persistent_volume_status`") # noqa: E501 collection_formats = {} @@ -22494,18 +28499,18 @@ def patch_persistent_volume_status_with_http_info(self, name, body, **kwargs): path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -22515,15 +28520,25 @@ def patch_persistent_volume_status_with_http_info(self, name, body, **kwargs): body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1PersistentVolume", + 201: "V1PersistentVolume", + 401: None, + } + return self.api_client.call_api( '/api/v1/persistentvolumes/{name}/status', 'PATCH', path_params, @@ -22532,13 +28547,14 @@ def patch_persistent_volume_status_with_http_info(self, name, body, **kwargs): body=body_params, post_params=form_params, files=local_var_files, - response_type='V1PersistentVolume', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_component_status(self, name, **kwargs): # noqa: E501 """read_component_status # noqa: E501 @@ -22546,22 +28562,28 @@ def read_component_status(self, name, **kwargs): # noqa: E501 read the specified ComponentStatus # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_component_status(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ComponentStatus (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the ComponentStatus (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ComponentStatus + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ComponentStatus """ kwargs['_return_http_data_only'] = True return self.read_component_status_with_http_info(name, **kwargs) # noqa: E501 @@ -22572,24 +28594,36 @@ def read_component_status_with_http_info(self, name, **kwargs): # noqa: E501 read the specified ComponentStatus # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_component_status_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ComponentStatus (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the ComponentStatus (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ComponentStatus, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ComponentStatus, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -22603,7 +28637,10 @@ def read_component_status_with_http_info(self, name, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -22616,8 +28653,7 @@ def read_component_status_with_http_info(self, name, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_component_status`") # noqa: E501 collection_formats = {} @@ -22627,10 +28663,10 @@ def read_component_status_with_http_info(self, name, **kwargs): # noqa: E501 path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -22638,11 +28674,16 @@ def read_component_status_with_http_info(self, name, **kwargs): # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ComponentStatus", + 401: None, + } + return self.api_client.call_api( '/api/v1/componentstatuses/{name}', 'GET', path_params, @@ -22651,13 +28692,14 @@ def read_component_status_with_http_info(self, name, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ComponentStatus', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_namespace(self, name, **kwargs): # noqa: E501 """read_namespace # noqa: E501 @@ -22665,22 +28707,28 @@ def read_namespace(self, name, **kwargs): # noqa: E501 read the specified Namespace # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespace(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Namespace (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the Namespace (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Namespace + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Namespace """ kwargs['_return_http_data_only'] = True return self.read_namespace_with_http_info(name, **kwargs) # noqa: E501 @@ -22691,24 +28739,36 @@ def read_namespace_with_http_info(self, name, **kwargs): # noqa: E501 read the specified Namespace # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespace_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Namespace (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the Namespace (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Namespace, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Namespace, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -22722,7 +28782,10 @@ def read_namespace_with_http_info(self, name, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -22735,8 +28798,7 @@ def read_namespace_with_http_info(self, name, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_namespace`") # noqa: E501 collection_formats = {} @@ -22746,10 +28808,10 @@ def read_namespace_with_http_info(self, name, **kwargs): # noqa: E501 path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -22757,11 +28819,16 @@ def read_namespace_with_http_info(self, name, **kwargs): # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Namespace", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{name}', 'GET', path_params, @@ -22770,13 +28837,14 @@ def read_namespace_with_http_info(self, name, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Namespace', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_namespace_status(self, name, **kwargs): # noqa: E501 """read_namespace_status # noqa: E501 @@ -22784,22 +28852,28 @@ def read_namespace_status(self, name, **kwargs): # noqa: E501 read status of the specified Namespace # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespace_status(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Namespace (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the Namespace (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Namespace + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Namespace """ kwargs['_return_http_data_only'] = True return self.read_namespace_status_with_http_info(name, **kwargs) # noqa: E501 @@ -22810,24 +28884,36 @@ def read_namespace_status_with_http_info(self, name, **kwargs): # noqa: E501 read status of the specified Namespace # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespace_status_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Namespace (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the Namespace (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Namespace, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Namespace, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -22841,7 +28927,10 @@ def read_namespace_status_with_http_info(self, name, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -22854,8 +28943,7 @@ def read_namespace_status_with_http_info(self, name, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_namespace_status`") # noqa: E501 collection_formats = {} @@ -22865,10 +28953,10 @@ def read_namespace_status_with_http_info(self, name, **kwargs): # noqa: E501 path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -22876,11 +28964,16 @@ def read_namespace_status_with_http_info(self, name, **kwargs): # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Namespace", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{name}/status', 'GET', path_params, @@ -22889,13 +28982,14 @@ def read_namespace_status_with_http_info(self, name, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Namespace', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_namespaced_config_map(self, name, namespace, **kwargs): # noqa: E501 """read_namespaced_config_map # noqa: E501 @@ -22903,23 +28997,30 @@ def read_namespaced_config_map(self, name, namespace, **kwargs): # noqa: E501 read the specified ConfigMap # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_config_map(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ConfigMap (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the ConfigMap (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ConfigMap + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ConfigMap """ kwargs['_return_http_data_only'] = True return self.read_namespaced_config_map_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -22930,25 +29031,38 @@ def read_namespaced_config_map_with_http_info(self, name, namespace, **kwargs): read the specified ConfigMap # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_config_map_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ConfigMap (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the ConfigMap (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ConfigMap, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ConfigMap, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -22963,7 +29077,10 @@ def read_namespaced_config_map_with_http_info(self, name, namespace, **kwargs): 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -22976,12 +29093,10 @@ def read_namespaced_config_map_with_http_info(self, name, namespace, **kwargs): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_config_map`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_config_map`") # noqa: E501 collection_formats = {} @@ -22993,10 +29108,10 @@ def read_namespaced_config_map_with_http_info(self, name, namespace, **kwargs): path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -23004,11 +29119,16 @@ def read_namespaced_config_map_with_http_info(self, name, namespace, **kwargs): body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ConfigMap", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/configmaps/{name}', 'GET', path_params, @@ -23017,13 +29137,14 @@ def read_namespaced_config_map_with_http_info(self, name, namespace, **kwargs): body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ConfigMap', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_namespaced_endpoints(self, name, namespace, **kwargs): # noqa: E501 """read_namespaced_endpoints # noqa: E501 @@ -23031,23 +29152,30 @@ def read_namespaced_endpoints(self, name, namespace, **kwargs): # noqa: E501 read the specified Endpoints # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_endpoints(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Endpoints (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the Endpoints (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Endpoints + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Endpoints """ kwargs['_return_http_data_only'] = True return self.read_namespaced_endpoints_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -23058,25 +29186,38 @@ def read_namespaced_endpoints_with_http_info(self, name, namespace, **kwargs): read the specified Endpoints # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_endpoints_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Endpoints (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the Endpoints (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Endpoints, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Endpoints, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -23091,7 +29232,10 @@ def read_namespaced_endpoints_with_http_info(self, name, namespace, **kwargs): 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -23104,12 +29248,10 @@ def read_namespaced_endpoints_with_http_info(self, name, namespace, **kwargs): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_endpoints`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_endpoints`") # noqa: E501 collection_formats = {} @@ -23121,10 +29263,10 @@ def read_namespaced_endpoints_with_http_info(self, name, namespace, **kwargs): path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -23132,11 +29274,16 @@ def read_namespaced_endpoints_with_http_info(self, name, namespace, **kwargs): body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Endpoints", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/endpoints/{name}', 'GET', path_params, @@ -23145,13 +29292,14 @@ def read_namespaced_endpoints_with_http_info(self, name, namespace, **kwargs): body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Endpoints', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_namespaced_event(self, name, namespace, **kwargs): # noqa: E501 """read_namespaced_event # noqa: E501 @@ -23159,23 +29307,30 @@ def read_namespaced_event(self, name, namespace, **kwargs): # noqa: E501 read the specified Event # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_event(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Event (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the Event (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: CoreV1Event + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: CoreV1Event """ kwargs['_return_http_data_only'] = True return self.read_namespaced_event_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -23186,25 +29341,38 @@ def read_namespaced_event_with_http_info(self, name, namespace, **kwargs): # no read the specified Event # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_event_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Event (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the Event (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(CoreV1Event, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(CoreV1Event, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -23219,7 +29387,10 @@ def read_namespaced_event_with_http_info(self, name, namespace, **kwargs): # no 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -23232,12 +29403,10 @@ def read_namespaced_event_with_http_info(self, name, namespace, **kwargs): # no local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_event`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_event`") # noqa: E501 collection_formats = {} @@ -23249,10 +29418,10 @@ def read_namespaced_event_with_http_info(self, name, namespace, **kwargs): # no path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -23260,11 +29429,16 @@ def read_namespaced_event_with_http_info(self, name, namespace, **kwargs): # no body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "CoreV1Event", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/events/{name}', 'GET', path_params, @@ -23273,13 +29447,14 @@ def read_namespaced_event_with_http_info(self, name, namespace, **kwargs): # no body=body_params, post_params=form_params, files=local_var_files, - response_type='CoreV1Event', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_namespaced_limit_range(self, name, namespace, **kwargs): # noqa: E501 """read_namespaced_limit_range # noqa: E501 @@ -23287,23 +29462,30 @@ def read_namespaced_limit_range(self, name, namespace, **kwargs): # noqa: E501 read the specified LimitRange # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_limit_range(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the LimitRange (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the LimitRange (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1LimitRange + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1LimitRange """ kwargs['_return_http_data_only'] = True return self.read_namespaced_limit_range_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -23314,25 +29496,38 @@ def read_namespaced_limit_range_with_http_info(self, name, namespace, **kwargs): read the specified LimitRange # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_limit_range_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the LimitRange (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the LimitRange (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1LimitRange, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1LimitRange, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -23347,7 +29542,10 @@ def read_namespaced_limit_range_with_http_info(self, name, namespace, **kwargs): 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -23360,12 +29558,10 @@ def read_namespaced_limit_range_with_http_info(self, name, namespace, **kwargs): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_limit_range`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_limit_range`") # noqa: E501 collection_formats = {} @@ -23377,10 +29573,10 @@ def read_namespaced_limit_range_with_http_info(self, name, namespace, **kwargs): path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -23388,11 +29584,16 @@ def read_namespaced_limit_range_with_http_info(self, name, namespace, **kwargs): body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1LimitRange", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/limitranges/{name}', 'GET', path_params, @@ -23401,13 +29602,14 @@ def read_namespaced_limit_range_with_http_info(self, name, namespace, **kwargs): body=body_params, post_params=form_params, files=local_var_files, - response_type='V1LimitRange', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_namespaced_persistent_volume_claim(self, name, namespace, **kwargs): # noqa: E501 """read_namespaced_persistent_volume_claim # noqa: E501 @@ -23415,23 +29617,30 @@ def read_namespaced_persistent_volume_claim(self, name, namespace, **kwargs): # read the specified PersistentVolumeClaim # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_persistent_volume_claim(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PersistentVolumeClaim (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the PersistentVolumeClaim (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1PersistentVolumeClaim + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1PersistentVolumeClaim """ kwargs['_return_http_data_only'] = True return self.read_namespaced_persistent_volume_claim_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -23442,25 +29651,38 @@ def read_namespaced_persistent_volume_claim_with_http_info(self, name, namespace read the specified PersistentVolumeClaim # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_persistent_volume_claim_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PersistentVolumeClaim (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the PersistentVolumeClaim (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1PersistentVolumeClaim, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1PersistentVolumeClaim, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -23475,7 +29697,10 @@ def read_namespaced_persistent_volume_claim_with_http_info(self, name, namespace 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -23488,12 +29713,10 @@ def read_namespaced_persistent_volume_claim_with_http_info(self, name, namespace local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_persistent_volume_claim`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_persistent_volume_claim`") # noqa: E501 collection_formats = {} @@ -23505,10 +29728,10 @@ def read_namespaced_persistent_volume_claim_with_http_info(self, name, namespace path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -23516,11 +29739,16 @@ def read_namespaced_persistent_volume_claim_with_http_info(self, name, namespace body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1PersistentVolumeClaim", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}', 'GET', path_params, @@ -23529,13 +29757,14 @@ def read_namespaced_persistent_volume_claim_with_http_info(self, name, namespace body=body_params, post_params=form_params, files=local_var_files, - response_type='V1PersistentVolumeClaim', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_namespaced_persistent_volume_claim_status(self, name, namespace, **kwargs): # noqa: E501 """read_namespaced_persistent_volume_claim_status # noqa: E501 @@ -23543,23 +29772,30 @@ def read_namespaced_persistent_volume_claim_status(self, name, namespace, **kwar read status of the specified PersistentVolumeClaim # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_persistent_volume_claim_status(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PersistentVolumeClaim (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the PersistentVolumeClaim (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1PersistentVolumeClaim + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1PersistentVolumeClaim """ kwargs['_return_http_data_only'] = True return self.read_namespaced_persistent_volume_claim_status_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -23570,25 +29806,38 @@ def read_namespaced_persistent_volume_claim_status_with_http_info(self, name, na read status of the specified PersistentVolumeClaim # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_persistent_volume_claim_status_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PersistentVolumeClaim (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the PersistentVolumeClaim (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1PersistentVolumeClaim, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1PersistentVolumeClaim, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -23603,7 +29852,10 @@ def read_namespaced_persistent_volume_claim_status_with_http_info(self, name, na 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -23616,12 +29868,10 @@ def read_namespaced_persistent_volume_claim_status_with_http_info(self, name, na local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_persistent_volume_claim_status`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_persistent_volume_claim_status`") # noqa: E501 collection_formats = {} @@ -23633,10 +29883,10 @@ def read_namespaced_persistent_volume_claim_status_with_http_info(self, name, na path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -23644,11 +29894,16 @@ def read_namespaced_persistent_volume_claim_status_with_http_info(self, name, na body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1PersistentVolumeClaim", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status', 'GET', path_params, @@ -23657,13 +29912,14 @@ def read_namespaced_persistent_volume_claim_status_with_http_info(self, name, na body=body_params, post_params=form_params, files=local_var_files, - response_type='V1PersistentVolumeClaim', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_namespaced_pod(self, name, namespace, **kwargs): # noqa: E501 """read_namespaced_pod # noqa: E501 @@ -23671,23 +29927,30 @@ def read_namespaced_pod(self, name, namespace, **kwargs): # noqa: E501 read the specified Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_pod(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Pod (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the Pod (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Pod + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Pod """ kwargs['_return_http_data_only'] = True return self.read_namespaced_pod_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -23698,25 +29961,38 @@ def read_namespaced_pod_with_http_info(self, name, namespace, **kwargs): # noqa read the specified Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_pod_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Pod (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the Pod (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Pod, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Pod, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -23731,7 +30007,10 @@ def read_namespaced_pod_with_http_info(self, name, namespace, **kwargs): # noqa 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -23744,12 +30023,10 @@ def read_namespaced_pod_with_http_info(self, name, namespace, **kwargs): # noqa local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_pod`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_pod`") # noqa: E501 collection_formats = {} @@ -23761,10 +30038,10 @@ def read_namespaced_pod_with_http_info(self, name, namespace, **kwargs): # noqa path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -23772,11 +30049,16 @@ def read_namespaced_pod_with_http_info(self, name, namespace, **kwargs): # noqa body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Pod", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/pods/{name}', 'GET', path_params, @@ -23785,13 +30067,14 @@ def read_namespaced_pod_with_http_info(self, name, namespace, **kwargs): # noqa body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Pod', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_namespaced_pod_ephemeralcontainers(self, name, namespace, **kwargs): # noqa: E501 """read_namespaced_pod_ephemeralcontainers # noqa: E501 @@ -23799,23 +30082,30 @@ def read_namespaced_pod_ephemeralcontainers(self, name, namespace, **kwargs): # read ephemeralcontainers of the specified Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_pod_ephemeralcontainers(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Pod (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the Pod (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Pod + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Pod """ kwargs['_return_http_data_only'] = True return self.read_namespaced_pod_ephemeralcontainers_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -23826,25 +30116,38 @@ def read_namespaced_pod_ephemeralcontainers_with_http_info(self, name, namespace read ephemeralcontainers of the specified Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_pod_ephemeralcontainers_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Pod (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the Pod (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Pod, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Pod, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -23859,7 +30162,10 @@ def read_namespaced_pod_ephemeralcontainers_with_http_info(self, name, namespace 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -23872,12 +30178,10 @@ def read_namespaced_pod_ephemeralcontainers_with_http_info(self, name, namespace local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_pod_ephemeralcontainers`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_pod_ephemeralcontainers`") # noqa: E501 collection_formats = {} @@ -23889,10 +30193,10 @@ def read_namespaced_pod_ephemeralcontainers_with_http_info(self, name, namespace path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -23900,11 +30204,16 @@ def read_namespaced_pod_ephemeralcontainers_with_http_info(self, name, namespace body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Pod", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/pods/{name}/ephemeralcontainers', 'GET', path_params, @@ -23913,13 +30222,14 @@ def read_namespaced_pod_ephemeralcontainers_with_http_info(self, name, namespace body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Pod', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_namespaced_pod_log(self, name, namespace, **kwargs): # noqa: E501 """read_namespaced_pod_log # noqa: E501 @@ -23927,31 +30237,48 @@ def read_namespaced_pod_log(self, name, namespace, **kwargs): # noqa: E501 read log of the specified Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_pod_log(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Pod (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str container: The container for which to stream logs. Defaults to only container if there is one container in the pod. - :param bool follow: Follow the log stream of the pod. Defaults to false. - :param bool insecure_skip_tls_verify_backend: insecureSkipTLSVerifyBackend indicates that the apiserver should not confirm the validity of the serving certificate of the backend it is connecting to. This will make the HTTPS connection between the apiserver and the backend insecure. This means the apiserver cannot verify the log data it is receiving came from the real kubelet. If the kubelet is configured to verify the apiserver's TLS credentials, it does not mean the connection to the real kubelet is vulnerable to a man in the middle attack (e.g. an attacker could not intercept the actual log data coming from the real kubelet). - :param int limit_bytes: If set, the number of bytes to read from the server before terminating the log output. This may not display a complete final line of logging, and may return slightly more or slightly less than the specified limit. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool previous: Return previous terminated container logs. Defaults to false. - :param int since_seconds: A relative time in seconds before the current time from which to show logs. If this value precedes the time a pod was started, only logs since the pod start will be returned. If this value is in the future, no logs will be returned. Only one of sinceSeconds or sinceTime may be specified. - :param int tail_lines: If set, the number of lines from the end of the logs to show. If not specified, logs are shown from the creation of the container or sinceSeconds or sinceTime - :param bool timestamps: If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line of log output. Defaults to false. + :param name: name of the Pod (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param container: The container for which to stream logs. Defaults to only container if there is one container in the pod. + :type container: str + :param follow: Follow the log stream of the pod. Defaults to false. + :type follow: bool + :param insecure_skip_tls_verify_backend: insecureSkipTLSVerifyBackend indicates that the apiserver should not confirm the validity of the serving certificate of the backend it is connecting to. This will make the HTTPS connection between the apiserver and the backend insecure. This means the apiserver cannot verify the log data it is receiving came from the real kubelet. If the kubelet is configured to verify the apiserver's TLS credentials, it does not mean the connection to the real kubelet is vulnerable to a man in the middle attack (e.g. an attacker could not intercept the actual log data coming from the real kubelet). + :type insecure_skip_tls_verify_backend: bool + :param limit_bytes: If set, the number of bytes to read from the server before terminating the log output. This may not display a complete final line of logging, and may return slightly more or slightly less than the specified limit. + :type limit_bytes: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param previous: Return previous terminated container logs. Defaults to false. + :type previous: bool + :param since_seconds: A relative time in seconds before the current time from which to show logs. If this value precedes the time a pod was started, only logs since the pod start will be returned. If this value is in the future, no logs will be returned. Only one of sinceSeconds or sinceTime may be specified. + :type since_seconds: int + :param stream: Specify which container log stream to return to the client. Acceptable values are \"All\", \"Stdout\" and \"Stderr\". If not specified, \"All\" is used, and both stdout and stderr are returned interleaved. Note that when \"TailLines\" is specified, \"Stream\" can only be set to nil or \"All\". + :type stream: str + :param tail_lines: If set, the number of lines from the end of the logs to show. If not specified, logs are shown from the creation of the container or sinceSeconds or sinceTime. Note that when \"TailLines\" is specified, \"Stream\" can only be set to nil or \"All\". + :type tail_lines: int + :param timestamps: If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line of log output. Defaults to false. + :type timestamps: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: str + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: str """ kwargs['_return_http_data_only'] = True return self.read_namespaced_pod_log_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -23962,33 +30289,238 @@ def read_namespaced_pod_log_with_http_info(self, name, namespace, **kwargs): # read log of the specified Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.read_namespaced_pod_log_with_http_info(name, namespace, async_req=True) + + >>> thread = api.read_namespaced_pod_log_with_http_info(name, namespace, async_req=True) + >>> result = thread.get() + + :param name: name of the Pod (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param container: The container for which to stream logs. Defaults to only container if there is one container in the pod. + :type container: str + :param follow: Follow the log stream of the pod. Defaults to false. + :type follow: bool + :param insecure_skip_tls_verify_backend: insecureSkipTLSVerifyBackend indicates that the apiserver should not confirm the validity of the serving certificate of the backend it is connecting to. This will make the HTTPS connection between the apiserver and the backend insecure. This means the apiserver cannot verify the log data it is receiving came from the real kubelet. If the kubelet is configured to verify the apiserver's TLS credentials, it does not mean the connection to the real kubelet is vulnerable to a man in the middle attack (e.g. an attacker could not intercept the actual log data coming from the real kubelet). + :type insecure_skip_tls_verify_backend: bool + :param limit_bytes: If set, the number of bytes to read from the server before terminating the log output. This may not display a complete final line of logging, and may return slightly more or slightly less than the specified limit. + :type limit_bytes: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param previous: Return previous terminated container logs. Defaults to false. + :type previous: bool + :param since_seconds: A relative time in seconds before the current time from which to show logs. If this value precedes the time a pod was started, only logs since the pod start will be returned. If this value is in the future, no logs will be returned. Only one of sinceSeconds or sinceTime may be specified. + :type since_seconds: int + :param stream: Specify which container log stream to return to the client. Acceptable values are \"All\", \"Stdout\" and \"Stderr\". If not specified, \"All\" is used, and both stdout and stderr are returned interleaved. Note that when \"TailLines\" is specified, \"Stream\" can only be set to nil or \"All\". + :type stream: str + :param tail_lines: If set, the number of lines from the end of the logs to show. If not specified, logs are shown from the creation of the container or sinceSeconds or sinceTime. Note that when \"TailLines\" is specified, \"Stream\" can only be set to nil or \"All\". + :type tail_lines: int + :param timestamps: If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line of log output. Defaults to false. + :type timestamps: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'namespace', + 'container', + 'follow', + 'insecure_skip_tls_verify_backend', + 'limit_bytes', + 'pretty', + 'previous', + 'since_seconds', + 'stream', + 'tail_lines', + 'timestamps' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method read_namespaced_pod_log" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_pod_log`") # noqa: E501 + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_pod_log`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('container') is not None: # noqa: E501 + query_params.append(('container', local_var_params['container'])) # noqa: E501 + if local_var_params.get('follow') is not None: # noqa: E501 + query_params.append(('follow', local_var_params['follow'])) # noqa: E501 + if local_var_params.get('insecure_skip_tls_verify_backend') is not None: # noqa: E501 + query_params.append(('insecureSkipTLSVerifyBackend', local_var_params['insecure_skip_tls_verify_backend'])) # noqa: E501 + if local_var_params.get('limit_bytes') is not None: # noqa: E501 + query_params.append(('limitBytes', local_var_params['limit_bytes'])) # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('previous') is not None: # noqa: E501 + query_params.append(('previous', local_var_params['previous'])) # noqa: E501 + if local_var_params.get('since_seconds') is not None: # noqa: E501 + query_params.append(('sinceSeconds', local_var_params['since_seconds'])) # noqa: E501 + if local_var_params.get('stream') is not None: # noqa: E501 + query_params.append(('stream', local_var_params['stream'])) # noqa: E501 + if local_var_params.get('tail_lines') is not None: # noqa: E501 + query_params.append(('tailLines', local_var_params['tail_lines'])) # noqa: E501 + if local_var_params.get('timestamps') is not None: # noqa: E501 + query_params.append(('timestamps', local_var_params['timestamps'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['text/plain', 'application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "str", + 401: None, + } + + return self.api_client.call_api( + '/api/v1/namespaces/{namespace}/pods/{name}/log', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def read_namespaced_pod_resize(self, name, namespace, **kwargs): # noqa: E501 + """read_namespaced_pod_resize # noqa: E501 + + read resize of the specified Pod # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.read_namespaced_pod_resize(name, namespace, async_req=True) + >>> result = thread.get() + + :param name: name of the Pod (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1Pod + """ + kwargs['_return_http_data_only'] = True + return self.read_namespaced_pod_resize_with_http_info(name, namespace, **kwargs) # noqa: E501 + + def read_namespaced_pod_resize_with_http_info(self, name, namespace, **kwargs): # noqa: E501 + """read_namespaced_pod_resize # noqa: E501 + + read resize of the specified Pod # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.read_namespaced_pod_resize_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Pod (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str container: The container for which to stream logs. Defaults to only container if there is one container in the pod. - :param bool follow: Follow the log stream of the pod. Defaults to false. - :param bool insecure_skip_tls_verify_backend: insecureSkipTLSVerifyBackend indicates that the apiserver should not confirm the validity of the serving certificate of the backend it is connecting to. This will make the HTTPS connection between the apiserver and the backend insecure. This means the apiserver cannot verify the log data it is receiving came from the real kubelet. If the kubelet is configured to verify the apiserver's TLS credentials, it does not mean the connection to the real kubelet is vulnerable to a man in the middle attack (e.g. an attacker could not intercept the actual log data coming from the real kubelet). - :param int limit_bytes: If set, the number of bytes to read from the server before terminating the log output. This may not display a complete final line of logging, and may return slightly more or slightly less than the specified limit. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool previous: Return previous terminated container logs. Defaults to false. - :param int since_seconds: A relative time in seconds before the current time from which to show logs. If this value precedes the time a pod was started, only logs since the pod start will be returned. If this value is in the future, no logs will be returned. Only one of sinceSeconds or sinceTime may be specified. - :param int tail_lines: If set, the number of lines from the end of the logs to show. If not specified, logs are shown from the creation of the container or sinceSeconds or sinceTime - :param bool timestamps: If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line of log output. Defaults to false. + :param name: name of the Pod (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Pod, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -23996,22 +30528,17 @@ def read_namespaced_pod_log_with_http_info(self, name, namespace, **kwargs): # all_params = [ 'name', 'namespace', - 'container', - 'follow', - 'insecure_skip_tls_verify_backend', - 'limit_bytes', - 'pretty', - 'previous', - 'since_seconds', - 'tail_lines', - 'timestamps' + 'pretty' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -24019,18 +30546,16 @@ def read_namespaced_pod_log_with_http_info(self, name, namespace, **kwargs): # if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method read_namespaced_pod_log" % key + " to method read_namespaced_pod_resize" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_pod_log`") # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_pod_resize`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_pod_log`") # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_pod_resize`") # noqa: E501 collection_formats = {} @@ -24041,26 +30566,10 @@ def read_namespaced_pod_log_with_http_info(self, name, namespace, **kwargs): # path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'container' in local_var_params and local_var_params['container'] is not None: # noqa: E501 - query_params.append(('container', local_var_params['container'])) # noqa: E501 - if 'follow' in local_var_params and local_var_params['follow'] is not None: # noqa: E501 - query_params.append(('follow', local_var_params['follow'])) # noqa: E501 - if 'insecure_skip_tls_verify_backend' in local_var_params and local_var_params['insecure_skip_tls_verify_backend'] is not None: # noqa: E501 - query_params.append(('insecureSkipTLSVerifyBackend', local_var_params['insecure_skip_tls_verify_backend'])) # noqa: E501 - if 'limit_bytes' in local_var_params and local_var_params['limit_bytes'] is not None: # noqa: E501 - query_params.append(('limitBytes', local_var_params['limit_bytes'])) # noqa: E501 - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'previous' in local_var_params and local_var_params['previous'] is not None: # noqa: E501 - query_params.append(('previous', local_var_params['previous'])) # noqa: E501 - if 'since_seconds' in local_var_params and local_var_params['since_seconds'] is not None: # noqa: E501 - query_params.append(('sinceSeconds', local_var_params['since_seconds'])) # noqa: E501 - if 'tail_lines' in local_var_params and local_var_params['tail_lines'] is not None: # noqa: E501 - query_params.append(('tailLines', local_var_params['tail_lines'])) # noqa: E501 - if 'timestamps' in local_var_params and local_var_params['timestamps'] is not None: # noqa: E501 - query_params.append(('timestamps', local_var_params['timestamps'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -24068,26 +30577,32 @@ def read_namespaced_pod_log_with_http_info(self, name, namespace, **kwargs): # body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['text/plain', 'application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Pod", + 401: None, + } + return self.api_client.call_api( - '/api/v1/namespaces/{namespace}/pods/{name}/log', 'GET', + '/api/v1/namespaces/{namespace}/pods/{name}/resize', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='str', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_namespaced_pod_status(self, name, namespace, **kwargs): # noqa: E501 """read_namespaced_pod_status # noqa: E501 @@ -24095,23 +30610,30 @@ def read_namespaced_pod_status(self, name, namespace, **kwargs): # noqa: E501 read status of the specified Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_pod_status(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Pod (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the Pod (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Pod + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Pod """ kwargs['_return_http_data_only'] = True return self.read_namespaced_pod_status_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -24122,25 +30644,38 @@ def read_namespaced_pod_status_with_http_info(self, name, namespace, **kwargs): read status of the specified Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_pod_status_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Pod (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the Pod (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Pod, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Pod, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -24155,7 +30690,10 @@ def read_namespaced_pod_status_with_http_info(self, name, namespace, **kwargs): 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -24168,12 +30706,10 @@ def read_namespaced_pod_status_with_http_info(self, name, namespace, **kwargs): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_pod_status`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_pod_status`") # noqa: E501 collection_formats = {} @@ -24185,10 +30721,10 @@ def read_namespaced_pod_status_with_http_info(self, name, namespace, **kwargs): path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -24196,11 +30732,16 @@ def read_namespaced_pod_status_with_http_info(self, name, namespace, **kwargs): body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Pod", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/pods/{name}/status', 'GET', path_params, @@ -24209,13 +30750,14 @@ def read_namespaced_pod_status_with_http_info(self, name, namespace, **kwargs): body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Pod', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_namespaced_pod_template(self, name, namespace, **kwargs): # noqa: E501 """read_namespaced_pod_template # noqa: E501 @@ -24223,23 +30765,30 @@ def read_namespaced_pod_template(self, name, namespace, **kwargs): # noqa: E501 read the specified PodTemplate # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_pod_template(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PodTemplate (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the PodTemplate (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1PodTemplate + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1PodTemplate """ kwargs['_return_http_data_only'] = True return self.read_namespaced_pod_template_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -24250,25 +30799,38 @@ def read_namespaced_pod_template_with_http_info(self, name, namespace, **kwargs) read the specified PodTemplate # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_pod_template_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PodTemplate (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the PodTemplate (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1PodTemplate, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1PodTemplate, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -24283,7 +30845,10 @@ def read_namespaced_pod_template_with_http_info(self, name, namespace, **kwargs) 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -24296,12 +30861,10 @@ def read_namespaced_pod_template_with_http_info(self, name, namespace, **kwargs) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_pod_template`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_pod_template`") # noqa: E501 collection_formats = {} @@ -24313,10 +30876,10 @@ def read_namespaced_pod_template_with_http_info(self, name, namespace, **kwargs) path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -24324,11 +30887,16 @@ def read_namespaced_pod_template_with_http_info(self, name, namespace, **kwargs) body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1PodTemplate", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/podtemplates/{name}', 'GET', path_params, @@ -24337,13 +30905,14 @@ def read_namespaced_pod_template_with_http_info(self, name, namespace, **kwargs) body=body_params, post_params=form_params, files=local_var_files, - response_type='V1PodTemplate', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_namespaced_replication_controller(self, name, namespace, **kwargs): # noqa: E501 """read_namespaced_replication_controller # noqa: E501 @@ -24351,23 +30920,30 @@ def read_namespaced_replication_controller(self, name, namespace, **kwargs): # read the specified ReplicationController # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_replication_controller(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ReplicationController (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the ReplicationController (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ReplicationController + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ReplicationController """ kwargs['_return_http_data_only'] = True return self.read_namespaced_replication_controller_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -24378,25 +30954,38 @@ def read_namespaced_replication_controller_with_http_info(self, name, namespace, read the specified ReplicationController # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_replication_controller_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ReplicationController (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the ReplicationController (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ReplicationController, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ReplicationController, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -24411,7 +31000,10 @@ def read_namespaced_replication_controller_with_http_info(self, name, namespace, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -24424,12 +31016,10 @@ def read_namespaced_replication_controller_with_http_info(self, name, namespace, local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_replication_controller`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_replication_controller`") # noqa: E501 collection_formats = {} @@ -24441,10 +31031,10 @@ def read_namespaced_replication_controller_with_http_info(self, name, namespace, path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -24452,11 +31042,16 @@ def read_namespaced_replication_controller_with_http_info(self, name, namespace, body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ReplicationController", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}', 'GET', path_params, @@ -24465,13 +31060,14 @@ def read_namespaced_replication_controller_with_http_info(self, name, namespace, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ReplicationController', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_namespaced_replication_controller_scale(self, name, namespace, **kwargs): # noqa: E501 """read_namespaced_replication_controller_scale # noqa: E501 @@ -24479,23 +31075,30 @@ def read_namespaced_replication_controller_scale(self, name, namespace, **kwargs read scale of the specified ReplicationController # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_replication_controller_scale(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Scale (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the Scale (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Scale + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Scale """ kwargs['_return_http_data_only'] = True return self.read_namespaced_replication_controller_scale_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -24506,25 +31109,38 @@ def read_namespaced_replication_controller_scale_with_http_info(self, name, name read scale of the specified ReplicationController # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_replication_controller_scale_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Scale (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the Scale (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Scale, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Scale, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -24539,7 +31155,10 @@ def read_namespaced_replication_controller_scale_with_http_info(self, name, name 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -24552,12 +31171,10 @@ def read_namespaced_replication_controller_scale_with_http_info(self, name, name local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_replication_controller_scale`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_replication_controller_scale`") # noqa: E501 collection_formats = {} @@ -24569,10 +31186,10 @@ def read_namespaced_replication_controller_scale_with_http_info(self, name, name path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -24580,11 +31197,16 @@ def read_namespaced_replication_controller_scale_with_http_info(self, name, name body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Scale", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/scale', 'GET', path_params, @@ -24593,13 +31215,14 @@ def read_namespaced_replication_controller_scale_with_http_info(self, name, name body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Scale', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_namespaced_replication_controller_status(self, name, namespace, **kwargs): # noqa: E501 """read_namespaced_replication_controller_status # noqa: E501 @@ -24607,23 +31230,30 @@ def read_namespaced_replication_controller_status(self, name, namespace, **kwarg read status of the specified ReplicationController # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_replication_controller_status(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ReplicationController (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the ReplicationController (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ReplicationController + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ReplicationController """ kwargs['_return_http_data_only'] = True return self.read_namespaced_replication_controller_status_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -24634,25 +31264,38 @@ def read_namespaced_replication_controller_status_with_http_info(self, name, nam read status of the specified ReplicationController # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_replication_controller_status_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ReplicationController (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the ReplicationController (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ReplicationController, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ReplicationController, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -24667,7 +31310,10 @@ def read_namespaced_replication_controller_status_with_http_info(self, name, nam 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -24680,12 +31326,10 @@ def read_namespaced_replication_controller_status_with_http_info(self, name, nam local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_replication_controller_status`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_replication_controller_status`") # noqa: E501 collection_formats = {} @@ -24697,10 +31341,10 @@ def read_namespaced_replication_controller_status_with_http_info(self, name, nam path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -24708,11 +31352,16 @@ def read_namespaced_replication_controller_status_with_http_info(self, name, nam body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ReplicationController", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/status', 'GET', path_params, @@ -24721,13 +31370,14 @@ def read_namespaced_replication_controller_status_with_http_info(self, name, nam body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ReplicationController', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_namespaced_resource_quota(self, name, namespace, **kwargs): # noqa: E501 """read_namespaced_resource_quota # noqa: E501 @@ -24735,23 +31385,30 @@ def read_namespaced_resource_quota(self, name, namespace, **kwargs): # noqa: E5 read the specified ResourceQuota # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_resource_quota(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ResourceQuota (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the ResourceQuota (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ResourceQuota + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ResourceQuota """ kwargs['_return_http_data_only'] = True return self.read_namespaced_resource_quota_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -24762,25 +31419,38 @@ def read_namespaced_resource_quota_with_http_info(self, name, namespace, **kwarg read the specified ResourceQuota # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_resource_quota_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ResourceQuota (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the ResourceQuota (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ResourceQuota, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ResourceQuota, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -24795,7 +31465,10 @@ def read_namespaced_resource_quota_with_http_info(self, name, namespace, **kwarg 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -24808,12 +31481,10 @@ def read_namespaced_resource_quota_with_http_info(self, name, namespace, **kwarg local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_resource_quota`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_resource_quota`") # noqa: E501 collection_formats = {} @@ -24825,10 +31496,10 @@ def read_namespaced_resource_quota_with_http_info(self, name, namespace, **kwarg path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -24836,11 +31507,16 @@ def read_namespaced_resource_quota_with_http_info(self, name, namespace, **kwarg body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ResourceQuota", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/resourcequotas/{name}', 'GET', path_params, @@ -24849,13 +31525,14 @@ def read_namespaced_resource_quota_with_http_info(self, name, namespace, **kwarg body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ResourceQuota', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_namespaced_resource_quota_status(self, name, namespace, **kwargs): # noqa: E501 """read_namespaced_resource_quota_status # noqa: E501 @@ -24863,23 +31540,30 @@ def read_namespaced_resource_quota_status(self, name, namespace, **kwargs): # n read status of the specified ResourceQuota # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_resource_quota_status(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ResourceQuota (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the ResourceQuota (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ResourceQuota + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ResourceQuota """ kwargs['_return_http_data_only'] = True return self.read_namespaced_resource_quota_status_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -24890,25 +31574,38 @@ def read_namespaced_resource_quota_status_with_http_info(self, name, namespace, read status of the specified ResourceQuota # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_resource_quota_status_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ResourceQuota (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the ResourceQuota (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ResourceQuota, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ResourceQuota, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -24923,7 +31620,10 @@ def read_namespaced_resource_quota_status_with_http_info(self, name, namespace, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -24936,12 +31636,10 @@ def read_namespaced_resource_quota_status_with_http_info(self, name, namespace, local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_resource_quota_status`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_resource_quota_status`") # noqa: E501 collection_formats = {} @@ -24953,10 +31651,10 @@ def read_namespaced_resource_quota_status_with_http_info(self, name, namespace, path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -24964,11 +31662,16 @@ def read_namespaced_resource_quota_status_with_http_info(self, name, namespace, body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ResourceQuota", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/resourcequotas/{name}/status', 'GET', path_params, @@ -24977,13 +31680,14 @@ def read_namespaced_resource_quota_status_with_http_info(self, name, namespace, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ResourceQuota', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_namespaced_secret(self, name, namespace, **kwargs): # noqa: E501 """read_namespaced_secret # noqa: E501 @@ -24991,23 +31695,30 @@ def read_namespaced_secret(self, name, namespace, **kwargs): # noqa: E501 read the specified Secret # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_secret(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Secret (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the Secret (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Secret + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Secret """ kwargs['_return_http_data_only'] = True return self.read_namespaced_secret_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -25018,25 +31729,38 @@ def read_namespaced_secret_with_http_info(self, name, namespace, **kwargs): # n read the specified Secret # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_secret_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Secret (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the Secret (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Secret, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Secret, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -25051,7 +31775,10 @@ def read_namespaced_secret_with_http_info(self, name, namespace, **kwargs): # n 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -25064,12 +31791,10 @@ def read_namespaced_secret_with_http_info(self, name, namespace, **kwargs): # n local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_secret`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_secret`") # noqa: E501 collection_formats = {} @@ -25081,10 +31806,10 @@ def read_namespaced_secret_with_http_info(self, name, namespace, **kwargs): # n path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -25092,11 +31817,16 @@ def read_namespaced_secret_with_http_info(self, name, namespace, **kwargs): # n body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Secret", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/secrets/{name}', 'GET', path_params, @@ -25105,13 +31835,14 @@ def read_namespaced_secret_with_http_info(self, name, namespace, **kwargs): # n body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Secret', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_namespaced_service(self, name, namespace, **kwargs): # noqa: E501 """read_namespaced_service # noqa: E501 @@ -25119,23 +31850,30 @@ def read_namespaced_service(self, name, namespace, **kwargs): # noqa: E501 read the specified Service # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_service(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Service (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the Service (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Service + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Service """ kwargs['_return_http_data_only'] = True return self.read_namespaced_service_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -25146,25 +31884,38 @@ def read_namespaced_service_with_http_info(self, name, namespace, **kwargs): # read the specified Service # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_service_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Service (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the Service (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Service, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Service, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -25179,7 +31930,10 @@ def read_namespaced_service_with_http_info(self, name, namespace, **kwargs): # 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -25192,12 +31946,10 @@ def read_namespaced_service_with_http_info(self, name, namespace, **kwargs): # local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_service`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_service`") # noqa: E501 collection_formats = {} @@ -25209,10 +31961,10 @@ def read_namespaced_service_with_http_info(self, name, namespace, **kwargs): # path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -25220,11 +31972,16 @@ def read_namespaced_service_with_http_info(self, name, namespace, **kwargs): # body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Service", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/services/{name}', 'GET', path_params, @@ -25233,13 +31990,14 @@ def read_namespaced_service_with_http_info(self, name, namespace, **kwargs): # body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Service', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_namespaced_service_account(self, name, namespace, **kwargs): # noqa: E501 """read_namespaced_service_account # noqa: E501 @@ -25247,23 +32005,30 @@ def read_namespaced_service_account(self, name, namespace, **kwargs): # noqa: E read the specified ServiceAccount # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_service_account(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ServiceAccount (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the ServiceAccount (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ServiceAccount + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ServiceAccount """ kwargs['_return_http_data_only'] = True return self.read_namespaced_service_account_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -25274,25 +32039,38 @@ def read_namespaced_service_account_with_http_info(self, name, namespace, **kwar read the specified ServiceAccount # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_service_account_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ServiceAccount (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the ServiceAccount (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ServiceAccount, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ServiceAccount, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -25307,7 +32085,10 @@ def read_namespaced_service_account_with_http_info(self, name, namespace, **kwar 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -25320,12 +32101,10 @@ def read_namespaced_service_account_with_http_info(self, name, namespace, **kwar local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_service_account`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_service_account`") # noqa: E501 collection_formats = {} @@ -25337,10 +32116,10 @@ def read_namespaced_service_account_with_http_info(self, name, namespace, **kwar path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -25348,11 +32127,16 @@ def read_namespaced_service_account_with_http_info(self, name, namespace, **kwar body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ServiceAccount", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/serviceaccounts/{name}', 'GET', path_params, @@ -25361,13 +32145,14 @@ def read_namespaced_service_account_with_http_info(self, name, namespace, **kwar body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ServiceAccount', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_namespaced_service_status(self, name, namespace, **kwargs): # noqa: E501 """read_namespaced_service_status # noqa: E501 @@ -25375,23 +32160,30 @@ def read_namespaced_service_status(self, name, namespace, **kwargs): # noqa: E5 read status of the specified Service # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_service_status(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Service (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the Service (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Service + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Service """ kwargs['_return_http_data_only'] = True return self.read_namespaced_service_status_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -25402,25 +32194,38 @@ def read_namespaced_service_status_with_http_info(self, name, namespace, **kwarg read status of the specified Service # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_service_status_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Service (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the Service (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Service, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Service, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -25435,7 +32240,10 @@ def read_namespaced_service_status_with_http_info(self, name, namespace, **kwarg 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -25448,12 +32256,10 @@ def read_namespaced_service_status_with_http_info(self, name, namespace, **kwarg local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_service_status`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_service_status`") # noqa: E501 collection_formats = {} @@ -25465,10 +32271,10 @@ def read_namespaced_service_status_with_http_info(self, name, namespace, **kwarg path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -25476,11 +32282,16 @@ def read_namespaced_service_status_with_http_info(self, name, namespace, **kwarg body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Service", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/services/{name}/status', 'GET', path_params, @@ -25489,13 +32300,14 @@ def read_namespaced_service_status_with_http_info(self, name, namespace, **kwarg body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Service', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_node(self, name, **kwargs): # noqa: E501 """read_node # noqa: E501 @@ -25503,22 +32315,28 @@ def read_node(self, name, **kwargs): # noqa: E501 read the specified Node # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_node(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Node (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the Node (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Node + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Node """ kwargs['_return_http_data_only'] = True return self.read_node_with_http_info(name, **kwargs) # noqa: E501 @@ -25529,24 +32347,36 @@ def read_node_with_http_info(self, name, **kwargs): # noqa: E501 read the specified Node # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_node_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Node (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the Node (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Node, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Node, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -25560,7 +32390,10 @@ def read_node_with_http_info(self, name, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -25573,8 +32406,7 @@ def read_node_with_http_info(self, name, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_node`") # noqa: E501 collection_formats = {} @@ -25584,10 +32416,10 @@ def read_node_with_http_info(self, name, **kwargs): # noqa: E501 path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -25595,11 +32427,16 @@ def read_node_with_http_info(self, name, **kwargs): # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Node", + 401: None, + } + return self.api_client.call_api( '/api/v1/nodes/{name}', 'GET', path_params, @@ -25608,13 +32445,14 @@ def read_node_with_http_info(self, name, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Node', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_node_status(self, name, **kwargs): # noqa: E501 """read_node_status # noqa: E501 @@ -25622,22 +32460,28 @@ def read_node_status(self, name, **kwargs): # noqa: E501 read status of the specified Node # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_node_status(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Node (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the Node (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Node + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Node """ kwargs['_return_http_data_only'] = True return self.read_node_status_with_http_info(name, **kwargs) # noqa: E501 @@ -25648,24 +32492,36 @@ def read_node_status_with_http_info(self, name, **kwargs): # noqa: E501 read status of the specified Node # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_node_status_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Node (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the Node (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Node, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Node, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -25679,7 +32535,10 @@ def read_node_status_with_http_info(self, name, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -25692,8 +32551,7 @@ def read_node_status_with_http_info(self, name, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_node_status`") # noqa: E501 collection_formats = {} @@ -25703,10 +32561,10 @@ def read_node_status_with_http_info(self, name, **kwargs): # noqa: E501 path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -25714,11 +32572,16 @@ def read_node_status_with_http_info(self, name, **kwargs): # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Node", + 401: None, + } + return self.api_client.call_api( '/api/v1/nodes/{name}/status', 'GET', path_params, @@ -25727,13 +32590,14 @@ def read_node_status_with_http_info(self, name, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Node', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_persistent_volume(self, name, **kwargs): # noqa: E501 """read_persistent_volume # noqa: E501 @@ -25741,22 +32605,28 @@ def read_persistent_volume(self, name, **kwargs): # noqa: E501 read the specified PersistentVolume # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_persistent_volume(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PersistentVolume (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the PersistentVolume (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1PersistentVolume + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1PersistentVolume """ kwargs['_return_http_data_only'] = True return self.read_persistent_volume_with_http_info(name, **kwargs) # noqa: E501 @@ -25767,24 +32637,36 @@ def read_persistent_volume_with_http_info(self, name, **kwargs): # noqa: E501 read the specified PersistentVolume # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_persistent_volume_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PersistentVolume (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the PersistentVolume (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1PersistentVolume, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1PersistentVolume, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -25798,7 +32680,10 @@ def read_persistent_volume_with_http_info(self, name, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -25811,8 +32696,7 @@ def read_persistent_volume_with_http_info(self, name, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_persistent_volume`") # noqa: E501 collection_formats = {} @@ -25822,10 +32706,10 @@ def read_persistent_volume_with_http_info(self, name, **kwargs): # noqa: E501 path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -25833,11 +32717,16 @@ def read_persistent_volume_with_http_info(self, name, **kwargs): # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1PersistentVolume", + 401: None, + } + return self.api_client.call_api( '/api/v1/persistentvolumes/{name}', 'GET', path_params, @@ -25846,13 +32735,14 @@ def read_persistent_volume_with_http_info(self, name, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1PersistentVolume', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_persistent_volume_status(self, name, **kwargs): # noqa: E501 """read_persistent_volume_status # noqa: E501 @@ -25860,22 +32750,28 @@ def read_persistent_volume_status(self, name, **kwargs): # noqa: E501 read status of the specified PersistentVolume # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_persistent_volume_status(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PersistentVolume (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the PersistentVolume (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1PersistentVolume + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1PersistentVolume """ kwargs['_return_http_data_only'] = True return self.read_persistent_volume_status_with_http_info(name, **kwargs) # noqa: E501 @@ -25886,24 +32782,36 @@ def read_persistent_volume_status_with_http_info(self, name, **kwargs): # noqa: read status of the specified PersistentVolume # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_persistent_volume_status_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PersistentVolume (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the PersistentVolume (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1PersistentVolume, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1PersistentVolume, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -25917,7 +32825,10 @@ def read_persistent_volume_status_with_http_info(self, name, **kwargs): # noqa: 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -25930,8 +32841,7 @@ def read_persistent_volume_status_with_http_info(self, name, **kwargs): # noqa: local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_persistent_volume_status`") # noqa: E501 collection_formats = {} @@ -25941,10 +32851,10 @@ def read_persistent_volume_status_with_http_info(self, name, **kwargs): # noqa: path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -25952,11 +32862,16 @@ def read_persistent_volume_status_with_http_info(self, name, **kwargs): # noqa: body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1PersistentVolume", + 401: None, + } + return self.api_client.call_api( '/api/v1/persistentvolumes/{name}/status', 'GET', path_params, @@ -25965,13 +32880,14 @@ def read_persistent_volume_status_with_http_info(self, name, **kwargs): # noqa: body=body_params, post_params=form_params, files=local_var_files, - response_type='V1PersistentVolume', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_namespace(self, name, body, **kwargs): # noqa: E501 """replace_namespace # noqa: E501 @@ -25979,26 +32895,36 @@ def replace_namespace(self, name, body, **kwargs): # noqa: E501 replace the specified Namespace # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespace(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Namespace (required) - :param V1Namespace body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the Namespace (required) + :type name: str + :param body: (required) + :type body: V1Namespace + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Namespace + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Namespace """ kwargs['_return_http_data_only'] = True return self.replace_namespace_with_http_info(name, body, **kwargs) # noqa: E501 @@ -26009,28 +32935,44 @@ def replace_namespace_with_http_info(self, name, body, **kwargs): # noqa: E501 replace the specified Namespace # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespace_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Namespace (required) - :param V1Namespace body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the Namespace (required) + :type name: str + :param body: (required) + :type body: V1Namespace + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Namespace, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Namespace, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -26048,7 +32990,10 @@ def replace_namespace_with_http_info(self, name, body, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -26061,12 +33006,10 @@ def replace_namespace_with_http_info(self, name, body, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_namespace`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_namespace`") # noqa: E501 collection_formats = {} @@ -26076,16 +33019,16 @@ def replace_namespace_with_http_info(self, name, body, **kwargs): # noqa: E501 path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -26095,11 +33038,17 @@ def replace_namespace_with_http_info(self, name, body, **kwargs): # noqa: E501 body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Namespace", + 201: "V1Namespace", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{name}', 'PUT', path_params, @@ -26108,13 +33057,14 @@ def replace_namespace_with_http_info(self, name, body, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Namespace', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_namespace_finalize(self, name, body, **kwargs): # noqa: E501 """replace_namespace_finalize # noqa: E501 @@ -26122,26 +33072,36 @@ def replace_namespace_finalize(self, name, body, **kwargs): # noqa: E501 replace finalize of the specified Namespace # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespace_finalize(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Namespace (required) - :param V1Namespace body: (required) - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the Namespace (required) + :type name: str + :param body: (required) + :type body: V1Namespace + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Namespace + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Namespace """ kwargs['_return_http_data_only'] = True return self.replace_namespace_finalize_with_http_info(name, body, **kwargs) # noqa: E501 @@ -26152,28 +33112,44 @@ def replace_namespace_finalize_with_http_info(self, name, body, **kwargs): # no replace finalize of the specified Namespace # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespace_finalize_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Namespace (required) - :param V1Namespace body: (required) - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the Namespace (required) + :type name: str + :param body: (required) + :type body: V1Namespace + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Namespace, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Namespace, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -26191,7 +33167,10 @@ def replace_namespace_finalize_with_http_info(self, name, body, **kwargs): # no 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -26204,12 +33183,10 @@ def replace_namespace_finalize_with_http_info(self, name, body, **kwargs): # no local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_namespace_finalize`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_namespace_finalize`") # noqa: E501 collection_formats = {} @@ -26219,16 +33196,16 @@ def replace_namespace_finalize_with_http_info(self, name, body, **kwargs): # no path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -26238,11 +33215,17 @@ def replace_namespace_finalize_with_http_info(self, name, body, **kwargs): # no body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Namespace", + 201: "V1Namespace", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{name}/finalize', 'PUT', path_params, @@ -26251,13 +33234,14 @@ def replace_namespace_finalize_with_http_info(self, name, body, **kwargs): # no body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Namespace', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_namespace_status(self, name, body, **kwargs): # noqa: E501 """replace_namespace_status # noqa: E501 @@ -26265,26 +33249,36 @@ def replace_namespace_status(self, name, body, **kwargs): # noqa: E501 replace status of the specified Namespace # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespace_status(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Namespace (required) - :param V1Namespace body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the Namespace (required) + :type name: str + :param body: (required) + :type body: V1Namespace + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Namespace + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Namespace """ kwargs['_return_http_data_only'] = True return self.replace_namespace_status_with_http_info(name, body, **kwargs) # noqa: E501 @@ -26295,28 +33289,44 @@ def replace_namespace_status_with_http_info(self, name, body, **kwargs): # noqa replace status of the specified Namespace # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespace_status_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Namespace (required) - :param V1Namespace body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the Namespace (required) + :type name: str + :param body: (required) + :type body: V1Namespace + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Namespace, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Namespace, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -26334,7 +33344,10 @@ def replace_namespace_status_with_http_info(self, name, body, **kwargs): # noqa 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -26347,12 +33360,10 @@ def replace_namespace_status_with_http_info(self, name, body, **kwargs): # noqa local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_namespace_status`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_namespace_status`") # noqa: E501 collection_formats = {} @@ -26362,16 +33373,16 @@ def replace_namespace_status_with_http_info(self, name, body, **kwargs): # noqa path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -26381,11 +33392,17 @@ def replace_namespace_status_with_http_info(self, name, body, **kwargs): # noqa body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Namespace", + 201: "V1Namespace", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{name}/status', 'PUT', path_params, @@ -26394,13 +33411,14 @@ def replace_namespace_status_with_http_info(self, name, body, **kwargs): # noqa body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Namespace', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_namespaced_config_map(self, name, namespace, body, **kwargs): # noqa: E501 """replace_namespaced_config_map # noqa: E501 @@ -26408,27 +33426,38 @@ def replace_namespaced_config_map(self, name, namespace, body, **kwargs): # noq replace the specified ConfigMap # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_config_map(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ConfigMap (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1ConfigMap body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the ConfigMap (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1ConfigMap + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ConfigMap + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ConfigMap """ kwargs['_return_http_data_only'] = True return self.replace_namespaced_config_map_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -26439,29 +33468,46 @@ def replace_namespaced_config_map_with_http_info(self, name, namespace, body, ** replace the specified ConfigMap # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_config_map_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ConfigMap (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1ConfigMap body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the ConfigMap (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1ConfigMap + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ConfigMap, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ConfigMap, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -26480,7 +33526,10 @@ def replace_namespaced_config_map_with_http_info(self, name, namespace, body, ** 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -26493,16 +33542,13 @@ def replace_namespaced_config_map_with_http_info(self, name, namespace, body, ** local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_config_map`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_config_map`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_config_map`") # noqa: E501 collection_formats = {} @@ -26514,16 +33560,16 @@ def replace_namespaced_config_map_with_http_info(self, name, namespace, body, ** path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -26533,11 +33579,17 @@ def replace_namespaced_config_map_with_http_info(self, name, namespace, body, ** body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ConfigMap", + 201: "V1ConfigMap", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/configmaps/{name}', 'PUT', path_params, @@ -26546,13 +33598,14 @@ def replace_namespaced_config_map_with_http_info(self, name, namespace, body, ** body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ConfigMap', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_namespaced_endpoints(self, name, namespace, body, **kwargs): # noqa: E501 """replace_namespaced_endpoints # noqa: E501 @@ -26560,27 +33613,38 @@ def replace_namespaced_endpoints(self, name, namespace, body, **kwargs): # noqa replace the specified Endpoints # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_endpoints(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Endpoints (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1Endpoints body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the Endpoints (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1Endpoints + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Endpoints + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Endpoints """ kwargs['_return_http_data_only'] = True return self.replace_namespaced_endpoints_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -26591,29 +33655,46 @@ def replace_namespaced_endpoints_with_http_info(self, name, namespace, body, **k replace the specified Endpoints # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_endpoints_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Endpoints (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1Endpoints body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the Endpoints (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1Endpoints + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Endpoints, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Endpoints, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -26632,7 +33713,10 @@ def replace_namespaced_endpoints_with_http_info(self, name, namespace, body, **k 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -26645,16 +33729,13 @@ def replace_namespaced_endpoints_with_http_info(self, name, namespace, body, **k local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_endpoints`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_endpoints`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_endpoints`") # noqa: E501 collection_formats = {} @@ -26666,16 +33747,16 @@ def replace_namespaced_endpoints_with_http_info(self, name, namespace, body, **k path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -26685,11 +33766,17 @@ def replace_namespaced_endpoints_with_http_info(self, name, namespace, body, **k body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Endpoints", + 201: "V1Endpoints", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/endpoints/{name}', 'PUT', path_params, @@ -26698,13 +33785,14 @@ def replace_namespaced_endpoints_with_http_info(self, name, namespace, body, **k body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Endpoints', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_namespaced_event(self, name, namespace, body, **kwargs): # noqa: E501 """replace_namespaced_event # noqa: E501 @@ -26712,27 +33800,38 @@ def replace_namespaced_event(self, name, namespace, body, **kwargs): # noqa: E5 replace the specified Event # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_event(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Event (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param CoreV1Event body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the Event (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: CoreV1Event + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: CoreV1Event + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: CoreV1Event """ kwargs['_return_http_data_only'] = True return self.replace_namespaced_event_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -26743,29 +33842,46 @@ def replace_namespaced_event_with_http_info(self, name, namespace, body, **kwarg replace the specified Event # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_event_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Event (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param CoreV1Event body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the Event (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: CoreV1Event + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(CoreV1Event, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(CoreV1Event, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -26784,7 +33900,10 @@ def replace_namespaced_event_with_http_info(self, name, namespace, body, **kwarg 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -26797,16 +33916,13 @@ def replace_namespaced_event_with_http_info(self, name, namespace, body, **kwarg local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_event`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_event`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_event`") # noqa: E501 collection_formats = {} @@ -26818,16 +33934,16 @@ def replace_namespaced_event_with_http_info(self, name, namespace, body, **kwarg path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -26837,11 +33953,17 @@ def replace_namespaced_event_with_http_info(self, name, namespace, body, **kwarg body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "CoreV1Event", + 201: "CoreV1Event", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/events/{name}', 'PUT', path_params, @@ -26850,13 +33972,14 @@ def replace_namespaced_event_with_http_info(self, name, namespace, body, **kwarg body=body_params, post_params=form_params, files=local_var_files, - response_type='CoreV1Event', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_namespaced_limit_range(self, name, namespace, body, **kwargs): # noqa: E501 """replace_namespaced_limit_range # noqa: E501 @@ -26864,27 +33987,38 @@ def replace_namespaced_limit_range(self, name, namespace, body, **kwargs): # no replace the specified LimitRange # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_limit_range(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the LimitRange (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1LimitRange body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the LimitRange (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1LimitRange + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1LimitRange + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1LimitRange """ kwargs['_return_http_data_only'] = True return self.replace_namespaced_limit_range_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -26895,29 +34029,46 @@ def replace_namespaced_limit_range_with_http_info(self, name, namespace, body, * replace the specified LimitRange # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_limit_range_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the LimitRange (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1LimitRange body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the LimitRange (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1LimitRange + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1LimitRange, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1LimitRange, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -26936,7 +34087,10 @@ def replace_namespaced_limit_range_with_http_info(self, name, namespace, body, * 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -26949,16 +34103,13 @@ def replace_namespaced_limit_range_with_http_info(self, name, namespace, body, * local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_limit_range`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_limit_range`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_limit_range`") # noqa: E501 collection_formats = {} @@ -26970,16 +34121,16 @@ def replace_namespaced_limit_range_with_http_info(self, name, namespace, body, * path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -26989,11 +34140,17 @@ def replace_namespaced_limit_range_with_http_info(self, name, namespace, body, * body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1LimitRange", + 201: "V1LimitRange", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/limitranges/{name}', 'PUT', path_params, @@ -27002,13 +34159,14 @@ def replace_namespaced_limit_range_with_http_info(self, name, namespace, body, * body=body_params, post_params=form_params, files=local_var_files, - response_type='V1LimitRange', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_namespaced_persistent_volume_claim(self, name, namespace, body, **kwargs): # noqa: E501 """replace_namespaced_persistent_volume_claim # noqa: E501 @@ -27016,27 +34174,38 @@ def replace_namespaced_persistent_volume_claim(self, name, namespace, body, **kw replace the specified PersistentVolumeClaim # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_persistent_volume_claim(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PersistentVolumeClaim (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1PersistentVolumeClaim body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the PersistentVolumeClaim (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1PersistentVolumeClaim + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1PersistentVolumeClaim + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1PersistentVolumeClaim """ kwargs['_return_http_data_only'] = True return self.replace_namespaced_persistent_volume_claim_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -27047,29 +34216,46 @@ def replace_namespaced_persistent_volume_claim_with_http_info(self, name, namesp replace the specified PersistentVolumeClaim # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_persistent_volume_claim_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PersistentVolumeClaim (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1PersistentVolumeClaim body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the PersistentVolumeClaim (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1PersistentVolumeClaim + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1PersistentVolumeClaim, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1PersistentVolumeClaim, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -27088,7 +34274,10 @@ def replace_namespaced_persistent_volume_claim_with_http_info(self, name, namesp 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -27101,16 +34290,13 @@ def replace_namespaced_persistent_volume_claim_with_http_info(self, name, namesp local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_persistent_volume_claim`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_persistent_volume_claim`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_persistent_volume_claim`") # noqa: E501 collection_formats = {} @@ -27122,16 +34308,16 @@ def replace_namespaced_persistent_volume_claim_with_http_info(self, name, namesp path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -27141,11 +34327,17 @@ def replace_namespaced_persistent_volume_claim_with_http_info(self, name, namesp body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1PersistentVolumeClaim", + 201: "V1PersistentVolumeClaim", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}', 'PUT', path_params, @@ -27154,13 +34346,14 @@ def replace_namespaced_persistent_volume_claim_with_http_info(self, name, namesp body=body_params, post_params=form_params, files=local_var_files, - response_type='V1PersistentVolumeClaim', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_namespaced_persistent_volume_claim_status(self, name, namespace, body, **kwargs): # noqa: E501 """replace_namespaced_persistent_volume_claim_status # noqa: E501 @@ -27168,27 +34361,38 @@ def replace_namespaced_persistent_volume_claim_status(self, name, namespace, bod replace status of the specified PersistentVolumeClaim # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_persistent_volume_claim_status(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PersistentVolumeClaim (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1PersistentVolumeClaim body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the PersistentVolumeClaim (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1PersistentVolumeClaim + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1PersistentVolumeClaim + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1PersistentVolumeClaim """ kwargs['_return_http_data_only'] = True return self.replace_namespaced_persistent_volume_claim_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -27199,29 +34403,46 @@ def replace_namespaced_persistent_volume_claim_status_with_http_info(self, name, replace status of the specified PersistentVolumeClaim # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_persistent_volume_claim_status_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PersistentVolumeClaim (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1PersistentVolumeClaim body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the PersistentVolumeClaim (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1PersistentVolumeClaim + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1PersistentVolumeClaim, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1PersistentVolumeClaim, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -27240,7 +34461,10 @@ def replace_namespaced_persistent_volume_claim_status_with_http_info(self, name, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -27253,16 +34477,13 @@ def replace_namespaced_persistent_volume_claim_status_with_http_info(self, name, local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_persistent_volume_claim_status`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_persistent_volume_claim_status`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_persistent_volume_claim_status`") # noqa: E501 collection_formats = {} @@ -27274,16 +34495,16 @@ def replace_namespaced_persistent_volume_claim_status_with_http_info(self, name, path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -27293,11 +34514,17 @@ def replace_namespaced_persistent_volume_claim_status_with_http_info(self, name, body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1PersistentVolumeClaim", + 201: "V1PersistentVolumeClaim", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status', 'PUT', path_params, @@ -27306,13 +34533,14 @@ def replace_namespaced_persistent_volume_claim_status_with_http_info(self, name, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1PersistentVolumeClaim', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_namespaced_pod(self, name, namespace, body, **kwargs): # noqa: E501 """replace_namespaced_pod # noqa: E501 @@ -27320,27 +34548,38 @@ def replace_namespaced_pod(self, name, namespace, body, **kwargs): # noqa: E501 replace the specified Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_pod(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Pod (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1Pod body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the Pod (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1Pod + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Pod + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Pod """ kwargs['_return_http_data_only'] = True return self.replace_namespaced_pod_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -27351,29 +34590,46 @@ def replace_namespaced_pod_with_http_info(self, name, namespace, body, **kwargs) replace the specified Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_pod_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Pod (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1Pod body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the Pod (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1Pod + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Pod, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Pod, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -27392,7 +34648,10 @@ def replace_namespaced_pod_with_http_info(self, name, namespace, body, **kwargs) 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -27405,16 +34664,13 @@ def replace_namespaced_pod_with_http_info(self, name, namespace, body, **kwargs) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_pod`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_pod`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_pod`") # noqa: E501 collection_formats = {} @@ -27426,16 +34682,16 @@ def replace_namespaced_pod_with_http_info(self, name, namespace, body, **kwargs) path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -27445,11 +34701,17 @@ def replace_namespaced_pod_with_http_info(self, name, namespace, body, **kwargs) body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Pod", + 201: "V1Pod", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/pods/{name}', 'PUT', path_params, @@ -27458,13 +34720,14 @@ def replace_namespaced_pod_with_http_info(self, name, namespace, body, **kwargs) body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Pod', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_namespaced_pod_ephemeralcontainers(self, name, namespace, body, **kwargs): # noqa: E501 """replace_namespaced_pod_ephemeralcontainers # noqa: E501 @@ -27472,27 +34735,38 @@ def replace_namespaced_pod_ephemeralcontainers(self, name, namespace, body, **kw replace ephemeralcontainers of the specified Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_pod_ephemeralcontainers(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Pod (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1Pod body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the Pod (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1Pod + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Pod + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Pod """ kwargs['_return_http_data_only'] = True return self.replace_namespaced_pod_ephemeralcontainers_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -27503,29 +34777,46 @@ def replace_namespaced_pod_ephemeralcontainers_with_http_info(self, name, namesp replace ephemeralcontainers of the specified Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_pod_ephemeralcontainers_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Pod (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1Pod body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the Pod (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1Pod + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Pod, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Pod, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -27544,7 +34835,10 @@ def replace_namespaced_pod_ephemeralcontainers_with_http_info(self, name, namesp 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -27557,16 +34851,13 @@ def replace_namespaced_pod_ephemeralcontainers_with_http_info(self, name, namesp local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_pod_ephemeralcontainers`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_pod_ephemeralcontainers`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_pod_ephemeralcontainers`") # noqa: E501 collection_formats = {} @@ -27578,16 +34869,16 @@ def replace_namespaced_pod_ephemeralcontainers_with_http_info(self, name, namesp path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -27597,11 +34888,17 @@ def replace_namespaced_pod_ephemeralcontainers_with_http_info(self, name, namesp body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Pod", + 201: "V1Pod", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/pods/{name}/ephemeralcontainers', 'PUT', path_params, @@ -27610,13 +34907,201 @@ def replace_namespaced_pod_ephemeralcontainers_with_http_info(self, name, namesp body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Pod', # noqa: E501 + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def replace_namespaced_pod_resize(self, name, namespace, body, **kwargs): # noqa: E501 + """replace_namespaced_pod_resize # noqa: E501 + + replace resize of the specified Pod # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.replace_namespaced_pod_resize(name, namespace, body, async_req=True) + >>> result = thread.get() + + :param name: name of the Pod (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1Pod + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1Pod + """ + kwargs['_return_http_data_only'] = True + return self.replace_namespaced_pod_resize_with_http_info(name, namespace, body, **kwargs) # noqa: E501 + + def replace_namespaced_pod_resize_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501 + """replace_namespaced_pod_resize # noqa: E501 + + replace resize of the specified Pod # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.replace_namespaced_pod_resize_with_http_info(name, namespace, body, async_req=True) + >>> result = thread.get() + + :param name: name of the Pod (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1Pod + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1Pod, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'namespace', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method replace_namespaced_pod_resize" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_pod_resize`") # noqa: E501 + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_pod_resize`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_pod_resize`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1Pod", + 201: "V1Pod", + 401: None, + } + + return self.api_client.call_api( + '/api/v1/namespaces/{namespace}/pods/{name}/resize', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_namespaced_pod_status(self, name, namespace, body, **kwargs): # noqa: E501 """replace_namespaced_pod_status # noqa: E501 @@ -27624,27 +35109,38 @@ def replace_namespaced_pod_status(self, name, namespace, body, **kwargs): # noq replace status of the specified Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_pod_status(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Pod (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1Pod body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the Pod (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1Pod + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Pod + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Pod """ kwargs['_return_http_data_only'] = True return self.replace_namespaced_pod_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -27655,29 +35151,46 @@ def replace_namespaced_pod_status_with_http_info(self, name, namespace, body, ** replace status of the specified Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_pod_status_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Pod (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1Pod body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the Pod (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1Pod + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Pod, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Pod, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -27696,7 +35209,10 @@ def replace_namespaced_pod_status_with_http_info(self, name, namespace, body, ** 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -27709,16 +35225,13 @@ def replace_namespaced_pod_status_with_http_info(self, name, namespace, body, ** local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_pod_status`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_pod_status`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_pod_status`") # noqa: E501 collection_formats = {} @@ -27730,16 +35243,16 @@ def replace_namespaced_pod_status_with_http_info(self, name, namespace, body, ** path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -27749,11 +35262,17 @@ def replace_namespaced_pod_status_with_http_info(self, name, namespace, body, ** body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Pod", + 201: "V1Pod", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/pods/{name}/status', 'PUT', path_params, @@ -27762,13 +35281,14 @@ def replace_namespaced_pod_status_with_http_info(self, name, namespace, body, ** body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Pod', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_namespaced_pod_template(self, name, namespace, body, **kwargs): # noqa: E501 """replace_namespaced_pod_template # noqa: E501 @@ -27776,27 +35296,38 @@ def replace_namespaced_pod_template(self, name, namespace, body, **kwargs): # n replace the specified PodTemplate # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_pod_template(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PodTemplate (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1PodTemplate body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the PodTemplate (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1PodTemplate + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1PodTemplate + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1PodTemplate """ kwargs['_return_http_data_only'] = True return self.replace_namespaced_pod_template_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -27807,29 +35338,46 @@ def replace_namespaced_pod_template_with_http_info(self, name, namespace, body, replace the specified PodTemplate # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_pod_template_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PodTemplate (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1PodTemplate body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the PodTemplate (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1PodTemplate + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1PodTemplate, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1PodTemplate, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -27848,7 +35396,10 @@ def replace_namespaced_pod_template_with_http_info(self, name, namespace, body, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -27861,16 +35412,13 @@ def replace_namespaced_pod_template_with_http_info(self, name, namespace, body, local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_pod_template`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_pod_template`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_pod_template`") # noqa: E501 collection_formats = {} @@ -27882,16 +35430,16 @@ def replace_namespaced_pod_template_with_http_info(self, name, namespace, body, path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -27901,11 +35449,17 @@ def replace_namespaced_pod_template_with_http_info(self, name, namespace, body, body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1PodTemplate", + 201: "V1PodTemplate", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/podtemplates/{name}', 'PUT', path_params, @@ -27914,13 +35468,14 @@ def replace_namespaced_pod_template_with_http_info(self, name, namespace, body, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1PodTemplate', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_namespaced_replication_controller(self, name, namespace, body, **kwargs): # noqa: E501 """replace_namespaced_replication_controller # noqa: E501 @@ -27928,27 +35483,38 @@ def replace_namespaced_replication_controller(self, name, namespace, body, **kwa replace the specified ReplicationController # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_replication_controller(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ReplicationController (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1ReplicationController body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the ReplicationController (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1ReplicationController + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ReplicationController + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ReplicationController """ kwargs['_return_http_data_only'] = True return self.replace_namespaced_replication_controller_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -27959,29 +35525,46 @@ def replace_namespaced_replication_controller_with_http_info(self, name, namespa replace the specified ReplicationController # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_replication_controller_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ReplicationController (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1ReplicationController body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the ReplicationController (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1ReplicationController + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ReplicationController, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ReplicationController, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -28000,7 +35583,10 @@ def replace_namespaced_replication_controller_with_http_info(self, name, namespa 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -28013,16 +35599,13 @@ def replace_namespaced_replication_controller_with_http_info(self, name, namespa local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_replication_controller`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_replication_controller`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_replication_controller`") # noqa: E501 collection_formats = {} @@ -28034,16 +35617,16 @@ def replace_namespaced_replication_controller_with_http_info(self, name, namespa path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -28053,11 +35636,17 @@ def replace_namespaced_replication_controller_with_http_info(self, name, namespa body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ReplicationController", + 201: "V1ReplicationController", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}', 'PUT', path_params, @@ -28066,13 +35655,14 @@ def replace_namespaced_replication_controller_with_http_info(self, name, namespa body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ReplicationController', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_namespaced_replication_controller_scale(self, name, namespace, body, **kwargs): # noqa: E501 """replace_namespaced_replication_controller_scale # noqa: E501 @@ -28080,27 +35670,38 @@ def replace_namespaced_replication_controller_scale(self, name, namespace, body, replace scale of the specified ReplicationController # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_replication_controller_scale(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Scale (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1Scale body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the Scale (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1Scale + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Scale + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Scale """ kwargs['_return_http_data_only'] = True return self.replace_namespaced_replication_controller_scale_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -28111,29 +35712,46 @@ def replace_namespaced_replication_controller_scale_with_http_info(self, name, n replace scale of the specified ReplicationController # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_replication_controller_scale_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Scale (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1Scale body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the Scale (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1Scale + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Scale, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Scale, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -28152,7 +35770,10 @@ def replace_namespaced_replication_controller_scale_with_http_info(self, name, n 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -28165,16 +35786,13 @@ def replace_namespaced_replication_controller_scale_with_http_info(self, name, n local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_replication_controller_scale`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_replication_controller_scale`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_replication_controller_scale`") # noqa: E501 collection_formats = {} @@ -28186,16 +35804,16 @@ def replace_namespaced_replication_controller_scale_with_http_info(self, name, n path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -28205,11 +35823,17 @@ def replace_namespaced_replication_controller_scale_with_http_info(self, name, n body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Scale", + 201: "V1Scale", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/scale', 'PUT', path_params, @@ -28218,13 +35842,14 @@ def replace_namespaced_replication_controller_scale_with_http_info(self, name, n body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Scale', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_namespaced_replication_controller_status(self, name, namespace, body, **kwargs): # noqa: E501 """replace_namespaced_replication_controller_status # noqa: E501 @@ -28232,27 +35857,38 @@ def replace_namespaced_replication_controller_status(self, name, namespace, body replace status of the specified ReplicationController # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_replication_controller_status(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ReplicationController (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1ReplicationController body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the ReplicationController (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1ReplicationController + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ReplicationController + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ReplicationController """ kwargs['_return_http_data_only'] = True return self.replace_namespaced_replication_controller_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -28263,29 +35899,46 @@ def replace_namespaced_replication_controller_status_with_http_info(self, name, replace status of the specified ReplicationController # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_replication_controller_status_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ReplicationController (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1ReplicationController body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the ReplicationController (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1ReplicationController + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ReplicationController, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ReplicationController, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -28304,7 +35957,10 @@ def replace_namespaced_replication_controller_status_with_http_info(self, name, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -28317,16 +35973,13 @@ def replace_namespaced_replication_controller_status_with_http_info(self, name, local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_replication_controller_status`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_replication_controller_status`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_replication_controller_status`") # noqa: E501 collection_formats = {} @@ -28338,16 +35991,16 @@ def replace_namespaced_replication_controller_status_with_http_info(self, name, path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -28357,11 +36010,17 @@ def replace_namespaced_replication_controller_status_with_http_info(self, name, body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ReplicationController", + 201: "V1ReplicationController", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/status', 'PUT', path_params, @@ -28370,13 +36029,14 @@ def replace_namespaced_replication_controller_status_with_http_info(self, name, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ReplicationController', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_namespaced_resource_quota(self, name, namespace, body, **kwargs): # noqa: E501 """replace_namespaced_resource_quota # noqa: E501 @@ -28384,27 +36044,38 @@ def replace_namespaced_resource_quota(self, name, namespace, body, **kwargs): # replace the specified ResourceQuota # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_resource_quota(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ResourceQuota (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1ResourceQuota body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the ResourceQuota (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1ResourceQuota + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ResourceQuota + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ResourceQuota """ kwargs['_return_http_data_only'] = True return self.replace_namespaced_resource_quota_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -28415,29 +36086,46 @@ def replace_namespaced_resource_quota_with_http_info(self, name, namespace, body replace the specified ResourceQuota # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_resource_quota_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ResourceQuota (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1ResourceQuota body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the ResourceQuota (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1ResourceQuota + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ResourceQuota, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ResourceQuota, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -28456,7 +36144,10 @@ def replace_namespaced_resource_quota_with_http_info(self, name, namespace, body 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -28469,16 +36160,13 @@ def replace_namespaced_resource_quota_with_http_info(self, name, namespace, body local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_resource_quota`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_resource_quota`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_resource_quota`") # noqa: E501 collection_formats = {} @@ -28490,16 +36178,16 @@ def replace_namespaced_resource_quota_with_http_info(self, name, namespace, body path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -28509,11 +36197,17 @@ def replace_namespaced_resource_quota_with_http_info(self, name, namespace, body body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ResourceQuota", + 201: "V1ResourceQuota", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/resourcequotas/{name}', 'PUT', path_params, @@ -28522,13 +36216,14 @@ def replace_namespaced_resource_quota_with_http_info(self, name, namespace, body body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ResourceQuota', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_namespaced_resource_quota_status(self, name, namespace, body, **kwargs): # noqa: E501 """replace_namespaced_resource_quota_status # noqa: E501 @@ -28536,27 +36231,38 @@ def replace_namespaced_resource_quota_status(self, name, namespace, body, **kwar replace status of the specified ResourceQuota # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_resource_quota_status(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ResourceQuota (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1ResourceQuota body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the ResourceQuota (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1ResourceQuota + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ResourceQuota + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ResourceQuota """ kwargs['_return_http_data_only'] = True return self.replace_namespaced_resource_quota_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -28567,29 +36273,46 @@ def replace_namespaced_resource_quota_status_with_http_info(self, name, namespac replace status of the specified ResourceQuota # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_resource_quota_status_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ResourceQuota (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1ResourceQuota body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the ResourceQuota (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1ResourceQuota + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ResourceQuota, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ResourceQuota, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -28608,7 +36331,10 @@ def replace_namespaced_resource_quota_status_with_http_info(self, name, namespac 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -28621,16 +36347,13 @@ def replace_namespaced_resource_quota_status_with_http_info(self, name, namespac local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_resource_quota_status`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_resource_quota_status`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_resource_quota_status`") # noqa: E501 collection_formats = {} @@ -28642,16 +36365,16 @@ def replace_namespaced_resource_quota_status_with_http_info(self, name, namespac path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -28661,11 +36384,17 @@ def replace_namespaced_resource_quota_status_with_http_info(self, name, namespac body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ResourceQuota", + 201: "V1ResourceQuota", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/resourcequotas/{name}/status', 'PUT', path_params, @@ -28674,13 +36403,14 @@ def replace_namespaced_resource_quota_status_with_http_info(self, name, namespac body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ResourceQuota', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_namespaced_secret(self, name, namespace, body, **kwargs): # noqa: E501 """replace_namespaced_secret # noqa: E501 @@ -28688,27 +36418,38 @@ def replace_namespaced_secret(self, name, namespace, body, **kwargs): # noqa: E replace the specified Secret # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_secret(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Secret (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1Secret body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the Secret (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1Secret + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Secret + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Secret """ kwargs['_return_http_data_only'] = True return self.replace_namespaced_secret_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -28719,29 +36460,46 @@ def replace_namespaced_secret_with_http_info(self, name, namespace, body, **kwar replace the specified Secret # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_secret_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Secret (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1Secret body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the Secret (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1Secret + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Secret, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Secret, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -28760,7 +36518,10 @@ def replace_namespaced_secret_with_http_info(self, name, namespace, body, **kwar 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -28773,16 +36534,13 @@ def replace_namespaced_secret_with_http_info(self, name, namespace, body, **kwar local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_secret`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_secret`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_secret`") # noqa: E501 collection_formats = {} @@ -28794,16 +36552,16 @@ def replace_namespaced_secret_with_http_info(self, name, namespace, body, **kwar path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -28813,11 +36571,17 @@ def replace_namespaced_secret_with_http_info(self, name, namespace, body, **kwar body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Secret", + 201: "V1Secret", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/secrets/{name}', 'PUT', path_params, @@ -28826,13 +36590,14 @@ def replace_namespaced_secret_with_http_info(self, name, namespace, body, **kwar body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Secret', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_namespaced_service(self, name, namespace, body, **kwargs): # noqa: E501 """replace_namespaced_service # noqa: E501 @@ -28840,27 +36605,38 @@ def replace_namespaced_service(self, name, namespace, body, **kwargs): # noqa: replace the specified Service # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_service(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Service (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1Service body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the Service (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1Service + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Service + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Service """ kwargs['_return_http_data_only'] = True return self.replace_namespaced_service_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -28871,29 +36647,46 @@ def replace_namespaced_service_with_http_info(self, name, namespace, body, **kwa replace the specified Service # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_service_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Service (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1Service body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the Service (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1Service + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Service, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Service, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -28912,7 +36705,10 @@ def replace_namespaced_service_with_http_info(self, name, namespace, body, **kwa 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -28925,16 +36721,13 @@ def replace_namespaced_service_with_http_info(self, name, namespace, body, **kwa local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_service`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_service`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_service`") # noqa: E501 collection_formats = {} @@ -28946,16 +36739,16 @@ def replace_namespaced_service_with_http_info(self, name, namespace, body, **kwa path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -28965,11 +36758,17 @@ def replace_namespaced_service_with_http_info(self, name, namespace, body, **kwa body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Service", + 201: "V1Service", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/services/{name}', 'PUT', path_params, @@ -28978,13 +36777,14 @@ def replace_namespaced_service_with_http_info(self, name, namespace, body, **kwa body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Service', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_namespaced_service_account(self, name, namespace, body, **kwargs): # noqa: E501 """replace_namespaced_service_account # noqa: E501 @@ -28992,27 +36792,38 @@ def replace_namespaced_service_account(self, name, namespace, body, **kwargs): replace the specified ServiceAccount # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_service_account(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ServiceAccount (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1ServiceAccount body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the ServiceAccount (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1ServiceAccount + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ServiceAccount + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ServiceAccount """ kwargs['_return_http_data_only'] = True return self.replace_namespaced_service_account_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -29023,29 +36834,46 @@ def replace_namespaced_service_account_with_http_info(self, name, namespace, bod replace the specified ServiceAccount # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_service_account_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ServiceAccount (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1ServiceAccount body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the ServiceAccount (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1ServiceAccount + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ServiceAccount, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ServiceAccount, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -29064,7 +36892,10 @@ def replace_namespaced_service_account_with_http_info(self, name, namespace, bod 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -29077,16 +36908,13 @@ def replace_namespaced_service_account_with_http_info(self, name, namespace, bod local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_service_account`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_service_account`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_service_account`") # noqa: E501 collection_formats = {} @@ -29098,16 +36926,16 @@ def replace_namespaced_service_account_with_http_info(self, name, namespace, bod path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -29117,11 +36945,17 @@ def replace_namespaced_service_account_with_http_info(self, name, namespace, bod body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ServiceAccount", + 201: "V1ServiceAccount", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/serviceaccounts/{name}', 'PUT', path_params, @@ -29130,13 +36964,14 @@ def replace_namespaced_service_account_with_http_info(self, name, namespace, bod body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ServiceAccount', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_namespaced_service_status(self, name, namespace, body, **kwargs): # noqa: E501 """replace_namespaced_service_status # noqa: E501 @@ -29144,27 +36979,38 @@ def replace_namespaced_service_status(self, name, namespace, body, **kwargs): # replace status of the specified Service # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_service_status(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Service (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1Service body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the Service (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1Service + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Service + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Service """ kwargs['_return_http_data_only'] = True return self.replace_namespaced_service_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -29175,29 +37021,46 @@ def replace_namespaced_service_status_with_http_info(self, name, namespace, body replace status of the specified Service # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_service_status_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Service (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1Service body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the Service (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1Service + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Service, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Service, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -29216,7 +37079,10 @@ def replace_namespaced_service_status_with_http_info(self, name, namespace, body 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -29229,16 +37095,13 @@ def replace_namespaced_service_status_with_http_info(self, name, namespace, body local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_service_status`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_service_status`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_service_status`") # noqa: E501 collection_formats = {} @@ -29250,16 +37113,16 @@ def replace_namespaced_service_status_with_http_info(self, name, namespace, body path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -29269,11 +37132,17 @@ def replace_namespaced_service_status_with_http_info(self, name, namespace, body body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Service", + 201: "V1Service", + 401: None, + } + return self.api_client.call_api( '/api/v1/namespaces/{namespace}/services/{name}/status', 'PUT', path_params, @@ -29282,13 +37151,14 @@ def replace_namespaced_service_status_with_http_info(self, name, namespace, body body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Service', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_node(self, name, body, **kwargs): # noqa: E501 """replace_node # noqa: E501 @@ -29296,26 +37166,36 @@ def replace_node(self, name, body, **kwargs): # noqa: E501 replace the specified Node # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_node(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Node (required) - :param V1Node body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the Node (required) + :type name: str + :param body: (required) + :type body: V1Node + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Node + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Node """ kwargs['_return_http_data_only'] = True return self.replace_node_with_http_info(name, body, **kwargs) # noqa: E501 @@ -29326,28 +37206,44 @@ def replace_node_with_http_info(self, name, body, **kwargs): # noqa: E501 replace the specified Node # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_node_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Node (required) - :param V1Node body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the Node (required) + :type name: str + :param body: (required) + :type body: V1Node + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Node, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Node, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -29365,7 +37261,10 @@ def replace_node_with_http_info(self, name, body, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -29378,12 +37277,10 @@ def replace_node_with_http_info(self, name, body, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_node`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_node`") # noqa: E501 collection_formats = {} @@ -29393,16 +37290,16 @@ def replace_node_with_http_info(self, name, body, **kwargs): # noqa: E501 path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -29412,11 +37309,17 @@ def replace_node_with_http_info(self, name, body, **kwargs): # noqa: E501 body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Node", + 201: "V1Node", + 401: None, + } + return self.api_client.call_api( '/api/v1/nodes/{name}', 'PUT', path_params, @@ -29425,13 +37328,14 @@ def replace_node_with_http_info(self, name, body, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Node', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_node_status(self, name, body, **kwargs): # noqa: E501 """replace_node_status # noqa: E501 @@ -29439,26 +37343,36 @@ def replace_node_status(self, name, body, **kwargs): # noqa: E501 replace status of the specified Node # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_node_status(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Node (required) - :param V1Node body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the Node (required) + :type name: str + :param body: (required) + :type body: V1Node + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Node + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Node """ kwargs['_return_http_data_only'] = True return self.replace_node_status_with_http_info(name, body, **kwargs) # noqa: E501 @@ -29469,28 +37383,44 @@ def replace_node_status_with_http_info(self, name, body, **kwargs): # noqa: E50 replace status of the specified Node # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_node_status_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Node (required) - :param V1Node body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the Node (required) + :type name: str + :param body: (required) + :type body: V1Node + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Node, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Node, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -29508,7 +37438,10 @@ def replace_node_status_with_http_info(self, name, body, **kwargs): # noqa: E50 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -29521,12 +37454,10 @@ def replace_node_status_with_http_info(self, name, body, **kwargs): # noqa: E50 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_node_status`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_node_status`") # noqa: E501 collection_formats = {} @@ -29536,16 +37467,16 @@ def replace_node_status_with_http_info(self, name, body, **kwargs): # noqa: E50 path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -29555,11 +37486,17 @@ def replace_node_status_with_http_info(self, name, body, **kwargs): # noqa: E50 body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Node", + 201: "V1Node", + 401: None, + } + return self.api_client.call_api( '/api/v1/nodes/{name}/status', 'PUT', path_params, @@ -29568,13 +37505,14 @@ def replace_node_status_with_http_info(self, name, body, **kwargs): # noqa: E50 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Node', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_persistent_volume(self, name, body, **kwargs): # noqa: E501 """replace_persistent_volume # noqa: E501 @@ -29582,26 +37520,36 @@ def replace_persistent_volume(self, name, body, **kwargs): # noqa: E501 replace the specified PersistentVolume # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_persistent_volume(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PersistentVolume (required) - :param V1PersistentVolume body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the PersistentVolume (required) + :type name: str + :param body: (required) + :type body: V1PersistentVolume + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1PersistentVolume + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1PersistentVolume """ kwargs['_return_http_data_only'] = True return self.replace_persistent_volume_with_http_info(name, body, **kwargs) # noqa: E501 @@ -29612,28 +37560,44 @@ def replace_persistent_volume_with_http_info(self, name, body, **kwargs): # noq replace the specified PersistentVolume # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_persistent_volume_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PersistentVolume (required) - :param V1PersistentVolume body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the PersistentVolume (required) + :type name: str + :param body: (required) + :type body: V1PersistentVolume + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1PersistentVolume, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1PersistentVolume, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -29651,7 +37615,10 @@ def replace_persistent_volume_with_http_info(self, name, body, **kwargs): # noq 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -29664,12 +37631,10 @@ def replace_persistent_volume_with_http_info(self, name, body, **kwargs): # noq local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_persistent_volume`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_persistent_volume`") # noqa: E501 collection_formats = {} @@ -29679,16 +37644,16 @@ def replace_persistent_volume_with_http_info(self, name, body, **kwargs): # noq path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -29698,11 +37663,17 @@ def replace_persistent_volume_with_http_info(self, name, body, **kwargs): # noq body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1PersistentVolume", + 201: "V1PersistentVolume", + 401: None, + } + return self.api_client.call_api( '/api/v1/persistentvolumes/{name}', 'PUT', path_params, @@ -29711,13 +37682,14 @@ def replace_persistent_volume_with_http_info(self, name, body, **kwargs): # noq body=body_params, post_params=form_params, files=local_var_files, - response_type='V1PersistentVolume', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_persistent_volume_status(self, name, body, **kwargs): # noqa: E501 """replace_persistent_volume_status # noqa: E501 @@ -29725,26 +37697,36 @@ def replace_persistent_volume_status(self, name, body, **kwargs): # noqa: E501 replace status of the specified PersistentVolume # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_persistent_volume_status(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PersistentVolume (required) - :param V1PersistentVolume body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the PersistentVolume (required) + :type name: str + :param body: (required) + :type body: V1PersistentVolume + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1PersistentVolume + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1PersistentVolume """ kwargs['_return_http_data_only'] = True return self.replace_persistent_volume_status_with_http_info(name, body, **kwargs) # noqa: E501 @@ -29755,28 +37737,44 @@ def replace_persistent_volume_status_with_http_info(self, name, body, **kwargs): replace status of the specified PersistentVolume # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_persistent_volume_status_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PersistentVolume (required) - :param V1PersistentVolume body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the PersistentVolume (required) + :type name: str + :param body: (required) + :type body: V1PersistentVolume + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1PersistentVolume, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1PersistentVolume, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -29794,7 +37792,10 @@ def replace_persistent_volume_status_with_http_info(self, name, body, **kwargs): 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -29807,12 +37808,10 @@ def replace_persistent_volume_status_with_http_info(self, name, body, **kwargs): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_persistent_volume_status`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_persistent_volume_status`") # noqa: E501 collection_formats = {} @@ -29822,16 +37821,16 @@ def replace_persistent_volume_status_with_http_info(self, name, body, **kwargs): path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -29841,11 +37840,17 @@ def replace_persistent_volume_status_with_http_info(self, name, body, **kwargs): body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1PersistentVolume", + 201: "V1PersistentVolume", + 401: None, + } + return self.api_client.call_api( '/api/v1/persistentvolumes/{name}/status', 'PUT', path_params, @@ -29854,10 +37859,11 @@ def replace_persistent_volume_status_with_http_info(self, name, body, **kwargs): body=body_params, post_params=form_params, files=local_var_files, - response_type='V1PersistentVolume', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) diff --git a/kubernetes/client/api/custom_objects_api.py b/kubernetes/client/api/custom_objects_api.py index 0d033165c1..a12f7b6155 100644 --- a/kubernetes/client/api/custom_objects_api.py +++ b/kubernetes/client/api/custom_objects_api.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ @@ -42,28 +42,40 @@ def create_cluster_custom_object(self, group, version, plural, body, **kwargs): Creates a cluster scoped Custom object # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_cluster_custom_object(group, version, plural, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str group: The custom resource's group name (required) - :param str version: The custom resource's version (required) - :param str plural: The custom resource's plural name. For TPRs this would be lowercase plural kind. (required) - :param object body: The JSON schema of the Resource to create. (required) - :param str pretty: If 'true', then the output is pretty printed. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + :param group: The custom resource's group name (required) + :type group: str + :param version: The custom resource's version (required) + :type version: str + :param plural: The custom resource's plural name. For TPRs this would be lowercase plural kind. (required) + :type plural: str + :param body: The JSON schema of the Resource to create. (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: object + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: object """ kwargs['_return_http_data_only'] = True return self.create_cluster_custom_object_with_http_info(group, version, plural, body, **kwargs) # noqa: E501 @@ -74,30 +86,48 @@ def create_cluster_custom_object_with_http_info(self, group, version, plural, bo Creates a cluster scoped Custom object # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_cluster_custom_object_with_http_info(group, version, plural, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str group: The custom resource's group name (required) - :param str version: The custom resource's version (required) - :param str plural: The custom resource's plural name. For TPRs this would be lowercase plural kind. (required) - :param object body: The JSON schema of the Resource to create. (required) - :param str pretty: If 'true', then the output is pretty printed. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + :param group: The custom resource's group name (required) + :type group: str + :param version: The custom resource's version (required) + :type version: str + :param plural: The custom resource's plural name. For TPRs this would be lowercase plural kind. (required) + :type plural: str + :param body: The JSON schema of the Resource to create. (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(object, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -117,7 +147,10 @@ def create_cluster_custom_object_with_http_info(self, group, version, plural, bo 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -130,20 +163,16 @@ def create_cluster_custom_object_with_http_info(self, group, version, plural, bo local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'group' is set - if self.api_client.client_side_validation and ('group' not in local_var_params or # noqa: E501 - local_var_params['group'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('group') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `group` when calling `create_cluster_custom_object`") # noqa: E501 # verify the required parameter 'version' is set - if self.api_client.client_side_validation and ('version' not in local_var_params or # noqa: E501 - local_var_params['version'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('version') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `version` when calling `create_cluster_custom_object`") # noqa: E501 # verify the required parameter 'plural' is set - if self.api_client.client_side_validation and ('plural' not in local_var_params or # noqa: E501 - local_var_params['plural'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('plural') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `plural` when calling `create_cluster_custom_object`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_cluster_custom_object`") # noqa: E501 collection_formats = {} @@ -157,16 +186,16 @@ def create_cluster_custom_object_with_http_info(self, group, version, plural, bo path_params['plural'] = local_var_params['plural'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -181,6 +210,11 @@ def create_cluster_custom_object_with_http_info(self, group, version, plural, bo # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 201: "object", + 401: None, + } + return self.api_client.call_api( '/apis/{group}/{version}/{plural}', 'POST', path_params, @@ -189,13 +223,14 @@ def create_cluster_custom_object_with_http_info(self, group, version, plural, bo body=body_params, post_params=form_params, files=local_var_files, - response_type='object', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def create_namespaced_custom_object(self, group, version, namespace, plural, body, **kwargs): # noqa: E501 """create_namespaced_custom_object # noqa: E501 @@ -203,29 +238,42 @@ def create_namespaced_custom_object(self, group, version, namespace, plural, bod Creates a namespace scoped Custom object # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_namespaced_custom_object(group, version, namespace, plural, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str group: The custom resource's group name (required) - :param str version: The custom resource's version (required) - :param str namespace: The custom resource's namespace (required) - :param str plural: The custom resource's plural name. For TPRs this would be lowercase plural kind. (required) - :param object body: The JSON schema of the Resource to create. (required) - :param str pretty: If 'true', then the output is pretty printed. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + :param group: The custom resource's group name (required) + :type group: str + :param version: The custom resource's version (required) + :type version: str + :param namespace: The custom resource's namespace (required) + :type namespace: str + :param plural: The custom resource's plural name. For TPRs this would be lowercase plural kind. (required) + :type plural: str + :param body: The JSON schema of the Resource to create. (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: object + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: object """ kwargs['_return_http_data_only'] = True return self.create_namespaced_custom_object_with_http_info(group, version, namespace, plural, body, **kwargs) # noqa: E501 @@ -236,31 +284,50 @@ def create_namespaced_custom_object_with_http_info(self, group, version, namespa Creates a namespace scoped Custom object # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_namespaced_custom_object_with_http_info(group, version, namespace, plural, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str group: The custom resource's group name (required) - :param str version: The custom resource's version (required) - :param str namespace: The custom resource's namespace (required) - :param str plural: The custom resource's plural name. For TPRs this would be lowercase plural kind. (required) - :param object body: The JSON schema of the Resource to create. (required) - :param str pretty: If 'true', then the output is pretty printed. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + :param group: The custom resource's group name (required) + :type group: str + :param version: The custom resource's version (required) + :type version: str + :param namespace: The custom resource's namespace (required) + :type namespace: str + :param plural: The custom resource's plural name. For TPRs this would be lowercase plural kind. (required) + :type plural: str + :param body: The JSON schema of the Resource to create. (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(object, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -281,7 +348,10 @@ def create_namespaced_custom_object_with_http_info(self, group, version, namespa 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -294,24 +364,19 @@ def create_namespaced_custom_object_with_http_info(self, group, version, namespa local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'group' is set - if self.api_client.client_side_validation and ('group' not in local_var_params or # noqa: E501 - local_var_params['group'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('group') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `group` when calling `create_namespaced_custom_object`") # noqa: E501 # verify the required parameter 'version' is set - if self.api_client.client_side_validation and ('version' not in local_var_params or # noqa: E501 - local_var_params['version'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('version') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `version` when calling `create_namespaced_custom_object`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_custom_object`") # noqa: E501 # verify the required parameter 'plural' is set - if self.api_client.client_side_validation and ('plural' not in local_var_params or # noqa: E501 - local_var_params['plural'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('plural') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `plural` when calling `create_namespaced_custom_object`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_custom_object`") # noqa: E501 collection_formats = {} @@ -327,16 +392,16 @@ def create_namespaced_custom_object_with_http_info(self, group, version, namespa path_params['plural'] = local_var_params['plural'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -351,6 +416,11 @@ def create_namespaced_custom_object_with_http_info(self, group, version, namespa # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 201: "object", + 401: None, + } + return self.api_client.call_api( '/apis/{group}/{version}/namespaces/{namespace}/{plural}', 'POST', path_params, @@ -359,13 +429,14 @@ def create_namespaced_custom_object_with_http_info(self, group, version, namespa body=body_params, post_params=form_params, files=local_var_files, - response_type='object', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_cluster_custom_object(self, group, version, plural, name, **kwargs): # noqa: E501 """delete_cluster_custom_object # noqa: E501 @@ -373,29 +444,42 @@ def delete_cluster_custom_object(self, group, version, plural, name, **kwargs): Deletes the specified cluster scoped custom object # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_cluster_custom_object(group, version, plural, name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str group: the custom resource's group (required) - :param str version: the custom resource's version (required) - :param str plural: the custom object's plural name. For TPRs this would be lowercase plural kind. (required) - :param str name: the custom object's name (required) - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param V1DeleteOptions body: + :param group: the custom resource's group (required) + :type group: str + :param version: the custom resource's version (required) + :type version: str + :param plural: the custom object's plural name. For TPRs this would be lowercase plural kind. (required) + :type plural: str + :param name: the custom object's name (required) + :type name: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. + :type propagation_policy: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: object + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: object """ kwargs['_return_http_data_only'] = True return self.delete_cluster_custom_object_with_http_info(group, version, plural, name, **kwargs) # noqa: E501 @@ -406,31 +490,50 @@ def delete_cluster_custom_object_with_http_info(self, group, version, plural, na Deletes the specified cluster scoped custom object # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_cluster_custom_object_with_http_info(group, version, plural, name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str group: the custom resource's group (required) - :param str version: the custom resource's version (required) - :param str plural: the custom object's plural name. For TPRs this would be lowercase plural kind. (required) - :param str name: the custom object's name (required) - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param V1DeleteOptions body: + :param group: the custom resource's group (required) + :type group: str + :param version: the custom resource's version (required) + :type version: str + :param plural: the custom object's plural name. For TPRs this would be lowercase plural kind. (required) + :type plural: str + :param name: the custom object's name (required) + :type name: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. + :type propagation_policy: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(object, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -451,7 +554,10 @@ def delete_cluster_custom_object_with_http_info(self, group, version, plural, na 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -464,20 +570,16 @@ def delete_cluster_custom_object_with_http_info(self, group, version, plural, na local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'group' is set - if self.api_client.client_side_validation and ('group' not in local_var_params or # noqa: E501 - local_var_params['group'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('group') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `group` when calling `delete_cluster_custom_object`") # noqa: E501 # verify the required parameter 'version' is set - if self.api_client.client_side_validation and ('version' not in local_var_params or # noqa: E501 - local_var_params['version'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('version') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `version` when calling `delete_cluster_custom_object`") # noqa: E501 # verify the required parameter 'plural' is set - if self.api_client.client_side_validation and ('plural' not in local_var_params or # noqa: E501 - local_var_params['plural'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('plural') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `plural` when calling `delete_cluster_custom_object`") # noqa: E501 # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `delete_cluster_custom_object`") # noqa: E501 collection_formats = {} @@ -493,16 +595,16 @@ def delete_cluster_custom_object_with_http_info(self, group, version, plural, na path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -517,6 +619,11 @@ def delete_cluster_custom_object_with_http_info(self, group, version, plural, na # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "object", + 401: None, + } + return self.api_client.call_api( '/apis/{group}/{version}/{plural}/{name}', 'DELETE', path_params, @@ -525,13 +632,14 @@ def delete_cluster_custom_object_with_http_info(self, group, version, plural, na body=body_params, post_params=form_params, files=local_var_files, - response_type='object', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_collection_cluster_custom_object(self, group, version, plural, **kwargs): # noqa: E501 """delete_collection_cluster_custom_object # noqa: E501 @@ -539,30 +647,44 @@ def delete_collection_cluster_custom_object(self, group, version, plural, **kwar Delete collection of cluster scoped custom objects # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_cluster_custom_object(group, version, plural, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str group: The custom resource's group name (required) - :param str version: The custom resource's version (required) - :param str plural: The custom resource's plural name. For TPRs this would be lowercase plural kind. (required) - :param str pretty: If 'true', then the output is pretty printed. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param V1DeleteOptions body: + :param group: The custom resource's group name (required) + :type group: str + :param version: The custom resource's version (required) + :type version: str + :param plural: The custom resource's plural name. For TPRs this would be lowercase plural kind. (required) + :type plural: str + :param pretty: If 'true', then the output is pretty printed. + :type pretty: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. + :type propagation_policy: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: object + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: object """ kwargs['_return_http_data_only'] = True return self.delete_collection_cluster_custom_object_with_http_info(group, version, plural, **kwargs) # noqa: E501 @@ -573,32 +695,52 @@ def delete_collection_cluster_custom_object_with_http_info(self, group, version, Delete collection of cluster scoped custom objects # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_cluster_custom_object_with_http_info(group, version, plural, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str group: The custom resource's group name (required) - :param str version: The custom resource's version (required) - :param str plural: The custom resource's plural name. For TPRs this would be lowercase plural kind. (required) - :param str pretty: If 'true', then the output is pretty printed. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param V1DeleteOptions body: + :param group: The custom resource's group name (required) + :type group: str + :param version: The custom resource's version (required) + :type version: str + :param plural: The custom resource's plural name. For TPRs this would be lowercase plural kind. (required) + :type plural: str + :param pretty: If 'true', then the output is pretty printed. + :type pretty: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. + :type propagation_policy: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(object, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -620,7 +762,10 @@ def delete_collection_cluster_custom_object_with_http_info(self, group, version, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -633,16 +778,13 @@ def delete_collection_cluster_custom_object_with_http_info(self, group, version, local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'group' is set - if self.api_client.client_side_validation and ('group' not in local_var_params or # noqa: E501 - local_var_params['group'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('group') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `group` when calling `delete_collection_cluster_custom_object`") # noqa: E501 # verify the required parameter 'version' is set - if self.api_client.client_side_validation and ('version' not in local_var_params or # noqa: E501 - local_var_params['version'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('version') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `version` when calling `delete_collection_cluster_custom_object`") # noqa: E501 # verify the required parameter 'plural' is set - if self.api_client.client_side_validation and ('plural' not in local_var_params or # noqa: E501 - local_var_params['plural'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('plural') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `plural` when calling `delete_collection_cluster_custom_object`") # noqa: E501 collection_formats = {} @@ -656,20 +798,20 @@ def delete_collection_cluster_custom_object_with_http_info(self, group, version, path_params['plural'] = local_var_params['plural'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -684,6 +826,11 @@ def delete_collection_cluster_custom_object_with_http_info(self, group, version, # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "object", + 401: None, + } + return self.api_client.call_api( '/apis/{group}/{version}/{plural}', 'DELETE', path_params, @@ -692,13 +839,14 @@ def delete_collection_cluster_custom_object_with_http_info(self, group, version, body=body_params, post_params=form_params, files=local_var_files, - response_type='object', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_collection_namespaced_custom_object(self, group, version, namespace, plural, **kwargs): # noqa: E501 """delete_collection_namespaced_custom_object # noqa: E501 @@ -706,31 +854,48 @@ def delete_collection_namespaced_custom_object(self, group, version, namespace, Delete collection of namespace scoped custom objects # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_namespaced_custom_object(group, version, namespace, plural, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str group: The custom resource's group name (required) - :param str version: The custom resource's version (required) - :param str namespace: The custom resource's namespace (required) - :param str plural: The custom resource's plural name. For TPRs this would be lowercase plural kind. (required) - :param str pretty: If 'true', then the output is pretty printed. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param V1DeleteOptions body: + :param group: The custom resource's group name (required) + :type group: str + :param version: The custom resource's version (required) + :type version: str + :param namespace: The custom resource's namespace (required) + :type namespace: str + :param plural: The custom resource's plural name. For TPRs this would be lowercase plural kind. (required) + :type plural: str + :param pretty: If 'true', then the output is pretty printed. + :type pretty: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. + :type propagation_policy: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: object + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: object """ kwargs['_return_http_data_only'] = True return self.delete_collection_namespaced_custom_object_with_http_info(group, version, namespace, plural, **kwargs) # noqa: E501 @@ -741,33 +906,56 @@ def delete_collection_namespaced_custom_object_with_http_info(self, group, versi Delete collection of namespace scoped custom objects # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_namespaced_custom_object_with_http_info(group, version, namespace, plural, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str group: The custom resource's group name (required) - :param str version: The custom resource's version (required) - :param str namespace: The custom resource's namespace (required) - :param str plural: The custom resource's plural name. For TPRs this would be lowercase plural kind. (required) - :param str pretty: If 'true', then the output is pretty printed. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param V1DeleteOptions body: + :param group: The custom resource's group name (required) + :type group: str + :param version: The custom resource's version (required) + :type version: str + :param namespace: The custom resource's namespace (required) + :type namespace: str + :param plural: The custom resource's plural name. For TPRs this would be lowercase plural kind. (required) + :type plural: str + :param pretty: If 'true', then the output is pretty printed. + :type pretty: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. + :type propagation_policy: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(object, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -783,6 +971,7 @@ def delete_collection_namespaced_custom_object_with_http_info(self, group, versi 'orphan_dependents', 'propagation_policy', 'dry_run', + 'field_selector', 'body' ] all_params.extend( @@ -790,7 +979,10 @@ def delete_collection_namespaced_custom_object_with_http_info(self, group, versi 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -803,20 +995,16 @@ def delete_collection_namespaced_custom_object_with_http_info(self, group, versi local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'group' is set - if self.api_client.client_side_validation and ('group' not in local_var_params or # noqa: E501 - local_var_params['group'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('group') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `group` when calling `delete_collection_namespaced_custom_object`") # noqa: E501 # verify the required parameter 'version' is set - if self.api_client.client_side_validation and ('version' not in local_var_params or # noqa: E501 - local_var_params['version'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('version') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `version` when calling `delete_collection_namespaced_custom_object`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_custom_object`") # noqa: E501 # verify the required parameter 'plural' is set - if self.api_client.client_side_validation and ('plural' not in local_var_params or # noqa: E501 - local_var_params['plural'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('plural') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `plural` when calling `delete_collection_namespaced_custom_object`") # noqa: E501 collection_formats = {} @@ -832,20 +1020,22 @@ def delete_collection_namespaced_custom_object_with_http_info(self, group, versi path_params['plural'] = local_var_params['plural'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 + query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -860,6 +1050,11 @@ def delete_collection_namespaced_custom_object_with_http_info(self, group, versi # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "object", + 401: None, + } + return self.api_client.call_api( '/apis/{group}/{version}/namespaces/{namespace}/{plural}', 'DELETE', path_params, @@ -868,13 +1063,14 @@ def delete_collection_namespaced_custom_object_with_http_info(self, group, versi body=body_params, post_params=form_params, files=local_var_files, - response_type='object', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_namespaced_custom_object(self, group, version, namespace, plural, name, **kwargs): # noqa: E501 """delete_namespaced_custom_object # noqa: E501 @@ -882,30 +1078,44 @@ def delete_namespaced_custom_object(self, group, version, namespace, plural, nam Deletes the specified namespace scoped custom object # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_namespaced_custom_object(group, version, namespace, plural, name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str group: the custom resource's group (required) - :param str version: the custom resource's version (required) - :param str namespace: The custom resource's namespace (required) - :param str plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required) - :param str name: the custom object's name (required) - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param V1DeleteOptions body: + :param group: the custom resource's group (required) + :type group: str + :param version: the custom resource's version (required) + :type version: str + :param namespace: The custom resource's namespace (required) + :type namespace: str + :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required) + :type plural: str + :param name: the custom object's name (required) + :type name: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. + :type propagation_policy: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: object + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: object """ kwargs['_return_http_data_only'] = True return self.delete_namespaced_custom_object_with_http_info(group, version, namespace, plural, name, **kwargs) # noqa: E501 @@ -916,32 +1126,52 @@ def delete_namespaced_custom_object_with_http_info(self, group, version, namespa Deletes the specified namespace scoped custom object # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_namespaced_custom_object_with_http_info(group, version, namespace, plural, name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str group: the custom resource's group (required) - :param str version: the custom resource's version (required) - :param str namespace: The custom resource's namespace (required) - :param str plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required) - :param str name: the custom object's name (required) - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param V1DeleteOptions body: + :param group: the custom resource's group (required) + :type group: str + :param version: the custom resource's version (required) + :type version: str + :param namespace: The custom resource's namespace (required) + :type namespace: str + :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required) + :type plural: str + :param name: the custom object's name (required) + :type name: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. + :type propagation_policy: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(object, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -963,7 +1193,10 @@ def delete_namespaced_custom_object_with_http_info(self, group, version, namespa 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -976,24 +1209,19 @@ def delete_namespaced_custom_object_with_http_info(self, group, version, namespa local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'group' is set - if self.api_client.client_side_validation and ('group' not in local_var_params or # noqa: E501 - local_var_params['group'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('group') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `group` when calling `delete_namespaced_custom_object`") # noqa: E501 # verify the required parameter 'version' is set - if self.api_client.client_side_validation and ('version' not in local_var_params or # noqa: E501 - local_var_params['version'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('version') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `version` when calling `delete_namespaced_custom_object`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_custom_object`") # noqa: E501 # verify the required parameter 'plural' is set - if self.api_client.client_side_validation and ('plural' not in local_var_params or # noqa: E501 - local_var_params['plural'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('plural') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `plural` when calling `delete_namespaced_custom_object`") # noqa: E501 # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_custom_object`") # noqa: E501 collection_formats = {} @@ -1011,16 +1239,16 @@ def delete_namespaced_custom_object_with_http_info(self, group, version, namespa path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1035,6 +1263,11 @@ def delete_namespaced_custom_object_with_http_info(self, group, version, namespa # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "object", + 401: None, + } + return self.api_client.call_api( '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}', 'DELETE', path_params, @@ -1043,13 +1276,14 @@ def delete_namespaced_custom_object_with_http_info(self, group, version, namespa body=body_params, post_params=form_params, files=local_var_files, - response_type='object', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def get_api_resources(self, group, version, **kwargs): # noqa: E501 """get_api_resources # noqa: E501 @@ -1057,22 +1291,28 @@ def get_api_resources(self, group, version, **kwargs): # noqa: E501 get available resources # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_resources(group, version, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str group: The custom resource's group name (required) - :param str version: The custom resource's version (required) + :param group: The custom resource's group name (required) + :type group: str + :param version: The custom resource's version (required) + :type version: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1APIResourceList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1APIResourceList """ kwargs['_return_http_data_only'] = True return self.get_api_resources_with_http_info(group, version, **kwargs) # noqa: E501 @@ -1083,24 +1323,36 @@ def get_api_resources_with_http_info(self, group, version, **kwargs): # noqa: E get available resources # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_resources_with_http_info(group, version, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str group: The custom resource's group name (required) - :param str version: The custom resource's version (required) + :param group: The custom resource's group name (required) + :type group: str + :param version: The custom resource's version (required) + :type version: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1114,7 +1366,10 @@ def get_api_resources_with_http_info(self, group, version, **kwargs): # noqa: E 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1127,12 +1382,10 @@ def get_api_resources_with_http_info(self, group, version, **kwargs): # noqa: E local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'group' is set - if self.api_client.client_side_validation and ('group' not in local_var_params or # noqa: E501 - local_var_params['group'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('group') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `group` when calling `get_api_resources`") # noqa: E501 # verify the required parameter 'version' is set - if self.api_client.client_side_validation and ('version' not in local_var_params or # noqa: E501 - local_var_params['version'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('version') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `version` when calling `get_api_resources`") # noqa: E501 collection_formats = {} @@ -1145,7 +1398,7 @@ def get_api_resources_with_http_info(self, group, version, **kwargs): # noqa: E query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1158,6 +1411,11 @@ def get_api_resources_with_http_info(self, group, version, **kwargs): # noqa: E # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1APIResourceList", + 401: None, + } + return self.api_client.call_api( '/apis/{group}/{version}', 'GET', path_params, @@ -1166,13 +1424,14 @@ def get_api_resources_with_http_info(self, group, version, **kwargs): # noqa: E body=body_params, post_params=form_params, files=local_var_files, - response_type='V1APIResourceList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def get_cluster_custom_object(self, group, version, plural, name, **kwargs): # noqa: E501 """get_cluster_custom_object # noqa: E501 @@ -1180,24 +1439,32 @@ def get_cluster_custom_object(self, group, version, plural, name, **kwargs): # Returns a cluster scoped custom object # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_cluster_custom_object(group, version, plural, name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str group: the custom resource's group (required) - :param str version: the custom resource's version (required) - :param str plural: the custom object's plural name. For TPRs this would be lowercase plural kind. (required) - :param str name: the custom object's name (required) + :param group: the custom resource's group (required) + :type group: str + :param version: the custom resource's version (required) + :type version: str + :param plural: the custom object's plural name. For TPRs this would be lowercase plural kind. (required) + :type plural: str + :param name: the custom object's name (required) + :type name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: object + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: object """ kwargs['_return_http_data_only'] = True return self.get_cluster_custom_object_with_http_info(group, version, plural, name, **kwargs) # noqa: E501 @@ -1208,26 +1475,40 @@ def get_cluster_custom_object_with_http_info(self, group, version, plural, name, Returns a cluster scoped custom object # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_cluster_custom_object_with_http_info(group, version, plural, name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str group: the custom resource's group (required) - :param str version: the custom resource's version (required) - :param str plural: the custom object's plural name. For TPRs this would be lowercase plural kind. (required) - :param str name: the custom object's name (required) + :param group: the custom resource's group (required) + :type group: str + :param version: the custom resource's version (required) + :type version: str + :param plural: the custom object's plural name. For TPRs this would be lowercase plural kind. (required) + :type plural: str + :param name: the custom object's name (required) + :type name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(object, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1243,7 +1524,10 @@ def get_cluster_custom_object_with_http_info(self, group, version, plural, name, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1256,20 +1540,16 @@ def get_cluster_custom_object_with_http_info(self, group, version, plural, name, local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'group' is set - if self.api_client.client_side_validation and ('group' not in local_var_params or # noqa: E501 - local_var_params['group'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('group') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `group` when calling `get_cluster_custom_object`") # noqa: E501 # verify the required parameter 'version' is set - if self.api_client.client_side_validation and ('version' not in local_var_params or # noqa: E501 - local_var_params['version'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('version') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `version` when calling `get_cluster_custom_object`") # noqa: E501 # verify the required parameter 'plural' is set - if self.api_client.client_side_validation and ('plural' not in local_var_params or # noqa: E501 - local_var_params['plural'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('plural') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `plural` when calling `get_cluster_custom_object`") # noqa: E501 # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `get_cluster_custom_object`") # noqa: E501 collection_formats = {} @@ -1286,7 +1566,7 @@ def get_cluster_custom_object_with_http_info(self, group, version, plural, name, query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1299,6 +1579,11 @@ def get_cluster_custom_object_with_http_info(self, group, version, plural, name, # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "object", + 401: None, + } + return self.api_client.call_api( '/apis/{group}/{version}/{plural}/{name}', 'GET', path_params, @@ -1307,13 +1592,14 @@ def get_cluster_custom_object_with_http_info(self, group, version, plural, name, body=body_params, post_params=form_params, files=local_var_files, - response_type='object', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def get_cluster_custom_object_scale(self, group, version, plural, name, **kwargs): # noqa: E501 """get_cluster_custom_object_scale # noqa: E501 @@ -1321,24 +1607,32 @@ def get_cluster_custom_object_scale(self, group, version, plural, name, **kwargs read scale of the specified custom object # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_cluster_custom_object_scale(group, version, plural, name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str group: the custom resource's group (required) - :param str version: the custom resource's version (required) - :param str plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required) - :param str name: the custom object's name (required) + :param group: the custom resource's group (required) + :type group: str + :param version: the custom resource's version (required) + :type version: str + :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required) + :type plural: str + :param name: the custom object's name (required) + :type name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: object + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: object """ kwargs['_return_http_data_only'] = True return self.get_cluster_custom_object_scale_with_http_info(group, version, plural, name, **kwargs) # noqa: E501 @@ -1349,26 +1643,40 @@ def get_cluster_custom_object_scale_with_http_info(self, group, version, plural, read scale of the specified custom object # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_cluster_custom_object_scale_with_http_info(group, version, plural, name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str group: the custom resource's group (required) - :param str version: the custom resource's version (required) - :param str plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required) - :param str name: the custom object's name (required) + :param group: the custom resource's group (required) + :type group: str + :param version: the custom resource's version (required) + :type version: str + :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required) + :type plural: str + :param name: the custom object's name (required) + :type name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(object, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1384,7 +1692,10 @@ def get_cluster_custom_object_scale_with_http_info(self, group, version, plural, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1397,20 +1708,16 @@ def get_cluster_custom_object_scale_with_http_info(self, group, version, plural, local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'group' is set - if self.api_client.client_side_validation and ('group' not in local_var_params or # noqa: E501 - local_var_params['group'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('group') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `group` when calling `get_cluster_custom_object_scale`") # noqa: E501 # verify the required parameter 'version' is set - if self.api_client.client_side_validation and ('version' not in local_var_params or # noqa: E501 - local_var_params['version'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('version') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `version` when calling `get_cluster_custom_object_scale`") # noqa: E501 # verify the required parameter 'plural' is set - if self.api_client.client_side_validation and ('plural' not in local_var_params or # noqa: E501 - local_var_params['plural'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('plural') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `plural` when calling `get_cluster_custom_object_scale`") # noqa: E501 # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `get_cluster_custom_object_scale`") # noqa: E501 collection_formats = {} @@ -1427,7 +1734,7 @@ def get_cluster_custom_object_scale_with_http_info(self, group, version, plural, query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1440,6 +1747,11 @@ def get_cluster_custom_object_scale_with_http_info(self, group, version, plural, # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "object", + 401: None, + } + return self.api_client.call_api( '/apis/{group}/{version}/{plural}/{name}/scale', 'GET', path_params, @@ -1448,13 +1760,14 @@ def get_cluster_custom_object_scale_with_http_info(self, group, version, plural, body=body_params, post_params=form_params, files=local_var_files, - response_type='object', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def get_cluster_custom_object_status(self, group, version, plural, name, **kwargs): # noqa: E501 """get_cluster_custom_object_status # noqa: E501 @@ -1462,24 +1775,32 @@ def get_cluster_custom_object_status(self, group, version, plural, name, **kwarg read status of the specified cluster scoped custom object # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_cluster_custom_object_status(group, version, plural, name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str group: the custom resource's group (required) - :param str version: the custom resource's version (required) - :param str plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required) - :param str name: the custom object's name (required) + :param group: the custom resource's group (required) + :type group: str + :param version: the custom resource's version (required) + :type version: str + :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required) + :type plural: str + :param name: the custom object's name (required) + :type name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: object + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: object """ kwargs['_return_http_data_only'] = True return self.get_cluster_custom_object_status_with_http_info(group, version, plural, name, **kwargs) # noqa: E501 @@ -1490,26 +1811,40 @@ def get_cluster_custom_object_status_with_http_info(self, group, version, plural read status of the specified cluster scoped custom object # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_cluster_custom_object_status_with_http_info(group, version, plural, name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str group: the custom resource's group (required) - :param str version: the custom resource's version (required) - :param str plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required) - :param str name: the custom object's name (required) + :param group: the custom resource's group (required) + :type group: str + :param version: the custom resource's version (required) + :type version: str + :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required) + :type plural: str + :param name: the custom object's name (required) + :type name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(object, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1525,7 +1860,10 @@ def get_cluster_custom_object_status_with_http_info(self, group, version, plural 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1538,20 +1876,16 @@ def get_cluster_custom_object_status_with_http_info(self, group, version, plural local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'group' is set - if self.api_client.client_side_validation and ('group' not in local_var_params or # noqa: E501 - local_var_params['group'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('group') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `group` when calling `get_cluster_custom_object_status`") # noqa: E501 # verify the required parameter 'version' is set - if self.api_client.client_side_validation and ('version' not in local_var_params or # noqa: E501 - local_var_params['version'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('version') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `version` when calling `get_cluster_custom_object_status`") # noqa: E501 # verify the required parameter 'plural' is set - if self.api_client.client_side_validation and ('plural' not in local_var_params or # noqa: E501 - local_var_params['plural'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('plural') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `plural` when calling `get_cluster_custom_object_status`") # noqa: E501 # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `get_cluster_custom_object_status`") # noqa: E501 collection_formats = {} @@ -1568,7 +1902,7 @@ def get_cluster_custom_object_status_with_http_info(self, group, version, plural query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1581,6 +1915,11 @@ def get_cluster_custom_object_status_with_http_info(self, group, version, plural # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "object", + 401: None, + } + return self.api_client.call_api( '/apis/{group}/{version}/{plural}/{name}/status', 'GET', path_params, @@ -1589,13 +1928,14 @@ def get_cluster_custom_object_status_with_http_info(self, group, version, plural body=body_params, post_params=form_params, files=local_var_files, - response_type='object', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def get_namespaced_custom_object(self, group, version, namespace, plural, name, **kwargs): # noqa: E501 """get_namespaced_custom_object # noqa: E501 @@ -1603,25 +1943,34 @@ def get_namespaced_custom_object(self, group, version, namespace, plural, name, Returns a namespace scoped custom object # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_namespaced_custom_object(group, version, namespace, plural, name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str group: the custom resource's group (required) - :param str version: the custom resource's version (required) - :param str namespace: The custom resource's namespace (required) - :param str plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required) - :param str name: the custom object's name (required) + :param group: the custom resource's group (required) + :type group: str + :param version: the custom resource's version (required) + :type version: str + :param namespace: The custom resource's namespace (required) + :type namespace: str + :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required) + :type plural: str + :param name: the custom object's name (required) + :type name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: object + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: object """ kwargs['_return_http_data_only'] = True return self.get_namespaced_custom_object_with_http_info(group, version, namespace, plural, name, **kwargs) # noqa: E501 @@ -1632,27 +1981,42 @@ def get_namespaced_custom_object_with_http_info(self, group, version, namespace, Returns a namespace scoped custom object # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_namespaced_custom_object_with_http_info(group, version, namespace, plural, name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str group: the custom resource's group (required) - :param str version: the custom resource's version (required) - :param str namespace: The custom resource's namespace (required) - :param str plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required) - :param str name: the custom object's name (required) + :param group: the custom resource's group (required) + :type group: str + :param version: the custom resource's version (required) + :type version: str + :param namespace: The custom resource's namespace (required) + :type namespace: str + :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required) + :type plural: str + :param name: the custom object's name (required) + :type name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(object, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1669,7 +2033,10 @@ def get_namespaced_custom_object_with_http_info(self, group, version, namespace, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1682,24 +2049,19 @@ def get_namespaced_custom_object_with_http_info(self, group, version, namespace, local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'group' is set - if self.api_client.client_side_validation and ('group' not in local_var_params or # noqa: E501 - local_var_params['group'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('group') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `group` when calling `get_namespaced_custom_object`") # noqa: E501 # verify the required parameter 'version' is set - if self.api_client.client_side_validation and ('version' not in local_var_params or # noqa: E501 - local_var_params['version'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('version') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `version` when calling `get_namespaced_custom_object`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `get_namespaced_custom_object`") # noqa: E501 # verify the required parameter 'plural' is set - if self.api_client.client_side_validation and ('plural' not in local_var_params or # noqa: E501 - local_var_params['plural'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('plural') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `plural` when calling `get_namespaced_custom_object`") # noqa: E501 # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `get_namespaced_custom_object`") # noqa: E501 collection_formats = {} @@ -1718,7 +2080,7 @@ def get_namespaced_custom_object_with_http_info(self, group, version, namespace, query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1731,6 +2093,11 @@ def get_namespaced_custom_object_with_http_info(self, group, version, namespace, # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "object", + 401: None, + } + return self.api_client.call_api( '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}', 'GET', path_params, @@ -1739,13 +2106,14 @@ def get_namespaced_custom_object_with_http_info(self, group, version, namespace, body=body_params, post_params=form_params, files=local_var_files, - response_type='object', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def get_namespaced_custom_object_scale(self, group, version, namespace, plural, name, **kwargs): # noqa: E501 """get_namespaced_custom_object_scale # noqa: E501 @@ -1753,25 +2121,34 @@ def get_namespaced_custom_object_scale(self, group, version, namespace, plural, read scale of the specified namespace scoped custom object # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_namespaced_custom_object_scale(group, version, namespace, plural, name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str group: the custom resource's group (required) - :param str version: the custom resource's version (required) - :param str namespace: The custom resource's namespace (required) - :param str plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required) - :param str name: the custom object's name (required) + :param group: the custom resource's group (required) + :type group: str + :param version: the custom resource's version (required) + :type version: str + :param namespace: The custom resource's namespace (required) + :type namespace: str + :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required) + :type plural: str + :param name: the custom object's name (required) + :type name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: object + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: object """ kwargs['_return_http_data_only'] = True return self.get_namespaced_custom_object_scale_with_http_info(group, version, namespace, plural, name, **kwargs) # noqa: E501 @@ -1782,27 +2159,42 @@ def get_namespaced_custom_object_scale_with_http_info(self, group, version, name read scale of the specified namespace scoped custom object # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_namespaced_custom_object_scale_with_http_info(group, version, namespace, plural, name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str group: the custom resource's group (required) - :param str version: the custom resource's version (required) - :param str namespace: The custom resource's namespace (required) - :param str plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required) - :param str name: the custom object's name (required) + :param group: the custom resource's group (required) + :type group: str + :param version: the custom resource's version (required) + :type version: str + :param namespace: The custom resource's namespace (required) + :type namespace: str + :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required) + :type plural: str + :param name: the custom object's name (required) + :type name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(object, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1819,7 +2211,10 @@ def get_namespaced_custom_object_scale_with_http_info(self, group, version, name 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1832,24 +2227,19 @@ def get_namespaced_custom_object_scale_with_http_info(self, group, version, name local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'group' is set - if self.api_client.client_side_validation and ('group' not in local_var_params or # noqa: E501 - local_var_params['group'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('group') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `group` when calling `get_namespaced_custom_object_scale`") # noqa: E501 # verify the required parameter 'version' is set - if self.api_client.client_side_validation and ('version' not in local_var_params or # noqa: E501 - local_var_params['version'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('version') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `version` when calling `get_namespaced_custom_object_scale`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `get_namespaced_custom_object_scale`") # noqa: E501 # verify the required parameter 'plural' is set - if self.api_client.client_side_validation and ('plural' not in local_var_params or # noqa: E501 - local_var_params['plural'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('plural') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `plural` when calling `get_namespaced_custom_object_scale`") # noqa: E501 # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `get_namespaced_custom_object_scale`") # noqa: E501 collection_formats = {} @@ -1868,7 +2258,7 @@ def get_namespaced_custom_object_scale_with_http_info(self, group, version, name query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1881,6 +2271,11 @@ def get_namespaced_custom_object_scale_with_http_info(self, group, version, name # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "object", + 401: None, + } + return self.api_client.call_api( '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/scale', 'GET', path_params, @@ -1889,13 +2284,14 @@ def get_namespaced_custom_object_scale_with_http_info(self, group, version, name body=body_params, post_params=form_params, files=local_var_files, - response_type='object', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def get_namespaced_custom_object_status(self, group, version, namespace, plural, name, **kwargs): # noqa: E501 """get_namespaced_custom_object_status # noqa: E501 @@ -1903,25 +2299,34 @@ def get_namespaced_custom_object_status(self, group, version, namespace, plural, read status of the specified namespace scoped custom object # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_namespaced_custom_object_status(group, version, namespace, plural, name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str group: the custom resource's group (required) - :param str version: the custom resource's version (required) - :param str namespace: The custom resource's namespace (required) - :param str plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required) - :param str name: the custom object's name (required) + :param group: the custom resource's group (required) + :type group: str + :param version: the custom resource's version (required) + :type version: str + :param namespace: The custom resource's namespace (required) + :type namespace: str + :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required) + :type plural: str + :param name: the custom object's name (required) + :type name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: object + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: object """ kwargs['_return_http_data_only'] = True return self.get_namespaced_custom_object_status_with_http_info(group, version, namespace, plural, name, **kwargs) # noqa: E501 @@ -1932,27 +2337,42 @@ def get_namespaced_custom_object_status_with_http_info(self, group, version, nam read status of the specified namespace scoped custom object # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_namespaced_custom_object_status_with_http_info(group, version, namespace, plural, name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str group: the custom resource's group (required) - :param str version: the custom resource's version (required) - :param str namespace: The custom resource's namespace (required) - :param str plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required) - :param str name: the custom object's name (required) + :param group: the custom resource's group (required) + :type group: str + :param version: the custom resource's version (required) + :type version: str + :param namespace: The custom resource's namespace (required) + :type namespace: str + :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required) + :type plural: str + :param name: the custom object's name (required) + :type name: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(object, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1969,7 +2389,10 @@ def get_namespaced_custom_object_status_with_http_info(self, group, version, nam 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1982,24 +2405,19 @@ def get_namespaced_custom_object_status_with_http_info(self, group, version, nam local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'group' is set - if self.api_client.client_side_validation and ('group' not in local_var_params or # noqa: E501 - local_var_params['group'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('group') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `group` when calling `get_namespaced_custom_object_status`") # noqa: E501 # verify the required parameter 'version' is set - if self.api_client.client_side_validation and ('version' not in local_var_params or # noqa: E501 - local_var_params['version'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('version') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `version` when calling `get_namespaced_custom_object_status`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `get_namespaced_custom_object_status`") # noqa: E501 # verify the required parameter 'plural' is set - if self.api_client.client_side_validation and ('plural' not in local_var_params or # noqa: E501 - local_var_params['plural'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('plural') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `plural` when calling `get_namespaced_custom_object_status`") # noqa: E501 # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `get_namespaced_custom_object_status`") # noqa: E501 collection_formats = {} @@ -2018,7 +2436,7 @@ def get_namespaced_custom_object_status_with_http_info(self, group, version, nam query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2031,6 +2449,11 @@ def get_namespaced_custom_object_status_with_http_info(self, group, version, nam # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "object", + 401: None, + } + return self.api_client.call_api( '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/status', 'GET', path_params, @@ -2039,13 +2462,14 @@ def get_namespaced_custom_object_status_with_http_info(self, group, version, nam body=body_params, post_params=form_params, files=local_var_files, - response_type='object', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_cluster_custom_object(self, group, version, plural, **kwargs): # noqa: E501 """list_cluster_custom_object # noqa: E501 @@ -2053,33 +2477,50 @@ def list_cluster_custom_object(self, group, version, plural, **kwargs): # noqa: list or watch cluster scoped custom objects # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_cluster_custom_object(group, version, plural, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str group: The custom resource's group name (required) - :param str version: The custom resource's version (required) - :param str plural: The custom resource's plural name. For TPRs this would be lowercase plural kind. (required) - :param str pretty: If 'true', then the output is pretty printed. - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv. - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. + :param group: The custom resource's group name (required) + :type group: str + :param version: The custom resource's version (required) + :type version: str + :param plural: The custom resource's plural name. For TPRs this would be lowercase plural kind. (required) + :type plural: str + :param pretty: If 'true', then the output is pretty printed. + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv. + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: object + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: object """ kwargs['_return_http_data_only'] = True return self.list_cluster_custom_object_with_http_info(group, version, plural, **kwargs) # noqa: E501 @@ -2090,35 +2531,58 @@ def list_cluster_custom_object_with_http_info(self, group, version, plural, **kw list or watch cluster scoped custom objects # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_cluster_custom_object_with_http_info(group, version, plural, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str group: The custom resource's group name (required) - :param str version: The custom resource's version (required) - :param str plural: The custom resource's plural name. For TPRs this would be lowercase plural kind. (required) - :param str pretty: If 'true', then the output is pretty printed. - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv. - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. + :param group: The custom resource's group name (required) + :type group: str + :param version: The custom resource's version (required) + :type version: str + :param plural: The custom resource's plural name. For TPRs this would be lowercase plural kind. (required) + :type plural: str + :param pretty: If 'true', then the output is pretty printed. + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv. + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(object, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -2143,7 +2607,10 @@ def list_cluster_custom_object_with_http_info(self, group, version, plural, **kw 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2156,16 +2623,13 @@ def list_cluster_custom_object_with_http_info(self, group, version, plural, **kw local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'group' is set - if self.api_client.client_side_validation and ('group' not in local_var_params or # noqa: E501 - local_var_params['group'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('group') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `group` when calling `list_cluster_custom_object`") # noqa: E501 # verify the required parameter 'version' is set - if self.api_client.client_side_validation and ('version' not in local_var_params or # noqa: E501 - local_var_params['version'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('version') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `version` when calling `list_cluster_custom_object`") # noqa: E501 # verify the required parameter 'plural' is set - if self.api_client.client_side_validation and ('plural' not in local_var_params or # noqa: E501 - local_var_params['plural'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('plural') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `plural` when calling `list_cluster_custom_object`") # noqa: E501 collection_formats = {} @@ -2179,28 +2643,28 @@ def list_cluster_custom_object_with_http_info(self, group, version, plural, **kw path_params['plural'] = local_var_params['plural'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2213,6 +2677,11 @@ def list_cluster_custom_object_with_http_info(self, group, version, plural, **kw # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "object", + 401: None, + } + return self.api_client.call_api( '/apis/{group}/{version}/{plural}', 'GET', path_params, @@ -2221,13 +2690,242 @@ def list_cluster_custom_object_with_http_info(self, group, version, plural, **kw body=body_params, post_params=form_params, files=local_var_files, - response_type='object', # noqa: E501 + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def list_custom_object_for_all_namespaces(self, group, version, resource_plural, **kwargs): # noqa: E501 + """list_custom_object_for_all_namespaces # noqa: E501 + + list or watch namespace scoped custom objects # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_custom_object_for_all_namespaces(group, version, resource_plural, async_req=True) + >>> result = thread.get() + + :param group: The custom resource's group name (required) + :type group: str + :param version: The custom resource's version (required) + :type version: str + :param resource_plural: The custom resource's plural name. For TPRs this would be lowercase plural kind. (required) + :type resource_plural: str + :param pretty: If 'true', then the output is pretty printed. + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv. + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: object + """ + kwargs['_return_http_data_only'] = True + return self.list_custom_object_for_all_namespaces_with_http_info(group, version, resource_plural, **kwargs) # noqa: E501 + + def list_custom_object_for_all_namespaces_with_http_info(self, group, version, resource_plural, **kwargs): # noqa: E501 + """list_custom_object_for_all_namespaces # noqa: E501 + + list or watch namespace scoped custom objects # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_custom_object_for_all_namespaces_with_http_info(group, version, resource_plural, async_req=True) + >>> result = thread.get() + + :param group: The custom resource's group name (required) + :type group: str + :param version: The custom resource's version (required) + :type version: str + :param resource_plural: The custom resource's plural name. For TPRs this would be lowercase plural kind. (required) + :type resource_plural: str + :param pretty: If 'true', then the output is pretty printed. + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv. + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'group', + 'version', + 'resource_plural', + 'pretty', + 'allow_watch_bookmarks', + '_continue', + 'field_selector', + 'label_selector', + 'limit', + 'resource_version', + 'resource_version_match', + 'timeout_seconds', + 'watch' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_custom_object_for_all_namespaces" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'group' is set + if self.api_client.client_side_validation and local_var_params.get('group') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `group` when calling `list_custom_object_for_all_namespaces`") # noqa: E501 + # verify the required parameter 'version' is set + if self.api_client.client_side_validation and local_var_params.get('version') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `version` when calling `list_custom_object_for_all_namespaces`") # noqa: E501 + # verify the required parameter 'resource_plural' is set + if self.api_client.client_side_validation and local_var_params.get('resource_plural') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `resource_plural` when calling `list_custom_object_for_all_namespaces`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'group' in local_var_params: + path_params['group'] = local_var_params['group'] # noqa: E501 + if 'version' in local_var_params: + path_params['version'] = local_var_params['version'] # noqa: E501 + if 'resource_plural' in local_var_params: + path_params['resource_plural'] = local_var_params['resource_plural'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 + query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 + query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 + query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 + query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 + query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 + query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 + query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 + query_params.append(('watch', local_var_params['watch'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/json;stream=watch']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "object", + 401: None, + } + + return self.api_client.call_api( + '/apis/{group}/{version}/{resource_plural}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_namespaced_custom_object(self, group, version, namespace, plural, **kwargs): # noqa: E501 """list_namespaced_custom_object # noqa: E501 @@ -2235,34 +2933,52 @@ def list_namespaced_custom_object(self, group, version, namespace, plural, **kwa list or watch namespace scoped custom objects # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_namespaced_custom_object(group, version, namespace, plural, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str group: The custom resource's group name (required) - :param str version: The custom resource's version (required) - :param str namespace: The custom resource's namespace (required) - :param str plural: The custom resource's plural name. For TPRs this would be lowercase plural kind. (required) - :param str pretty: If 'true', then the output is pretty printed. - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv. - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. + :param group: The custom resource's group name (required) + :type group: str + :param version: The custom resource's version (required) + :type version: str + :param namespace: The custom resource's namespace (required) + :type namespace: str + :param plural: The custom resource's plural name. For TPRs this would be lowercase plural kind. (required) + :type plural: str + :param pretty: If 'true', then the output is pretty printed. + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv. + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: object + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: object """ kwargs['_return_http_data_only'] = True return self.list_namespaced_custom_object_with_http_info(group, version, namespace, plural, **kwargs) # noqa: E501 @@ -2273,36 +2989,60 @@ def list_namespaced_custom_object_with_http_info(self, group, version, namespace list or watch namespace scoped custom objects # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_namespaced_custom_object_with_http_info(group, version, namespace, plural, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str group: The custom resource's group name (required) - :param str version: The custom resource's version (required) - :param str namespace: The custom resource's namespace (required) - :param str plural: The custom resource's plural name. For TPRs this would be lowercase plural kind. (required) - :param str pretty: If 'true', then the output is pretty printed. - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv. - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. + :param group: The custom resource's group name (required) + :type group: str + :param version: The custom resource's version (required) + :type version: str + :param namespace: The custom resource's namespace (required) + :type namespace: str + :param plural: The custom resource's plural name. For TPRs this would be lowercase plural kind. (required) + :type plural: str + :param pretty: If 'true', then the output is pretty printed. + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv. + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(object, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -2328,7 +3068,10 @@ def list_namespaced_custom_object_with_http_info(self, group, version, namespace 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2341,20 +3084,16 @@ def list_namespaced_custom_object_with_http_info(self, group, version, namespace local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'group' is set - if self.api_client.client_side_validation and ('group' not in local_var_params or # noqa: E501 - local_var_params['group'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('group') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `group` when calling `list_namespaced_custom_object`") # noqa: E501 # verify the required parameter 'version' is set - if self.api_client.client_side_validation and ('version' not in local_var_params or # noqa: E501 - local_var_params['version'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('version') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `version` when calling `list_namespaced_custom_object`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_custom_object`") # noqa: E501 # verify the required parameter 'plural' is set - if self.api_client.client_side_validation and ('plural' not in local_var_params or # noqa: E501 - local_var_params['plural'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('plural') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `plural` when calling `list_namespaced_custom_object`") # noqa: E501 collection_formats = {} @@ -2370,28 +3109,28 @@ def list_namespaced_custom_object_with_http_info(self, group, version, namespace path_params['plural'] = local_var_params['plural'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2404,6 +3143,11 @@ def list_namespaced_custom_object_with_http_info(self, group, version, namespace # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "object", + 401: None, + } + return self.api_client.call_api( '/apis/{group}/{version}/namespaces/{namespace}/{plural}', 'GET', path_params, @@ -2412,13 +3156,14 @@ def list_namespaced_custom_object_with_http_info(self, group, version, namespace body=body_params, post_params=form_params, files=local_var_files, - response_type='object', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_cluster_custom_object(self, group, version, plural, name, body, **kwargs): # noqa: E501 """patch_cluster_custom_object # noqa: E501 @@ -2426,29 +3171,42 @@ def patch_cluster_custom_object(self, group, version, plural, name, body, **kwar patch the specified cluster scoped custom object # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_cluster_custom_object(group, version, plural, name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str group: the custom resource's group (required) - :param str version: the custom resource's version (required) - :param str plural: the custom object's plural name. For TPRs this would be lowercase plural kind. (required) - :param str name: the custom object's name (required) - :param object body: The JSON schema of the Resource to patch. (required) - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param group: the custom resource's group (required) + :type group: str + :param version: the custom resource's version (required) + :type version: str + :param plural: the custom object's plural name. For TPRs this would be lowercase plural kind. (required) + :type plural: str + :param name: the custom object's name (required) + :type name: str + :param body: The JSON schema of the Resource to patch. (required) + :type body: object + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: object + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: object """ kwargs['_return_http_data_only'] = True return self.patch_cluster_custom_object_with_http_info(group, version, plural, name, body, **kwargs) # noqa: E501 @@ -2459,31 +3217,50 @@ def patch_cluster_custom_object_with_http_info(self, group, version, plural, nam patch the specified cluster scoped custom object # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_cluster_custom_object_with_http_info(group, version, plural, name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str group: the custom resource's group (required) - :param str version: the custom resource's version (required) - :param str plural: the custom object's plural name. For TPRs this would be lowercase plural kind. (required) - :param str name: the custom object's name (required) - :param object body: The JSON schema of the Resource to patch. (required) - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param group: the custom resource's group (required) + :type group: str + :param version: the custom resource's version (required) + :type version: str + :param plural: the custom object's plural name. For TPRs this would be lowercase plural kind. (required) + :type plural: str + :param name: the custom object's name (required) + :type name: str + :param body: The JSON schema of the Resource to patch. (required) + :type body: object + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(object, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -2504,7 +3281,10 @@ def patch_cluster_custom_object_with_http_info(self, group, version, plural, nam 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2517,24 +3297,19 @@ def patch_cluster_custom_object_with_http_info(self, group, version, plural, nam local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'group' is set - if self.api_client.client_side_validation and ('group' not in local_var_params or # noqa: E501 - local_var_params['group'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('group') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `group` when calling `patch_cluster_custom_object`") # noqa: E501 # verify the required parameter 'version' is set - if self.api_client.client_side_validation and ('version' not in local_var_params or # noqa: E501 - local_var_params['version'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('version') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `version` when calling `patch_cluster_custom_object`") # noqa: E501 # verify the required parameter 'plural' is set - if self.api_client.client_side_validation and ('plural' not in local_var_params or # noqa: E501 - local_var_params['plural'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('plural') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `plural` when calling `patch_cluster_custom_object`") # noqa: E501 # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_cluster_custom_object`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_cluster_custom_object`") # noqa: E501 collection_formats = {} @@ -2550,16 +3325,16 @@ def patch_cluster_custom_object_with_http_info(self, group, version, plural, nam path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2572,12 +3347,21 @@ def patch_cluster_custom_object_with_http_info(self, group, version, plural, nam ['application/json']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/merge-patch+json']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/merge-patch+json'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "object", + 401: None, + } + return self.api_client.call_api( '/apis/{group}/{version}/{plural}/{name}', 'PATCH', path_params, @@ -2586,13 +3370,14 @@ def patch_cluster_custom_object_with_http_info(self, group, version, plural, nam body=body_params, post_params=form_params, files=local_var_files, - response_type='object', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_cluster_custom_object_scale(self, group, version, plural, name, body, **kwargs): # noqa: E501 """patch_cluster_custom_object_scale # noqa: E501 @@ -2600,29 +3385,42 @@ def patch_cluster_custom_object_scale(self, group, version, plural, name, body, partially update scale of the specified cluster scoped custom object # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_cluster_custom_object_scale(group, version, plural, name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str group: the custom resource's group (required) - :param str version: the custom resource's version (required) - :param str plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required) - :param str name: the custom object's name (required) - :param object body: (required) - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param group: the custom resource's group (required) + :type group: str + :param version: the custom resource's version (required) + :type version: str + :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required) + :type plural: str + :param name: the custom object's name (required) + :type name: str + :param body: (required) + :type body: object + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: object + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: object """ kwargs['_return_http_data_only'] = True return self.patch_cluster_custom_object_scale_with_http_info(group, version, plural, name, body, **kwargs) # noqa: E501 @@ -2633,31 +3431,50 @@ def patch_cluster_custom_object_scale_with_http_info(self, group, version, plura partially update scale of the specified cluster scoped custom object # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_cluster_custom_object_scale_with_http_info(group, version, plural, name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str group: the custom resource's group (required) - :param str version: the custom resource's version (required) - :param str plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required) - :param str name: the custom object's name (required) - :param object body: (required) - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param group: the custom resource's group (required) + :type group: str + :param version: the custom resource's version (required) + :type version: str + :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required) + :type plural: str + :param name: the custom object's name (required) + :type name: str + :param body: (required) + :type body: object + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(object, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -2678,7 +3495,10 @@ def patch_cluster_custom_object_scale_with_http_info(self, group, version, plura 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2691,24 +3511,19 @@ def patch_cluster_custom_object_scale_with_http_info(self, group, version, plura local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'group' is set - if self.api_client.client_side_validation and ('group' not in local_var_params or # noqa: E501 - local_var_params['group'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('group') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `group` when calling `patch_cluster_custom_object_scale`") # noqa: E501 # verify the required parameter 'version' is set - if self.api_client.client_side_validation and ('version' not in local_var_params or # noqa: E501 - local_var_params['version'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('version') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `version` when calling `patch_cluster_custom_object_scale`") # noqa: E501 # verify the required parameter 'plural' is set - if self.api_client.client_side_validation and ('plural' not in local_var_params or # noqa: E501 - local_var_params['plural'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('plural') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `plural` when calling `patch_cluster_custom_object_scale`") # noqa: E501 # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_cluster_custom_object_scale`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_cluster_custom_object_scale`") # noqa: E501 collection_formats = {} @@ -2724,16 +3539,16 @@ def patch_cluster_custom_object_scale_with_http_info(self, group, version, plura path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2746,12 +3561,21 @@ def patch_cluster_custom_object_scale_with_http_info(self, group, version, plura ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/merge-patch+json']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/merge-patch+json'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "object", + 401: None, + } + return self.api_client.call_api( '/apis/{group}/{version}/{plural}/{name}/scale', 'PATCH', path_params, @@ -2760,13 +3584,14 @@ def patch_cluster_custom_object_scale_with_http_info(self, group, version, plura body=body_params, post_params=form_params, files=local_var_files, - response_type='object', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_cluster_custom_object_status(self, group, version, plural, name, body, **kwargs): # noqa: E501 """patch_cluster_custom_object_status # noqa: E501 @@ -2774,29 +3599,42 @@ def patch_cluster_custom_object_status(self, group, version, plural, name, body, partially update status of the specified cluster scoped custom object # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_cluster_custom_object_status(group, version, plural, name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str group: the custom resource's group (required) - :param str version: the custom resource's version (required) - :param str plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required) - :param str name: the custom object's name (required) - :param object body: (required) - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param group: the custom resource's group (required) + :type group: str + :param version: the custom resource's version (required) + :type version: str + :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required) + :type plural: str + :param name: the custom object's name (required) + :type name: str + :param body: (required) + :type body: object + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: object + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: object """ kwargs['_return_http_data_only'] = True return self.patch_cluster_custom_object_status_with_http_info(group, version, plural, name, body, **kwargs) # noqa: E501 @@ -2807,31 +3645,50 @@ def patch_cluster_custom_object_status_with_http_info(self, group, version, plur partially update status of the specified cluster scoped custom object # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_cluster_custom_object_status_with_http_info(group, version, plural, name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str group: the custom resource's group (required) - :param str version: the custom resource's version (required) - :param str plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required) - :param str name: the custom object's name (required) - :param object body: (required) - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param group: the custom resource's group (required) + :type group: str + :param version: the custom resource's version (required) + :type version: str + :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required) + :type plural: str + :param name: the custom object's name (required) + :type name: str + :param body: (required) + :type body: object + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(object, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -2852,7 +3709,10 @@ def patch_cluster_custom_object_status_with_http_info(self, group, version, plur 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2865,24 +3725,19 @@ def patch_cluster_custom_object_status_with_http_info(self, group, version, plur local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'group' is set - if self.api_client.client_side_validation and ('group' not in local_var_params or # noqa: E501 - local_var_params['group'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('group') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `group` when calling `patch_cluster_custom_object_status`") # noqa: E501 # verify the required parameter 'version' is set - if self.api_client.client_side_validation and ('version' not in local_var_params or # noqa: E501 - local_var_params['version'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('version') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `version` when calling `patch_cluster_custom_object_status`") # noqa: E501 # verify the required parameter 'plural' is set - if self.api_client.client_side_validation and ('plural' not in local_var_params or # noqa: E501 - local_var_params['plural'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('plural') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `plural` when calling `patch_cluster_custom_object_status`") # noqa: E501 # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_cluster_custom_object_status`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_cluster_custom_object_status`") # noqa: E501 collection_formats = {} @@ -2898,16 +3753,16 @@ def patch_cluster_custom_object_status_with_http_info(self, group, version, plur path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2920,12 +3775,21 @@ def patch_cluster_custom_object_status_with_http_info(self, group, version, plur ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/merge-patch+json']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/merge-patch+json'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "object", + 401: None, + } + return self.api_client.call_api( '/apis/{group}/{version}/{plural}/{name}/status', 'PATCH', path_params, @@ -2934,13 +3798,14 @@ def patch_cluster_custom_object_status_with_http_info(self, group, version, plur body=body_params, post_params=form_params, files=local_var_files, - response_type='object', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_namespaced_custom_object(self, group, version, namespace, plural, name, body, **kwargs): # noqa: E501 """patch_namespaced_custom_object # noqa: E501 @@ -2948,30 +3813,44 @@ def patch_namespaced_custom_object(self, group, version, namespace, plural, name patch the specified namespace scoped custom object # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_custom_object(group, version, namespace, plural, name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str group: the custom resource's group (required) - :param str version: the custom resource's version (required) - :param str namespace: The custom resource's namespace (required) - :param str plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required) - :param str name: the custom object's name (required) - :param object body: The JSON schema of the Resource to patch. (required) - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param group: the custom resource's group (required) + :type group: str + :param version: the custom resource's version (required) + :type version: str + :param namespace: The custom resource's namespace (required) + :type namespace: str + :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required) + :type plural: str + :param name: the custom object's name (required) + :type name: str + :param body: The JSON schema of the Resource to patch. (required) + :type body: object + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: object + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: object """ kwargs['_return_http_data_only'] = True return self.patch_namespaced_custom_object_with_http_info(group, version, namespace, plural, name, body, **kwargs) # noqa: E501 @@ -2982,32 +3861,52 @@ def patch_namespaced_custom_object_with_http_info(self, group, version, namespac patch the specified namespace scoped custom object # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_custom_object_with_http_info(group, version, namespace, plural, name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str group: the custom resource's group (required) - :param str version: the custom resource's version (required) - :param str namespace: The custom resource's namespace (required) - :param str plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required) - :param str name: the custom object's name (required) - :param object body: The JSON schema of the Resource to patch. (required) - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param group: the custom resource's group (required) + :type group: str + :param version: the custom resource's version (required) + :type version: str + :param namespace: The custom resource's namespace (required) + :type namespace: str + :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required) + :type plural: str + :param name: the custom object's name (required) + :type name: str + :param body: The JSON schema of the Resource to patch. (required) + :type body: object + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(object, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -3029,7 +3928,10 @@ def patch_namespaced_custom_object_with_http_info(self, group, version, namespac 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -3042,28 +3944,22 @@ def patch_namespaced_custom_object_with_http_info(self, group, version, namespac local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'group' is set - if self.api_client.client_side_validation and ('group' not in local_var_params or # noqa: E501 - local_var_params['group'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('group') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `group` when calling `patch_namespaced_custom_object`") # noqa: E501 # verify the required parameter 'version' is set - if self.api_client.client_side_validation and ('version' not in local_var_params or # noqa: E501 - local_var_params['version'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('version') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `version` when calling `patch_namespaced_custom_object`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_custom_object`") # noqa: E501 # verify the required parameter 'plural' is set - if self.api_client.client_side_validation and ('plural' not in local_var_params or # noqa: E501 - local_var_params['plural'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('plural') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `plural` when calling `patch_namespaced_custom_object`") # noqa: E501 # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_custom_object`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_custom_object`") # noqa: E501 collection_formats = {} @@ -3081,16 +3977,16 @@ def patch_namespaced_custom_object_with_http_info(self, group, version, namespac path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -3103,12 +3999,21 @@ def patch_namespaced_custom_object_with_http_info(self, group, version, namespac ['application/json']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/merge-patch+json']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/merge-patch+json'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "object", + 401: None, + } + return self.api_client.call_api( '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}', 'PATCH', path_params, @@ -3117,13 +4022,14 @@ def patch_namespaced_custom_object_with_http_info(self, group, version, namespac body=body_params, post_params=form_params, files=local_var_files, - response_type='object', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_namespaced_custom_object_scale(self, group, version, namespace, plural, name, body, **kwargs): # noqa: E501 """patch_namespaced_custom_object_scale # noqa: E501 @@ -3131,30 +4037,44 @@ def patch_namespaced_custom_object_scale(self, group, version, namespace, plural partially update scale of the specified namespace scoped custom object # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_custom_object_scale(group, version, namespace, plural, name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str group: the custom resource's group (required) - :param str version: the custom resource's version (required) - :param str namespace: The custom resource's namespace (required) - :param str plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required) - :param str name: the custom object's name (required) - :param object body: (required) - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param group: the custom resource's group (required) + :type group: str + :param version: the custom resource's version (required) + :type version: str + :param namespace: The custom resource's namespace (required) + :type namespace: str + :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required) + :type plural: str + :param name: the custom object's name (required) + :type name: str + :param body: (required) + :type body: object + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: object + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: object """ kwargs['_return_http_data_only'] = True return self.patch_namespaced_custom_object_scale_with_http_info(group, version, namespace, plural, name, body, **kwargs) # noqa: E501 @@ -3165,32 +4085,52 @@ def patch_namespaced_custom_object_scale_with_http_info(self, group, version, na partially update scale of the specified namespace scoped custom object # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_custom_object_scale_with_http_info(group, version, namespace, plural, name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str group: the custom resource's group (required) - :param str version: the custom resource's version (required) - :param str namespace: The custom resource's namespace (required) - :param str plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required) - :param str name: the custom object's name (required) - :param object body: (required) - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param group: the custom resource's group (required) + :type group: str + :param version: the custom resource's version (required) + :type version: str + :param namespace: The custom resource's namespace (required) + :type namespace: str + :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required) + :type plural: str + :param name: the custom object's name (required) + :type name: str + :param body: (required) + :type body: object + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(object, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -3212,7 +4152,10 @@ def patch_namespaced_custom_object_scale_with_http_info(self, group, version, na 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -3225,28 +4168,22 @@ def patch_namespaced_custom_object_scale_with_http_info(self, group, version, na local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'group' is set - if self.api_client.client_side_validation and ('group' not in local_var_params or # noqa: E501 - local_var_params['group'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('group') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `group` when calling `patch_namespaced_custom_object_scale`") # noqa: E501 # verify the required parameter 'version' is set - if self.api_client.client_side_validation and ('version' not in local_var_params or # noqa: E501 - local_var_params['version'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('version') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `version` when calling `patch_namespaced_custom_object_scale`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_custom_object_scale`") # noqa: E501 # verify the required parameter 'plural' is set - if self.api_client.client_side_validation and ('plural' not in local_var_params or # noqa: E501 - local_var_params['plural'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('plural') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `plural` when calling `patch_namespaced_custom_object_scale`") # noqa: E501 # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_custom_object_scale`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_custom_object_scale`") # noqa: E501 collection_formats = {} @@ -3264,16 +4201,16 @@ def patch_namespaced_custom_object_scale_with_http_info(self, group, version, na path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -3286,12 +4223,21 @@ def patch_namespaced_custom_object_scale_with_http_info(self, group, version, na ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/merge-patch+json']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/merge-patch+json', 'application/apply-patch+yaml'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "object", + 401: None, + } + return self.api_client.call_api( '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/scale', 'PATCH', path_params, @@ -3300,13 +4246,14 @@ def patch_namespaced_custom_object_scale_with_http_info(self, group, version, na body=body_params, post_params=form_params, files=local_var_files, - response_type='object', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_namespaced_custom_object_status(self, group, version, namespace, plural, name, body, **kwargs): # noqa: E501 """patch_namespaced_custom_object_status # noqa: E501 @@ -3314,30 +4261,44 @@ def patch_namespaced_custom_object_status(self, group, version, namespace, plura partially update status of the specified namespace scoped custom object # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_custom_object_status(group, version, namespace, plural, name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str group: the custom resource's group (required) - :param str version: the custom resource's version (required) - :param str namespace: The custom resource's namespace (required) - :param str plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required) - :param str name: the custom object's name (required) - :param object body: (required) - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param group: the custom resource's group (required) + :type group: str + :param version: the custom resource's version (required) + :type version: str + :param namespace: The custom resource's namespace (required) + :type namespace: str + :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required) + :type plural: str + :param name: the custom object's name (required) + :type name: str + :param body: (required) + :type body: object + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: object + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: object """ kwargs['_return_http_data_only'] = True return self.patch_namespaced_custom_object_status_with_http_info(group, version, namespace, plural, name, body, **kwargs) # noqa: E501 @@ -3348,32 +4309,52 @@ def patch_namespaced_custom_object_status_with_http_info(self, group, version, n partially update status of the specified namespace scoped custom object # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_custom_object_status_with_http_info(group, version, namespace, plural, name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str group: the custom resource's group (required) - :param str version: the custom resource's version (required) - :param str namespace: The custom resource's namespace (required) - :param str plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required) - :param str name: the custom object's name (required) - :param object body: (required) - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param group: the custom resource's group (required) + :type group: str + :param version: the custom resource's version (required) + :type version: str + :param namespace: The custom resource's namespace (required) + :type namespace: str + :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required) + :type plural: str + :param name: the custom object's name (required) + :type name: str + :param body: (required) + :type body: object + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(object, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -3395,7 +4376,10 @@ def patch_namespaced_custom_object_status_with_http_info(self, group, version, n 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -3408,28 +4392,22 @@ def patch_namespaced_custom_object_status_with_http_info(self, group, version, n local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'group' is set - if self.api_client.client_side_validation and ('group' not in local_var_params or # noqa: E501 - local_var_params['group'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('group') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `group` when calling `patch_namespaced_custom_object_status`") # noqa: E501 # verify the required parameter 'version' is set - if self.api_client.client_side_validation and ('version' not in local_var_params or # noqa: E501 - local_var_params['version'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('version') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `version` when calling `patch_namespaced_custom_object_status`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_custom_object_status`") # noqa: E501 # verify the required parameter 'plural' is set - if self.api_client.client_side_validation and ('plural' not in local_var_params or # noqa: E501 - local_var_params['plural'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('plural') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `plural` when calling `patch_namespaced_custom_object_status`") # noqa: E501 # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_custom_object_status`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_custom_object_status`") # noqa: E501 collection_formats = {} @@ -3447,16 +4425,16 @@ def patch_namespaced_custom_object_status_with_http_info(self, group, version, n path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -3469,12 +4447,21 @@ def patch_namespaced_custom_object_status_with_http_info(self, group, version, n ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/merge-patch+json']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/merge-patch+json', 'application/apply-patch+yaml'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "object", + 401: None, + } + return self.api_client.call_api( '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/status', 'PATCH', path_params, @@ -3483,13 +4470,14 @@ def patch_namespaced_custom_object_status_with_http_info(self, group, version, n body=body_params, post_params=form_params, files=local_var_files, - response_type='object', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_cluster_custom_object(self, group, version, plural, name, body, **kwargs): # noqa: E501 """replace_cluster_custom_object # noqa: E501 @@ -3497,28 +4485,40 @@ def replace_cluster_custom_object(self, group, version, plural, name, body, **kw replace the specified cluster scoped custom object # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_cluster_custom_object(group, version, plural, name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str group: the custom resource's group (required) - :param str version: the custom resource's version (required) - :param str plural: the custom object's plural name. For TPRs this would be lowercase plural kind. (required) - :param str name: the custom object's name (required) - :param object body: The JSON schema of the Resource to replace. (required) - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + :param group: the custom resource's group (required) + :type group: str + :param version: the custom resource's version (required) + :type version: str + :param plural: the custom object's plural name. For TPRs this would be lowercase plural kind. (required) + :type plural: str + :param name: the custom object's name (required) + :type name: str + :param body: The JSON schema of the Resource to replace. (required) + :type body: object + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: object + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: object """ kwargs['_return_http_data_only'] = True return self.replace_cluster_custom_object_with_http_info(group, version, plural, name, body, **kwargs) # noqa: E501 @@ -3529,30 +4529,48 @@ def replace_cluster_custom_object_with_http_info(self, group, version, plural, n replace the specified cluster scoped custom object # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_cluster_custom_object_with_http_info(group, version, plural, name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str group: the custom resource's group (required) - :param str version: the custom resource's version (required) - :param str plural: the custom object's plural name. For TPRs this would be lowercase plural kind. (required) - :param str name: the custom object's name (required) - :param object body: The JSON schema of the Resource to replace. (required) - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + :param group: the custom resource's group (required) + :type group: str + :param version: the custom resource's version (required) + :type version: str + :param plural: the custom object's plural name. For TPRs this would be lowercase plural kind. (required) + :type plural: str + :param name: the custom object's name (required) + :type name: str + :param body: The JSON schema of the Resource to replace. (required) + :type body: object + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(object, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -3572,7 +4590,10 @@ def replace_cluster_custom_object_with_http_info(self, group, version, plural, n 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -3585,24 +4606,19 @@ def replace_cluster_custom_object_with_http_info(self, group, version, plural, n local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'group' is set - if self.api_client.client_side_validation and ('group' not in local_var_params or # noqa: E501 - local_var_params['group'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('group') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `group` when calling `replace_cluster_custom_object`") # noqa: E501 # verify the required parameter 'version' is set - if self.api_client.client_side_validation and ('version' not in local_var_params or # noqa: E501 - local_var_params['version'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('version') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `version` when calling `replace_cluster_custom_object`") # noqa: E501 # verify the required parameter 'plural' is set - if self.api_client.client_side_validation and ('plural' not in local_var_params or # noqa: E501 - local_var_params['plural'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('plural') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `plural` when calling `replace_cluster_custom_object`") # noqa: E501 # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_cluster_custom_object`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_cluster_custom_object`") # noqa: E501 collection_formats = {} @@ -3618,14 +4634,14 @@ def replace_cluster_custom_object_with_http_info(self, group, version, plural, n path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -3640,6 +4656,11 @@ def replace_cluster_custom_object_with_http_info(self, group, version, plural, n # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "object", + 401: None, + } + return self.api_client.call_api( '/apis/{group}/{version}/{plural}/{name}', 'PUT', path_params, @@ -3648,13 +4669,14 @@ def replace_cluster_custom_object_with_http_info(self, group, version, plural, n body=body_params, post_params=form_params, files=local_var_files, - response_type='object', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_cluster_custom_object_scale(self, group, version, plural, name, body, **kwargs): # noqa: E501 """replace_cluster_custom_object_scale # noqa: E501 @@ -3662,28 +4684,40 @@ def replace_cluster_custom_object_scale(self, group, version, plural, name, body replace scale of the specified cluster scoped custom object # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_cluster_custom_object_scale(group, version, plural, name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str group: the custom resource's group (required) - :param str version: the custom resource's version (required) - :param str plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required) - :param str name: the custom object's name (required) - :param object body: (required) - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + :param group: the custom resource's group (required) + :type group: str + :param version: the custom resource's version (required) + :type version: str + :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required) + :type plural: str + :param name: the custom object's name (required) + :type name: str + :param body: (required) + :type body: object + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: object + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: object """ kwargs['_return_http_data_only'] = True return self.replace_cluster_custom_object_scale_with_http_info(group, version, plural, name, body, **kwargs) # noqa: E501 @@ -3694,30 +4728,48 @@ def replace_cluster_custom_object_scale_with_http_info(self, group, version, plu replace scale of the specified cluster scoped custom object # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_cluster_custom_object_scale_with_http_info(group, version, plural, name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str group: the custom resource's group (required) - :param str version: the custom resource's version (required) - :param str plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required) - :param str name: the custom object's name (required) - :param object body: (required) - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + :param group: the custom resource's group (required) + :type group: str + :param version: the custom resource's version (required) + :type version: str + :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required) + :type plural: str + :param name: the custom object's name (required) + :type name: str + :param body: (required) + :type body: object + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(object, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -3737,7 +4789,10 @@ def replace_cluster_custom_object_scale_with_http_info(self, group, version, plu 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -3750,24 +4805,19 @@ def replace_cluster_custom_object_scale_with_http_info(self, group, version, plu local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'group' is set - if self.api_client.client_side_validation and ('group' not in local_var_params or # noqa: E501 - local_var_params['group'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('group') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `group` when calling `replace_cluster_custom_object_scale`") # noqa: E501 # verify the required parameter 'version' is set - if self.api_client.client_side_validation and ('version' not in local_var_params or # noqa: E501 - local_var_params['version'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('version') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `version` when calling `replace_cluster_custom_object_scale`") # noqa: E501 # verify the required parameter 'plural' is set - if self.api_client.client_side_validation and ('plural' not in local_var_params or # noqa: E501 - local_var_params['plural'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('plural') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `plural` when calling `replace_cluster_custom_object_scale`") # noqa: E501 # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_cluster_custom_object_scale`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_cluster_custom_object_scale`") # noqa: E501 collection_formats = {} @@ -3783,14 +4833,14 @@ def replace_cluster_custom_object_scale_with_http_info(self, group, version, plu path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -3805,6 +4855,12 @@ def replace_cluster_custom_object_scale_with_http_info(self, group, version, plu # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "object", + 201: "object", + 401: None, + } + return self.api_client.call_api( '/apis/{group}/{version}/{plural}/{name}/scale', 'PUT', path_params, @@ -3813,13 +4869,14 @@ def replace_cluster_custom_object_scale_with_http_info(self, group, version, plu body=body_params, post_params=form_params, files=local_var_files, - response_type='object', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_cluster_custom_object_status(self, group, version, plural, name, body, **kwargs): # noqa: E501 """replace_cluster_custom_object_status # noqa: E501 @@ -3827,28 +4884,40 @@ def replace_cluster_custom_object_status(self, group, version, plural, name, bod replace status of the cluster scoped specified custom object # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_cluster_custom_object_status(group, version, plural, name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str group: the custom resource's group (required) - :param str version: the custom resource's version (required) - :param str plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required) - :param str name: the custom object's name (required) - :param object body: (required) - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + :param group: the custom resource's group (required) + :type group: str + :param version: the custom resource's version (required) + :type version: str + :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required) + :type plural: str + :param name: the custom object's name (required) + :type name: str + :param body: (required) + :type body: object + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: object + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: object """ kwargs['_return_http_data_only'] = True return self.replace_cluster_custom_object_status_with_http_info(group, version, plural, name, body, **kwargs) # noqa: E501 @@ -3859,30 +4928,48 @@ def replace_cluster_custom_object_status_with_http_info(self, group, version, pl replace status of the cluster scoped specified custom object # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_cluster_custom_object_status_with_http_info(group, version, plural, name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str group: the custom resource's group (required) - :param str version: the custom resource's version (required) - :param str plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required) - :param str name: the custom object's name (required) - :param object body: (required) - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + :param group: the custom resource's group (required) + :type group: str + :param version: the custom resource's version (required) + :type version: str + :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required) + :type plural: str + :param name: the custom object's name (required) + :type name: str + :param body: (required) + :type body: object + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(object, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -3902,7 +4989,10 @@ def replace_cluster_custom_object_status_with_http_info(self, group, version, pl 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -3915,24 +5005,19 @@ def replace_cluster_custom_object_status_with_http_info(self, group, version, pl local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'group' is set - if self.api_client.client_side_validation and ('group' not in local_var_params or # noqa: E501 - local_var_params['group'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('group') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `group` when calling `replace_cluster_custom_object_status`") # noqa: E501 # verify the required parameter 'version' is set - if self.api_client.client_side_validation and ('version' not in local_var_params or # noqa: E501 - local_var_params['version'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('version') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `version` when calling `replace_cluster_custom_object_status`") # noqa: E501 # verify the required parameter 'plural' is set - if self.api_client.client_side_validation and ('plural' not in local_var_params or # noqa: E501 - local_var_params['plural'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('plural') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `plural` when calling `replace_cluster_custom_object_status`") # noqa: E501 # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_cluster_custom_object_status`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_cluster_custom_object_status`") # noqa: E501 collection_formats = {} @@ -3948,14 +5033,14 @@ def replace_cluster_custom_object_status_with_http_info(self, group, version, pl path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -3970,6 +5055,12 @@ def replace_cluster_custom_object_status_with_http_info(self, group, version, pl # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "object", + 201: "object", + 401: None, + } + return self.api_client.call_api( '/apis/{group}/{version}/{plural}/{name}/status', 'PUT', path_params, @@ -3978,13 +5069,14 @@ def replace_cluster_custom_object_status_with_http_info(self, group, version, pl body=body_params, post_params=form_params, files=local_var_files, - response_type='object', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_namespaced_custom_object(self, group, version, namespace, plural, name, body, **kwargs): # noqa: E501 """replace_namespaced_custom_object # noqa: E501 @@ -3992,29 +5084,42 @@ def replace_namespaced_custom_object(self, group, version, namespace, plural, na replace the specified namespace scoped custom object # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_custom_object(group, version, namespace, plural, name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str group: the custom resource's group (required) - :param str version: the custom resource's version (required) - :param str namespace: The custom resource's namespace (required) - :param str plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required) - :param str name: the custom object's name (required) - :param object body: The JSON schema of the Resource to replace. (required) - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + :param group: the custom resource's group (required) + :type group: str + :param version: the custom resource's version (required) + :type version: str + :param namespace: The custom resource's namespace (required) + :type namespace: str + :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required) + :type plural: str + :param name: the custom object's name (required) + :type name: str + :param body: The JSON schema of the Resource to replace. (required) + :type body: object + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: object + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: object """ kwargs['_return_http_data_only'] = True return self.replace_namespaced_custom_object_with_http_info(group, version, namespace, plural, name, body, **kwargs) # noqa: E501 @@ -4025,31 +5130,50 @@ def replace_namespaced_custom_object_with_http_info(self, group, version, namesp replace the specified namespace scoped custom object # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_custom_object_with_http_info(group, version, namespace, plural, name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str group: the custom resource's group (required) - :param str version: the custom resource's version (required) - :param str namespace: The custom resource's namespace (required) - :param str plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required) - :param str name: the custom object's name (required) - :param object body: The JSON schema of the Resource to replace. (required) - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + :param group: the custom resource's group (required) + :type group: str + :param version: the custom resource's version (required) + :type version: str + :param namespace: The custom resource's namespace (required) + :type namespace: str + :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required) + :type plural: str + :param name: the custom object's name (required) + :type name: str + :param body: The JSON schema of the Resource to replace. (required) + :type body: object + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(object, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -4070,7 +5194,10 @@ def replace_namespaced_custom_object_with_http_info(self, group, version, namesp 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -4083,28 +5210,22 @@ def replace_namespaced_custom_object_with_http_info(self, group, version, namesp local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'group' is set - if self.api_client.client_side_validation and ('group' not in local_var_params or # noqa: E501 - local_var_params['group'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('group') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `group` when calling `replace_namespaced_custom_object`") # noqa: E501 # verify the required parameter 'version' is set - if self.api_client.client_side_validation and ('version' not in local_var_params or # noqa: E501 - local_var_params['version'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('version') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `version` when calling `replace_namespaced_custom_object`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_custom_object`") # noqa: E501 # verify the required parameter 'plural' is set - if self.api_client.client_side_validation and ('plural' not in local_var_params or # noqa: E501 - local_var_params['plural'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('plural') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `plural` when calling `replace_namespaced_custom_object`") # noqa: E501 # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_custom_object`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_custom_object`") # noqa: E501 collection_formats = {} @@ -4122,14 +5243,14 @@ def replace_namespaced_custom_object_with_http_info(self, group, version, namesp path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -4144,6 +5265,11 @@ def replace_namespaced_custom_object_with_http_info(self, group, version, namesp # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "object", + 401: None, + } + return self.api_client.call_api( '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}', 'PUT', path_params, @@ -4152,13 +5278,14 @@ def replace_namespaced_custom_object_with_http_info(self, group, version, namesp body=body_params, post_params=form_params, files=local_var_files, - response_type='object', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_namespaced_custom_object_scale(self, group, version, namespace, plural, name, body, **kwargs): # noqa: E501 """replace_namespaced_custom_object_scale # noqa: E501 @@ -4166,29 +5293,42 @@ def replace_namespaced_custom_object_scale(self, group, version, namespace, plur replace scale of the specified namespace scoped custom object # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_custom_object_scale(group, version, namespace, plural, name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str group: the custom resource's group (required) - :param str version: the custom resource's version (required) - :param str namespace: The custom resource's namespace (required) - :param str plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required) - :param str name: the custom object's name (required) - :param object body: (required) - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + :param group: the custom resource's group (required) + :type group: str + :param version: the custom resource's version (required) + :type version: str + :param namespace: The custom resource's namespace (required) + :type namespace: str + :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required) + :type plural: str + :param name: the custom object's name (required) + :type name: str + :param body: (required) + :type body: object + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: object + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: object """ kwargs['_return_http_data_only'] = True return self.replace_namespaced_custom_object_scale_with_http_info(group, version, namespace, plural, name, body, **kwargs) # noqa: E501 @@ -4199,31 +5339,50 @@ def replace_namespaced_custom_object_scale_with_http_info(self, group, version, replace scale of the specified namespace scoped custom object # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_custom_object_scale_with_http_info(group, version, namespace, plural, name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str group: the custom resource's group (required) - :param str version: the custom resource's version (required) - :param str namespace: The custom resource's namespace (required) - :param str plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required) - :param str name: the custom object's name (required) - :param object body: (required) - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + :param group: the custom resource's group (required) + :type group: str + :param version: the custom resource's version (required) + :type version: str + :param namespace: The custom resource's namespace (required) + :type namespace: str + :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required) + :type plural: str + :param name: the custom object's name (required) + :type name: str + :param body: (required) + :type body: object + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(object, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -4244,7 +5403,10 @@ def replace_namespaced_custom_object_scale_with_http_info(self, group, version, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -4257,28 +5419,22 @@ def replace_namespaced_custom_object_scale_with_http_info(self, group, version, local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'group' is set - if self.api_client.client_side_validation and ('group' not in local_var_params or # noqa: E501 - local_var_params['group'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('group') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `group` when calling `replace_namespaced_custom_object_scale`") # noqa: E501 # verify the required parameter 'version' is set - if self.api_client.client_side_validation and ('version' not in local_var_params or # noqa: E501 - local_var_params['version'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('version') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `version` when calling `replace_namespaced_custom_object_scale`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_custom_object_scale`") # noqa: E501 # verify the required parameter 'plural' is set - if self.api_client.client_side_validation and ('plural' not in local_var_params or # noqa: E501 - local_var_params['plural'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('plural') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `plural` when calling `replace_namespaced_custom_object_scale`") # noqa: E501 # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_custom_object_scale`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_custom_object_scale`") # noqa: E501 collection_formats = {} @@ -4296,14 +5452,14 @@ def replace_namespaced_custom_object_scale_with_http_info(self, group, version, path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -4318,6 +5474,12 @@ def replace_namespaced_custom_object_scale_with_http_info(self, group, version, # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "object", + 201: "object", + 401: None, + } + return self.api_client.call_api( '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/scale', 'PUT', path_params, @@ -4326,13 +5488,14 @@ def replace_namespaced_custom_object_scale_with_http_info(self, group, version, body=body_params, post_params=form_params, files=local_var_files, - response_type='object', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_namespaced_custom_object_status(self, group, version, namespace, plural, name, body, **kwargs): # noqa: E501 """replace_namespaced_custom_object_status # noqa: E501 @@ -4340,29 +5503,42 @@ def replace_namespaced_custom_object_status(self, group, version, namespace, plu replace status of the specified namespace scoped custom object # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_custom_object_status(group, version, namespace, plural, name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str group: the custom resource's group (required) - :param str version: the custom resource's version (required) - :param str namespace: The custom resource's namespace (required) - :param str plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required) - :param str name: the custom object's name (required) - :param object body: (required) - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + :param group: the custom resource's group (required) + :type group: str + :param version: the custom resource's version (required) + :type version: str + :param namespace: The custom resource's namespace (required) + :type namespace: str + :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required) + :type plural: str + :param name: the custom object's name (required) + :type name: str + :param body: (required) + :type body: object + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: object + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: object """ kwargs['_return_http_data_only'] = True return self.replace_namespaced_custom_object_status_with_http_info(group, version, namespace, plural, name, body, **kwargs) # noqa: E501 @@ -4373,31 +5549,50 @@ def replace_namespaced_custom_object_status_with_http_info(self, group, version, replace status of the specified namespace scoped custom object # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_custom_object_status_with_http_info(group, version, namespace, plural, name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str group: the custom resource's group (required) - :param str version: the custom resource's version (required) - :param str namespace: The custom resource's namespace (required) - :param str plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required) - :param str name: the custom object's name (required) - :param object body: (required) - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + :param group: the custom resource's group (required) + :type group: str + :param version: the custom resource's version (required) + :type version: str + :param namespace: The custom resource's namespace (required) + :type namespace: str + :param plural: the custom resource's plural name. For TPRs this would be lowercase plural kind. (required) + :type plural: str + :param name: the custom object's name (required) + :type name: str + :param body: (required) + :type body: object + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. (optional) + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(object, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -4418,7 +5613,10 @@ def replace_namespaced_custom_object_status_with_http_info(self, group, version, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -4431,28 +5629,22 @@ def replace_namespaced_custom_object_status_with_http_info(self, group, version, local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'group' is set - if self.api_client.client_side_validation and ('group' not in local_var_params or # noqa: E501 - local_var_params['group'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('group') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `group` when calling `replace_namespaced_custom_object_status`") # noqa: E501 # verify the required parameter 'version' is set - if self.api_client.client_side_validation and ('version' not in local_var_params or # noqa: E501 - local_var_params['version'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('version') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `version` when calling `replace_namespaced_custom_object_status`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_custom_object_status`") # noqa: E501 # verify the required parameter 'plural' is set - if self.api_client.client_side_validation and ('plural' not in local_var_params or # noqa: E501 - local_var_params['plural'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('plural') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `plural` when calling `replace_namespaced_custom_object_status`") # noqa: E501 # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_custom_object_status`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_custom_object_status`") # noqa: E501 collection_formats = {} @@ -4470,14 +5662,14 @@ def replace_namespaced_custom_object_status_with_http_info(self, group, version, path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -4492,6 +5684,12 @@ def replace_namespaced_custom_object_status_with_http_info(self, group, version, # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "object", + 201: "object", + 401: None, + } + return self.api_client.call_api( '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/status', 'PUT', path_params, @@ -4500,10 +5698,11 @@ def replace_namespaced_custom_object_status_with_http_info(self, group, version, body=body_params, post_params=form_params, files=local_var_files, - response_type='object', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) diff --git a/kubernetes/client/api/discovery_api.py b/kubernetes/client/api/discovery_api.py index 78d4826df5..5d1b86d79d 100644 --- a/kubernetes/client/api/discovery_api.py +++ b/kubernetes/client/api/discovery_api.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ @@ -42,20 +42,24 @@ def get_api_group(self, **kwargs): # noqa: E501 get information of a group # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_group(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1APIGroup + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1APIGroup """ kwargs['_return_http_data_only'] = True return self.get_api_group_with_http_info(**kwargs) # noqa: E501 @@ -66,22 +70,32 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 get information of a group # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_group_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1APIGroup, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1APIGroup, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -93,7 +107,10 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -112,7 +129,7 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -125,6 +142,11 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1APIGroup", + 401: None, + } + return self.api_client.call_api( '/apis/discovery.k8s.io/', 'GET', path_params, @@ -133,10 +155,11 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1APIGroup', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) diff --git a/kubernetes/client/api/discovery_v1_api.py b/kubernetes/client/api/discovery_v1_api.py index 08cd9316a1..3673519a38 100644 --- a/kubernetes/client/api/discovery_v1_api.py +++ b/kubernetes/client/api/discovery_v1_api.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ @@ -42,26 +42,36 @@ def create_namespaced_endpoint_slice(self, namespace, body, **kwargs): # noqa: create an EndpointSlice # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_namespaced_endpoint_slice(namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1EndpointSlice body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1EndpointSlice + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1EndpointSlice + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1EndpointSlice """ kwargs['_return_http_data_only'] = True return self.create_namespaced_endpoint_slice_with_http_info(namespace, body, **kwargs) # noqa: E501 @@ -72,28 +82,44 @@ def create_namespaced_endpoint_slice_with_http_info(self, namespace, body, **kwa create an EndpointSlice # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_namespaced_endpoint_slice_with_http_info(namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1EndpointSlice body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1EndpointSlice + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1EndpointSlice, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1EndpointSlice, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -111,7 +137,10 @@ def create_namespaced_endpoint_slice_with_http_info(self, namespace, body, **kwa 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -124,12 +153,10 @@ def create_namespaced_endpoint_slice_with_http_info(self, namespace, body, **kwa local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_endpoint_slice`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_endpoint_slice`") # noqa: E501 collection_formats = {} @@ -139,16 +166,16 @@ def create_namespaced_endpoint_slice_with_http_info(self, namespace, body, **kwa path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -158,11 +185,18 @@ def create_namespaced_endpoint_slice_with_http_info(self, namespace, body, **kwa body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1EndpointSlice", + 201: "V1EndpointSlice", + 202: "V1EndpointSlice", + 401: None, + } + return self.api_client.call_api( '/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices', 'POST', path_params, @@ -171,13 +205,14 @@ def create_namespaced_endpoint_slice_with_http_info(self, namespace, body, **kwa body=body_params, post_params=form_params, files=local_var_files, - response_type='V1EndpointSlice', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_collection_namespaced_endpoint_slice(self, namespace, **kwargs): # noqa: E501 """delete_collection_namespaced_endpoint_slice # noqa: E501 @@ -185,35 +220,56 @@ def delete_collection_namespaced_endpoint_slice(self, namespace, **kwargs): # n delete collection of EndpointSlice # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_namespaced_endpoint_slice(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_collection_namespaced_endpoint_slice_with_http_info(namespace, **kwargs) # noqa: E501 @@ -224,37 +280,64 @@ def delete_collection_namespaced_endpoint_slice_with_http_info(self, namespace, delete collection of EndpointSlice # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_namespaced_endpoint_slice_with_http_info(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -266,6 +349,7 @@ def delete_collection_namespaced_endpoint_slice_with_http_info(self, namespace, 'dry_run', 'field_selector', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'label_selector', 'limit', 'orphan_dependents', @@ -281,7 +365,10 @@ def delete_collection_namespaced_endpoint_slice_with_http_info(self, namespace, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -294,8 +381,7 @@ def delete_collection_namespaced_endpoint_slice_with_http_info(self, namespace, local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_endpoint_slice`") # noqa: E501 collection_formats = {} @@ -305,34 +391,36 @@ def delete_collection_namespaced_endpoint_slice_with_http_info(self, namespace, path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -342,11 +430,16 @@ def delete_collection_namespaced_endpoint_slice_with_http_info(self, namespace, body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 401: None, + } + return self.api_client.call_api( '/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices', 'DELETE', path_params, @@ -355,13 +448,14 @@ def delete_collection_namespaced_endpoint_slice_with_http_info(self, namespace, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_namespaced_endpoint_slice(self, name, namespace, **kwargs): # noqa: E501 """delete_namespaced_endpoint_slice # noqa: E501 @@ -369,28 +463,42 @@ def delete_namespaced_endpoint_slice(self, name, namespace, **kwargs): # noqa: delete an EndpointSlice # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_namespaced_endpoint_slice(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the EndpointSlice (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the EndpointSlice (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_namespaced_endpoint_slice_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -401,30 +509,50 @@ def delete_namespaced_endpoint_slice_with_http_info(self, name, namespace, **kwa delete an EndpointSlice # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_namespaced_endpoint_slice_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the EndpointSlice (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the EndpointSlice (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -435,6 +563,7 @@ def delete_namespaced_endpoint_slice_with_http_info(self, name, namespace, **kwa 'pretty', 'dry_run', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'orphan_dependents', 'propagation_policy', 'body' @@ -444,7 +573,10 @@ def delete_namespaced_endpoint_slice_with_http_info(self, name, namespace, **kwa 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -457,12 +589,10 @@ def delete_namespaced_endpoint_slice_with_http_info(self, name, namespace, **kwa local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_endpoint_slice`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_endpoint_slice`") # noqa: E501 collection_formats = {} @@ -474,18 +604,20 @@ def delete_namespaced_endpoint_slice_with_http_info(self, name, namespace, **kwa path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -495,11 +627,17 @@ def delete_namespaced_endpoint_slice_with_http_info(self, name, namespace, **kwa body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 202: "V1Status", + 401: None, + } + return self.api_client.call_api( '/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices/{name}', 'DELETE', path_params, @@ -508,13 +646,14 @@ def delete_namespaced_endpoint_slice_with_http_info(self, name, namespace, **kwa body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def get_api_resources(self, **kwargs): # noqa: E501 """get_api_resources # noqa: E501 @@ -522,20 +661,24 @@ def get_api_resources(self, **kwargs): # noqa: E501 get available resources # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_resources(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1APIResourceList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1APIResourceList """ kwargs['_return_http_data_only'] = True return self.get_api_resources_with_http_info(**kwargs) # noqa: E501 @@ -546,22 +689,32 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 get available resources # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_resources_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -573,7 +726,10 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -592,7 +748,7 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -600,11 +756,16 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1APIResourceList", + 401: None, + } + return self.api_client.call_api( '/apis/discovery.k8s.io/v1/', 'GET', path_params, @@ -613,13 +774,14 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1APIResourceList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_endpoint_slice_for_all_namespaces(self, **kwargs): # noqa: E501 """list_endpoint_slice_for_all_namespaces # noqa: E501 @@ -627,31 +789,46 @@ def list_endpoint_slice_for_all_namespaces(self, **kwargs): # noqa: E501 list or watch objects of kind EndpointSlice # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_endpoint_slice_for_all_namespaces(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1EndpointSliceList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1EndpointSliceList """ kwargs['_return_http_data_only'] = True return self.list_endpoint_slice_for_all_namespaces_with_http_info(**kwargs) # noqa: E501 @@ -662,33 +839,54 @@ def list_endpoint_slice_for_all_namespaces_with_http_info(self, **kwargs): # no list or watch objects of kind EndpointSlice # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_endpoint_slice_for_all_namespaces_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1EndpointSliceList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1EndpointSliceList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -711,7 +909,10 @@ def list_endpoint_slice_for_all_namespaces_with_http_info(self, **kwargs): # no 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -729,30 +930,30 @@ def list_endpoint_slice_for_all_namespaces_with_http_info(self, **kwargs): # no path_params = {} query_params = [] - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -760,11 +961,16 @@ def list_endpoint_slice_for_all_namespaces_with_http_info(self, **kwargs): # no body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1EndpointSliceList", + 401: None, + } + return self.api_client.call_api( '/apis/discovery.k8s.io/v1/endpointslices', 'GET', path_params, @@ -773,13 +979,14 @@ def list_endpoint_slice_for_all_namespaces_with_http_info(self, **kwargs): # no body=body_params, post_params=form_params, files=local_var_files, - response_type='V1EndpointSliceList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_namespaced_endpoint_slice(self, namespace, **kwargs): # noqa: E501 """list_namespaced_endpoint_slice # noqa: E501 @@ -787,32 +994,48 @@ def list_namespaced_endpoint_slice(self, namespace, **kwargs): # noqa: E501 list or watch objects of kind EndpointSlice # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_namespaced_endpoint_slice(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1EndpointSliceList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1EndpointSliceList """ kwargs['_return_http_data_only'] = True return self.list_namespaced_endpoint_slice_with_http_info(namespace, **kwargs) # noqa: E501 @@ -823,34 +1046,56 @@ def list_namespaced_endpoint_slice_with_http_info(self, namespace, **kwargs): # list or watch objects of kind EndpointSlice # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_namespaced_endpoint_slice_with_http_info(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1EndpointSliceList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1EndpointSliceList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -874,7 +1119,10 @@ def list_namespaced_endpoint_slice_with_http_info(self, namespace, **kwargs): # 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -887,8 +1135,7 @@ def list_namespaced_endpoint_slice_with_http_info(self, namespace, **kwargs): # local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_endpoint_slice`") # noqa: E501 collection_formats = {} @@ -898,30 +1145,30 @@ def list_namespaced_endpoint_slice_with_http_info(self, namespace, **kwargs): # path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -929,11 +1176,16 @@ def list_namespaced_endpoint_slice_with_http_info(self, namespace, **kwargs): # body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1EndpointSliceList", + 401: None, + } + return self.api_client.call_api( '/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices', 'GET', path_params, @@ -942,13 +1194,14 @@ def list_namespaced_endpoint_slice_with_http_info(self, namespace, **kwargs): # body=body_params, post_params=form_params, files=local_var_files, - response_type='V1EndpointSliceList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_namespaced_endpoint_slice(self, name, namespace, body, **kwargs): # noqa: E501 """patch_namespaced_endpoint_slice # noqa: E501 @@ -956,28 +1209,40 @@ def patch_namespaced_endpoint_slice(self, name, namespace, body, **kwargs): # n partially update the specified EndpointSlice # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_endpoint_slice(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the EndpointSlice (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the EndpointSlice (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1EndpointSlice + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1EndpointSlice """ kwargs['_return_http_data_only'] = True return self.patch_namespaced_endpoint_slice_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -988,30 +1253,48 @@ def patch_namespaced_endpoint_slice_with_http_info(self, name, namespace, body, partially update the specified EndpointSlice # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_endpoint_slice_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the EndpointSlice (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the EndpointSlice (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1EndpointSlice, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1EndpointSlice, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1031,7 +1314,10 @@ def patch_namespaced_endpoint_slice_with_http_info(self, name, namespace, body, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1044,16 +1330,13 @@ def patch_namespaced_endpoint_slice_with_http_info(self, name, namespace, body, local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_endpoint_slice`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_endpoint_slice`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_endpoint_slice`") # noqa: E501 collection_formats = {} @@ -1065,18 +1348,18 @@ def patch_namespaced_endpoint_slice_with_http_info(self, name, namespace, body, path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1086,15 +1369,25 @@ def patch_namespaced_endpoint_slice_with_http_info(self, name, namespace, body, body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1EndpointSlice", + 201: "V1EndpointSlice", + 401: None, + } + return self.api_client.call_api( '/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices/{name}', 'PATCH', path_params, @@ -1103,13 +1396,14 @@ def patch_namespaced_endpoint_slice_with_http_info(self, name, namespace, body, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1EndpointSlice', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_namespaced_endpoint_slice(self, name, namespace, **kwargs): # noqa: E501 """read_namespaced_endpoint_slice # noqa: E501 @@ -1117,23 +1411,30 @@ def read_namespaced_endpoint_slice(self, name, namespace, **kwargs): # noqa: E5 read the specified EndpointSlice # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_endpoint_slice(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the EndpointSlice (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the EndpointSlice (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1EndpointSlice + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1EndpointSlice """ kwargs['_return_http_data_only'] = True return self.read_namespaced_endpoint_slice_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -1144,25 +1445,38 @@ def read_namespaced_endpoint_slice_with_http_info(self, name, namespace, **kwarg read the specified EndpointSlice # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_endpoint_slice_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the EndpointSlice (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the EndpointSlice (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1EndpointSlice, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1EndpointSlice, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1177,7 +1491,10 @@ def read_namespaced_endpoint_slice_with_http_info(self, name, namespace, **kwarg 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1190,12 +1507,10 @@ def read_namespaced_endpoint_slice_with_http_info(self, name, namespace, **kwarg local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_endpoint_slice`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_endpoint_slice`") # noqa: E501 collection_formats = {} @@ -1207,10 +1522,10 @@ def read_namespaced_endpoint_slice_with_http_info(self, name, namespace, **kwarg path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1218,11 +1533,16 @@ def read_namespaced_endpoint_slice_with_http_info(self, name, namespace, **kwarg body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1EndpointSlice", + 401: None, + } + return self.api_client.call_api( '/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices/{name}', 'GET', path_params, @@ -1231,13 +1551,14 @@ def read_namespaced_endpoint_slice_with_http_info(self, name, namespace, **kwarg body=body_params, post_params=form_params, files=local_var_files, - response_type='V1EndpointSlice', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_namespaced_endpoint_slice(self, name, namespace, body, **kwargs): # noqa: E501 """replace_namespaced_endpoint_slice # noqa: E501 @@ -1245,27 +1566,38 @@ def replace_namespaced_endpoint_slice(self, name, namespace, body, **kwargs): # replace the specified EndpointSlice # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_endpoint_slice(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the EndpointSlice (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1EndpointSlice body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the EndpointSlice (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1EndpointSlice + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1EndpointSlice + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1EndpointSlice """ kwargs['_return_http_data_only'] = True return self.replace_namespaced_endpoint_slice_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -1276,29 +1608,46 @@ def replace_namespaced_endpoint_slice_with_http_info(self, name, namespace, body replace the specified EndpointSlice # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_endpoint_slice_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the EndpointSlice (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1EndpointSlice body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the EndpointSlice (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1EndpointSlice + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1EndpointSlice, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1EndpointSlice, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1317,7 +1666,10 @@ def replace_namespaced_endpoint_slice_with_http_info(self, name, namespace, body 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1330,16 +1682,13 @@ def replace_namespaced_endpoint_slice_with_http_info(self, name, namespace, body local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_endpoint_slice`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_endpoint_slice`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_endpoint_slice`") # noqa: E501 collection_formats = {} @@ -1351,16 +1700,16 @@ def replace_namespaced_endpoint_slice_with_http_info(self, name, namespace, body path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1370,11 +1719,17 @@ def replace_namespaced_endpoint_slice_with_http_info(self, name, namespace, body body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1EndpointSlice", + 201: "V1EndpointSlice", + 401: None, + } + return self.api_client.call_api( '/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices/{name}', 'PUT', path_params, @@ -1383,10 +1738,11 @@ def replace_namespaced_endpoint_slice_with_http_info(self, name, namespace, body body=body_params, post_params=form_params, files=local_var_files, - response_type='V1EndpointSlice', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) diff --git a/kubernetes/client/api/events_api.py b/kubernetes/client/api/events_api.py index f7b032ff2f..552958f8d3 100644 --- a/kubernetes/client/api/events_api.py +++ b/kubernetes/client/api/events_api.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ @@ -42,20 +42,24 @@ def get_api_group(self, **kwargs): # noqa: E501 get information of a group # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_group(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1APIGroup + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1APIGroup """ kwargs['_return_http_data_only'] = True return self.get_api_group_with_http_info(**kwargs) # noqa: E501 @@ -66,22 +70,32 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 get information of a group # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_group_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1APIGroup, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1APIGroup, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -93,7 +107,10 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -112,7 +129,7 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -125,6 +142,11 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1APIGroup", + 401: None, + } + return self.api_client.call_api( '/apis/events.k8s.io/', 'GET', path_params, @@ -133,10 +155,11 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1APIGroup', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) diff --git a/kubernetes/client/api/events_v1_api.py b/kubernetes/client/api/events_v1_api.py index d5841fea61..d2f746cb71 100644 --- a/kubernetes/client/api/events_v1_api.py +++ b/kubernetes/client/api/events_v1_api.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ @@ -42,26 +42,36 @@ def create_namespaced_event(self, namespace, body, **kwargs): # noqa: E501 create an Event # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_namespaced_event(namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param EventsV1Event body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: EventsV1Event + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: EventsV1Event + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: EventsV1Event """ kwargs['_return_http_data_only'] = True return self.create_namespaced_event_with_http_info(namespace, body, **kwargs) # noqa: E501 @@ -72,28 +82,44 @@ def create_namespaced_event_with_http_info(self, namespace, body, **kwargs): # create an Event # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_namespaced_event_with_http_info(namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param EventsV1Event body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: EventsV1Event + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(EventsV1Event, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(EventsV1Event, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -111,7 +137,10 @@ def create_namespaced_event_with_http_info(self, namespace, body, **kwargs): # 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -124,12 +153,10 @@ def create_namespaced_event_with_http_info(self, namespace, body, **kwargs): # local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_event`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_event`") # noqa: E501 collection_formats = {} @@ -139,16 +166,16 @@ def create_namespaced_event_with_http_info(self, namespace, body, **kwargs): # path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -158,11 +185,18 @@ def create_namespaced_event_with_http_info(self, namespace, body, **kwargs): # body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "EventsV1Event", + 201: "EventsV1Event", + 202: "EventsV1Event", + 401: None, + } + return self.api_client.call_api( '/apis/events.k8s.io/v1/namespaces/{namespace}/events', 'POST', path_params, @@ -171,13 +205,14 @@ def create_namespaced_event_with_http_info(self, namespace, body, **kwargs): # body=body_params, post_params=form_params, files=local_var_files, - response_type='EventsV1Event', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_collection_namespaced_event(self, namespace, **kwargs): # noqa: E501 """delete_collection_namespaced_event # noqa: E501 @@ -185,35 +220,56 @@ def delete_collection_namespaced_event(self, namespace, **kwargs): # noqa: E501 delete collection of Event # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_namespaced_event(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_collection_namespaced_event_with_http_info(namespace, **kwargs) # noqa: E501 @@ -224,37 +280,64 @@ def delete_collection_namespaced_event_with_http_info(self, namespace, **kwargs) delete collection of Event # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_namespaced_event_with_http_info(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -266,6 +349,7 @@ def delete_collection_namespaced_event_with_http_info(self, namespace, **kwargs) 'dry_run', 'field_selector', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'label_selector', 'limit', 'orphan_dependents', @@ -281,7 +365,10 @@ def delete_collection_namespaced_event_with_http_info(self, namespace, **kwargs) 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -294,8 +381,7 @@ def delete_collection_namespaced_event_with_http_info(self, namespace, **kwargs) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_event`") # noqa: E501 collection_formats = {} @@ -305,34 +391,36 @@ def delete_collection_namespaced_event_with_http_info(self, namespace, **kwargs) path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -342,11 +430,16 @@ def delete_collection_namespaced_event_with_http_info(self, namespace, **kwargs) body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 401: None, + } + return self.api_client.call_api( '/apis/events.k8s.io/v1/namespaces/{namespace}/events', 'DELETE', path_params, @@ -355,13 +448,14 @@ def delete_collection_namespaced_event_with_http_info(self, namespace, **kwargs) body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_namespaced_event(self, name, namespace, **kwargs): # noqa: E501 """delete_namespaced_event # noqa: E501 @@ -369,28 +463,42 @@ def delete_namespaced_event(self, name, namespace, **kwargs): # noqa: E501 delete an Event # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_namespaced_event(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Event (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the Event (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_namespaced_event_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -401,30 +509,50 @@ def delete_namespaced_event_with_http_info(self, name, namespace, **kwargs): # delete an Event # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_namespaced_event_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Event (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the Event (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -435,6 +563,7 @@ def delete_namespaced_event_with_http_info(self, name, namespace, **kwargs): # 'pretty', 'dry_run', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'orphan_dependents', 'propagation_policy', 'body' @@ -444,7 +573,10 @@ def delete_namespaced_event_with_http_info(self, name, namespace, **kwargs): # 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -457,12 +589,10 @@ def delete_namespaced_event_with_http_info(self, name, namespace, **kwargs): # local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_event`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_event`") # noqa: E501 collection_formats = {} @@ -474,18 +604,20 @@ def delete_namespaced_event_with_http_info(self, name, namespace, **kwargs): # path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -495,11 +627,17 @@ def delete_namespaced_event_with_http_info(self, name, namespace, **kwargs): # body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 202: "V1Status", + 401: None, + } + return self.api_client.call_api( '/apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}', 'DELETE', path_params, @@ -508,13 +646,14 @@ def delete_namespaced_event_with_http_info(self, name, namespace, **kwargs): # body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def get_api_resources(self, **kwargs): # noqa: E501 """get_api_resources # noqa: E501 @@ -522,20 +661,24 @@ def get_api_resources(self, **kwargs): # noqa: E501 get available resources # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_resources(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1APIResourceList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1APIResourceList """ kwargs['_return_http_data_only'] = True return self.get_api_resources_with_http_info(**kwargs) # noqa: E501 @@ -546,22 +689,32 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 get available resources # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_resources_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -573,7 +726,10 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -592,7 +748,7 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -600,11 +756,16 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1APIResourceList", + 401: None, + } + return self.api_client.call_api( '/apis/events.k8s.io/v1/', 'GET', path_params, @@ -613,13 +774,14 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1APIResourceList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_event_for_all_namespaces(self, **kwargs): # noqa: E501 """list_event_for_all_namespaces # noqa: E501 @@ -627,31 +789,46 @@ def list_event_for_all_namespaces(self, **kwargs): # noqa: E501 list or watch objects of kind Event # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_event_for_all_namespaces(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: EventsV1EventList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: EventsV1EventList """ kwargs['_return_http_data_only'] = True return self.list_event_for_all_namespaces_with_http_info(**kwargs) # noqa: E501 @@ -662,33 +839,54 @@ def list_event_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501 list or watch objects of kind Event # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_event_for_all_namespaces_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(EventsV1EventList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(EventsV1EventList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -711,7 +909,10 @@ def list_event_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -729,30 +930,30 @@ def list_event_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -760,11 +961,16 @@ def list_event_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "EventsV1EventList", + 401: None, + } + return self.api_client.call_api( '/apis/events.k8s.io/v1/events', 'GET', path_params, @@ -773,13 +979,14 @@ def list_event_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='EventsV1EventList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_namespaced_event(self, namespace, **kwargs): # noqa: E501 """list_namespaced_event # noqa: E501 @@ -787,32 +994,48 @@ def list_namespaced_event(self, namespace, **kwargs): # noqa: E501 list or watch objects of kind Event # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_namespaced_event(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: EventsV1EventList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: EventsV1EventList """ kwargs['_return_http_data_only'] = True return self.list_namespaced_event_with_http_info(namespace, **kwargs) # noqa: E501 @@ -823,34 +1046,56 @@ def list_namespaced_event_with_http_info(self, namespace, **kwargs): # noqa: E5 list or watch objects of kind Event # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_namespaced_event_with_http_info(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(EventsV1EventList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(EventsV1EventList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -874,7 +1119,10 @@ def list_namespaced_event_with_http_info(self, namespace, **kwargs): # noqa: E5 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -887,8 +1135,7 @@ def list_namespaced_event_with_http_info(self, namespace, **kwargs): # noqa: E5 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_event`") # noqa: E501 collection_formats = {} @@ -898,30 +1145,30 @@ def list_namespaced_event_with_http_info(self, namespace, **kwargs): # noqa: E5 path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -929,11 +1176,16 @@ def list_namespaced_event_with_http_info(self, namespace, **kwargs): # noqa: E5 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "EventsV1EventList", + 401: None, + } + return self.api_client.call_api( '/apis/events.k8s.io/v1/namespaces/{namespace}/events', 'GET', path_params, @@ -942,13 +1194,14 @@ def list_namespaced_event_with_http_info(self, namespace, **kwargs): # noqa: E5 body=body_params, post_params=form_params, files=local_var_files, - response_type='EventsV1EventList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_namespaced_event(self, name, namespace, body, **kwargs): # noqa: E501 """patch_namespaced_event # noqa: E501 @@ -956,28 +1209,40 @@ def patch_namespaced_event(self, name, namespace, body, **kwargs): # noqa: E501 partially update the specified Event # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_event(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Event (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the Event (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: EventsV1Event + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: EventsV1Event """ kwargs['_return_http_data_only'] = True return self.patch_namespaced_event_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -988,30 +1253,48 @@ def patch_namespaced_event_with_http_info(self, name, namespace, body, **kwargs) partially update the specified Event # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_event_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Event (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the Event (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(EventsV1Event, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(EventsV1Event, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1031,7 +1314,10 @@ def patch_namespaced_event_with_http_info(self, name, namespace, body, **kwargs) 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1044,16 +1330,13 @@ def patch_namespaced_event_with_http_info(self, name, namespace, body, **kwargs) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_event`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_event`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_event`") # noqa: E501 collection_formats = {} @@ -1065,18 +1348,18 @@ def patch_namespaced_event_with_http_info(self, name, namespace, body, **kwargs) path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1086,15 +1369,25 @@ def patch_namespaced_event_with_http_info(self, name, namespace, body, **kwargs) body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "EventsV1Event", + 201: "EventsV1Event", + 401: None, + } + return self.api_client.call_api( '/apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}', 'PATCH', path_params, @@ -1103,13 +1396,14 @@ def patch_namespaced_event_with_http_info(self, name, namespace, body, **kwargs) body=body_params, post_params=form_params, files=local_var_files, - response_type='EventsV1Event', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_namespaced_event(self, name, namespace, **kwargs): # noqa: E501 """read_namespaced_event # noqa: E501 @@ -1117,23 +1411,30 @@ def read_namespaced_event(self, name, namespace, **kwargs): # noqa: E501 read the specified Event # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_event(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Event (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the Event (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: EventsV1Event + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: EventsV1Event """ kwargs['_return_http_data_only'] = True return self.read_namespaced_event_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -1144,25 +1445,38 @@ def read_namespaced_event_with_http_info(self, name, namespace, **kwargs): # no read the specified Event # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_event_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Event (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the Event (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(EventsV1Event, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(EventsV1Event, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1177,7 +1491,10 @@ def read_namespaced_event_with_http_info(self, name, namespace, **kwargs): # no 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1190,12 +1507,10 @@ def read_namespaced_event_with_http_info(self, name, namespace, **kwargs): # no local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_event`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_event`") # noqa: E501 collection_formats = {} @@ -1207,10 +1522,10 @@ def read_namespaced_event_with_http_info(self, name, namespace, **kwargs): # no path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1218,11 +1533,16 @@ def read_namespaced_event_with_http_info(self, name, namespace, **kwargs): # no body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "EventsV1Event", + 401: None, + } + return self.api_client.call_api( '/apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}', 'GET', path_params, @@ -1231,13 +1551,14 @@ def read_namespaced_event_with_http_info(self, name, namespace, **kwargs): # no body=body_params, post_params=form_params, files=local_var_files, - response_type='EventsV1Event', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_namespaced_event(self, name, namespace, body, **kwargs): # noqa: E501 """replace_namespaced_event # noqa: E501 @@ -1245,27 +1566,38 @@ def replace_namespaced_event(self, name, namespace, body, **kwargs): # noqa: E5 replace the specified Event # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_event(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Event (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param EventsV1Event body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the Event (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: EventsV1Event + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: EventsV1Event + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: EventsV1Event """ kwargs['_return_http_data_only'] = True return self.replace_namespaced_event_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -1276,29 +1608,46 @@ def replace_namespaced_event_with_http_info(self, name, namespace, body, **kwarg replace the specified Event # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_event_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Event (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param EventsV1Event body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the Event (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: EventsV1Event + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(EventsV1Event, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(EventsV1Event, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1317,7 +1666,10 @@ def replace_namespaced_event_with_http_info(self, name, namespace, body, **kwarg 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1330,16 +1682,13 @@ def replace_namespaced_event_with_http_info(self, name, namespace, body, **kwarg local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_event`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_event`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_event`") # noqa: E501 collection_formats = {} @@ -1351,16 +1700,16 @@ def replace_namespaced_event_with_http_info(self, name, namespace, body, **kwarg path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1370,11 +1719,17 @@ def replace_namespaced_event_with_http_info(self, name, namespace, body, **kwarg body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "EventsV1Event", + 201: "EventsV1Event", + 401: None, + } + return self.api_client.call_api( '/apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}', 'PUT', path_params, @@ -1383,10 +1738,11 @@ def replace_namespaced_event_with_http_info(self, name, namespace, body, **kwarg body=body_params, post_params=form_params, files=local_var_files, - response_type='EventsV1Event', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) diff --git a/kubernetes/client/api/flowcontrol_apiserver_api.py b/kubernetes/client/api/flowcontrol_apiserver_api.py index b64fbbd5ce..07190e9a55 100644 --- a/kubernetes/client/api/flowcontrol_apiserver_api.py +++ b/kubernetes/client/api/flowcontrol_apiserver_api.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ @@ -42,20 +42,24 @@ def get_api_group(self, **kwargs): # noqa: E501 get information of a group # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_group(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1APIGroup + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1APIGroup """ kwargs['_return_http_data_only'] = True return self.get_api_group_with_http_info(**kwargs) # noqa: E501 @@ -66,22 +70,32 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 get information of a group # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_group_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1APIGroup, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1APIGroup, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -93,7 +107,10 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -112,7 +129,7 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -125,6 +142,11 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1APIGroup", + 401: None, + } + return self.api_client.call_api( '/apis/flowcontrol.apiserver.k8s.io/', 'GET', path_params, @@ -133,10 +155,11 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1APIGroup', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) diff --git a/kubernetes/client/api/flowcontrol_apiserver_v1_api.py b/kubernetes/client/api/flowcontrol_apiserver_v1_api.py index 902c7d8183..6443673700 100644 --- a/kubernetes/client/api/flowcontrol_apiserver_v1_api.py +++ b/kubernetes/client/api/flowcontrol_apiserver_v1_api.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ @@ -42,25 +42,34 @@ def create_flow_schema(self, body, **kwargs): # noqa: E501 create a FlowSchema # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_flow_schema(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param V1FlowSchema body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param body: (required) + :type body: V1FlowSchema + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1FlowSchema + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1FlowSchema """ kwargs['_return_http_data_only'] = True return self.create_flow_schema_with_http_info(body, **kwargs) # noqa: E501 @@ -71,27 +80,42 @@ def create_flow_schema_with_http_info(self, body, **kwargs): # noqa: E501 create a FlowSchema # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_flow_schema_with_http_info(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param V1FlowSchema body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param body: (required) + :type body: V1FlowSchema + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1FlowSchema, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1FlowSchema, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -108,7 +132,10 @@ def create_flow_schema_with_http_info(self, body, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -121,8 +148,7 @@ def create_flow_schema_with_http_info(self, body, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_flow_schema`") # noqa: E501 collection_formats = {} @@ -130,16 +156,16 @@ def create_flow_schema_with_http_info(self, body, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -149,11 +175,18 @@ def create_flow_schema_with_http_info(self, body, **kwargs): # noqa: E501 body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1FlowSchema", + 201: "V1FlowSchema", + 202: "V1FlowSchema", + 401: None, + } + return self.api_client.call_api( '/apis/flowcontrol.apiserver.k8s.io/v1/flowschemas', 'POST', path_params, @@ -162,13 +195,14 @@ def create_flow_schema_with_http_info(self, body, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1FlowSchema', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def create_priority_level_configuration(self, body, **kwargs): # noqa: E501 """create_priority_level_configuration # noqa: E501 @@ -176,25 +210,34 @@ def create_priority_level_configuration(self, body, **kwargs): # noqa: E501 create a PriorityLevelConfiguration # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_priority_level_configuration(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param V1PriorityLevelConfiguration body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param body: (required) + :type body: V1PriorityLevelConfiguration + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1PriorityLevelConfiguration + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1PriorityLevelConfiguration """ kwargs['_return_http_data_only'] = True return self.create_priority_level_configuration_with_http_info(body, **kwargs) # noqa: E501 @@ -205,27 +248,42 @@ def create_priority_level_configuration_with_http_info(self, body, **kwargs): # create a PriorityLevelConfiguration # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_priority_level_configuration_with_http_info(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param V1PriorityLevelConfiguration body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param body: (required) + :type body: V1PriorityLevelConfiguration + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1PriorityLevelConfiguration, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1PriorityLevelConfiguration, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -242,7 +300,10 @@ def create_priority_level_configuration_with_http_info(self, body, **kwargs): # 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -255,8 +316,7 @@ def create_priority_level_configuration_with_http_info(self, body, **kwargs): # local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_priority_level_configuration`") # noqa: E501 collection_formats = {} @@ -264,16 +324,16 @@ def create_priority_level_configuration_with_http_info(self, body, **kwargs): # path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -283,11 +343,18 @@ def create_priority_level_configuration_with_http_info(self, body, **kwargs): # body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1PriorityLevelConfiguration", + 201: "V1PriorityLevelConfiguration", + 202: "V1PriorityLevelConfiguration", + 401: None, + } + return self.api_client.call_api( '/apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations', 'POST', path_params, @@ -296,13 +363,14 @@ def create_priority_level_configuration_with_http_info(self, body, **kwargs): # body=body_params, post_params=form_params, files=local_var_files, - response_type='V1PriorityLevelConfiguration', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_collection_flow_schema(self, **kwargs): # noqa: E501 """delete_collection_flow_schema # noqa: E501 @@ -310,34 +378,54 @@ def delete_collection_flow_schema(self, **kwargs): # noqa: E501 delete collection of FlowSchema # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_flow_schema(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_collection_flow_schema_with_http_info(**kwargs) # noqa: E501 @@ -348,36 +436,62 @@ def delete_collection_flow_schema_with_http_info(self, **kwargs): # noqa: E501 delete collection of FlowSchema # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_flow_schema_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -388,6 +502,7 @@ def delete_collection_flow_schema_with_http_info(self, **kwargs): # noqa: E501 'dry_run', 'field_selector', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'label_selector', 'limit', 'orphan_dependents', @@ -403,7 +518,10 @@ def delete_collection_flow_schema_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -421,34 +539,36 @@ def delete_collection_flow_schema_with_http_info(self, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -458,11 +578,16 @@ def delete_collection_flow_schema_with_http_info(self, **kwargs): # noqa: E501 body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 401: None, + } + return self.api_client.call_api( '/apis/flowcontrol.apiserver.k8s.io/v1/flowschemas', 'DELETE', path_params, @@ -471,13 +596,14 @@ def delete_collection_flow_schema_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_collection_priority_level_configuration(self, **kwargs): # noqa: E501 """delete_collection_priority_level_configuration # noqa: E501 @@ -485,34 +611,54 @@ def delete_collection_priority_level_configuration(self, **kwargs): # noqa: E50 delete collection of PriorityLevelConfiguration # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_priority_level_configuration(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_collection_priority_level_configuration_with_http_info(**kwargs) # noqa: E501 @@ -523,36 +669,62 @@ def delete_collection_priority_level_configuration_with_http_info(self, **kwargs delete collection of PriorityLevelConfiguration # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_priority_level_configuration_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -563,6 +735,7 @@ def delete_collection_priority_level_configuration_with_http_info(self, **kwargs 'dry_run', 'field_selector', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'label_selector', 'limit', 'orphan_dependents', @@ -578,7 +751,10 @@ def delete_collection_priority_level_configuration_with_http_info(self, **kwargs 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -596,34 +772,36 @@ def delete_collection_priority_level_configuration_with_http_info(self, **kwargs path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -633,11 +811,16 @@ def delete_collection_priority_level_configuration_with_http_info(self, **kwargs body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 401: None, + } + return self.api_client.call_api( '/apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations', 'DELETE', path_params, @@ -646,13 +829,14 @@ def delete_collection_priority_level_configuration_with_http_info(self, **kwargs body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_flow_schema(self, name, **kwargs): # noqa: E501 """delete_flow_schema # noqa: E501 @@ -660,27 +844,40 @@ def delete_flow_schema(self, name, **kwargs): # noqa: E501 delete a FlowSchema # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_flow_schema(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the FlowSchema (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the FlowSchema (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_flow_schema_with_http_info(name, **kwargs) # noqa: E501 @@ -691,29 +888,48 @@ def delete_flow_schema_with_http_info(self, name, **kwargs): # noqa: E501 delete a FlowSchema # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_flow_schema_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the FlowSchema (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the FlowSchema (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -723,6 +939,7 @@ def delete_flow_schema_with_http_info(self, name, **kwargs): # noqa: E501 'pretty', 'dry_run', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'orphan_dependents', 'propagation_policy', 'body' @@ -732,7 +949,10 @@ def delete_flow_schema_with_http_info(self, name, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -745,8 +965,7 @@ def delete_flow_schema_with_http_info(self, name, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `delete_flow_schema`") # noqa: E501 collection_formats = {} @@ -756,18 +975,20 @@ def delete_flow_schema_with_http_info(self, name, **kwargs): # noqa: E501 path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -777,11 +998,17 @@ def delete_flow_schema_with_http_info(self, name, **kwargs): # noqa: E501 body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 202: "V1Status", + 401: None, + } + return self.api_client.call_api( '/apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/{name}', 'DELETE', path_params, @@ -790,13 +1017,14 @@ def delete_flow_schema_with_http_info(self, name, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_priority_level_configuration(self, name, **kwargs): # noqa: E501 """delete_priority_level_configuration # noqa: E501 @@ -804,27 +1032,40 @@ def delete_priority_level_configuration(self, name, **kwargs): # noqa: E501 delete a PriorityLevelConfiguration # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_priority_level_configuration(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PriorityLevelConfiguration (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the PriorityLevelConfiguration (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_priority_level_configuration_with_http_info(name, **kwargs) # noqa: E501 @@ -835,29 +1076,48 @@ def delete_priority_level_configuration_with_http_info(self, name, **kwargs): # delete a PriorityLevelConfiguration # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_priority_level_configuration_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PriorityLevelConfiguration (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the PriorityLevelConfiguration (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -867,6 +1127,7 @@ def delete_priority_level_configuration_with_http_info(self, name, **kwargs): # 'pretty', 'dry_run', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'orphan_dependents', 'propagation_policy', 'body' @@ -876,7 +1137,10 @@ def delete_priority_level_configuration_with_http_info(self, name, **kwargs): # 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -889,8 +1153,7 @@ def delete_priority_level_configuration_with_http_info(self, name, **kwargs): # local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `delete_priority_level_configuration`") # noqa: E501 collection_formats = {} @@ -900,18 +1163,20 @@ def delete_priority_level_configuration_with_http_info(self, name, **kwargs): # path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -921,11 +1186,17 @@ def delete_priority_level_configuration_with_http_info(self, name, **kwargs): # body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 202: "V1Status", + 401: None, + } + return self.api_client.call_api( '/apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations/{name}', 'DELETE', path_params, @@ -934,13 +1205,14 @@ def delete_priority_level_configuration_with_http_info(self, name, **kwargs): # body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def get_api_resources(self, **kwargs): # noqa: E501 """get_api_resources # noqa: E501 @@ -948,20 +1220,24 @@ def get_api_resources(self, **kwargs): # noqa: E501 get available resources # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_resources(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1APIResourceList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1APIResourceList """ kwargs['_return_http_data_only'] = True return self.get_api_resources_with_http_info(**kwargs) # noqa: E501 @@ -972,22 +1248,32 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 get available resources # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_resources_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -999,7 +1285,10 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1018,7 +1307,7 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1026,11 +1315,16 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1APIResourceList", + 401: None, + } + return self.api_client.call_api( '/apis/flowcontrol.apiserver.k8s.io/v1/', 'GET', path_params, @@ -1039,13 +1333,14 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1APIResourceList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_flow_schema(self, **kwargs): # noqa: E501 """list_flow_schema # noqa: E501 @@ -1053,31 +1348,46 @@ def list_flow_schema(self, **kwargs): # noqa: E501 list or watch objects of kind FlowSchema # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_flow_schema(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1FlowSchemaList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1FlowSchemaList """ kwargs['_return_http_data_only'] = True return self.list_flow_schema_with_http_info(**kwargs) # noqa: E501 @@ -1088,33 +1398,54 @@ def list_flow_schema_with_http_info(self, **kwargs): # noqa: E501 list or watch objects of kind FlowSchema # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_flow_schema_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1FlowSchemaList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1FlowSchemaList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1137,7 +1468,10 @@ def list_flow_schema_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1155,30 +1489,30 @@ def list_flow_schema_with_http_info(self, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1186,11 +1520,16 @@ def list_flow_schema_with_http_info(self, **kwargs): # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1FlowSchemaList", + 401: None, + } + return self.api_client.call_api( '/apis/flowcontrol.apiserver.k8s.io/v1/flowschemas', 'GET', path_params, @@ -1199,13 +1538,14 @@ def list_flow_schema_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1FlowSchemaList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_priority_level_configuration(self, **kwargs): # noqa: E501 """list_priority_level_configuration # noqa: E501 @@ -1213,31 +1553,46 @@ def list_priority_level_configuration(self, **kwargs): # noqa: E501 list or watch objects of kind PriorityLevelConfiguration # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_priority_level_configuration(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1PriorityLevelConfigurationList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1PriorityLevelConfigurationList """ kwargs['_return_http_data_only'] = True return self.list_priority_level_configuration_with_http_info(**kwargs) # noqa: E501 @@ -1248,33 +1603,54 @@ def list_priority_level_configuration_with_http_info(self, **kwargs): # noqa: E list or watch objects of kind PriorityLevelConfiguration # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_priority_level_configuration_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1PriorityLevelConfigurationList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1PriorityLevelConfigurationList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1297,7 +1673,10 @@ def list_priority_level_configuration_with_http_info(self, **kwargs): # noqa: E 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1315,30 +1694,30 @@ def list_priority_level_configuration_with_http_info(self, **kwargs): # noqa: E path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1346,11 +1725,16 @@ def list_priority_level_configuration_with_http_info(self, **kwargs): # noqa: E body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1PriorityLevelConfigurationList", + 401: None, + } + return self.api_client.call_api( '/apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations', 'GET', path_params, @@ -1359,13 +1743,14 @@ def list_priority_level_configuration_with_http_info(self, **kwargs): # noqa: E body=body_params, post_params=form_params, files=local_var_files, - response_type='V1PriorityLevelConfigurationList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_flow_schema(self, name, body, **kwargs): # noqa: E501 """patch_flow_schema # noqa: E501 @@ -1373,27 +1758,38 @@ def patch_flow_schema(self, name, body, **kwargs): # noqa: E501 partially update the specified FlowSchema # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_flow_schema(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the FlowSchema (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the FlowSchema (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1FlowSchema + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1FlowSchema """ kwargs['_return_http_data_only'] = True return self.patch_flow_schema_with_http_info(name, body, **kwargs) # noqa: E501 @@ -1404,29 +1800,46 @@ def patch_flow_schema_with_http_info(self, name, body, **kwargs): # noqa: E501 partially update the specified FlowSchema # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_flow_schema_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the FlowSchema (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the FlowSchema (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1FlowSchema, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1FlowSchema, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1445,7 +1858,10 @@ def patch_flow_schema_with_http_info(self, name, body, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1458,12 +1874,10 @@ def patch_flow_schema_with_http_info(self, name, body, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_flow_schema`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_flow_schema`") # noqa: E501 collection_formats = {} @@ -1473,18 +1887,18 @@ def patch_flow_schema_with_http_info(self, name, body, **kwargs): # noqa: E501 path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1494,15 +1908,25 @@ def patch_flow_schema_with_http_info(self, name, body, **kwargs): # noqa: E501 body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1FlowSchema", + 201: "V1FlowSchema", + 401: None, + } + return self.api_client.call_api( '/apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/{name}', 'PATCH', path_params, @@ -1511,13 +1935,14 @@ def patch_flow_schema_with_http_info(self, name, body, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1FlowSchema', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_flow_schema_status(self, name, body, **kwargs): # noqa: E501 """patch_flow_schema_status # noqa: E501 @@ -1525,27 +1950,38 @@ def patch_flow_schema_status(self, name, body, **kwargs): # noqa: E501 partially update status of the specified FlowSchema # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_flow_schema_status(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the FlowSchema (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the FlowSchema (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1FlowSchema + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1FlowSchema """ kwargs['_return_http_data_only'] = True return self.patch_flow_schema_status_with_http_info(name, body, **kwargs) # noqa: E501 @@ -1556,29 +1992,46 @@ def patch_flow_schema_status_with_http_info(self, name, body, **kwargs): # noqa partially update status of the specified FlowSchema # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_flow_schema_status_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the FlowSchema (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the FlowSchema (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1FlowSchema, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1FlowSchema, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1597,7 +2050,10 @@ def patch_flow_schema_status_with_http_info(self, name, body, **kwargs): # noqa 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1610,12 +2066,10 @@ def patch_flow_schema_status_with_http_info(self, name, body, **kwargs): # noqa local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_flow_schema_status`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_flow_schema_status`") # noqa: E501 collection_formats = {} @@ -1625,18 +2079,18 @@ def patch_flow_schema_status_with_http_info(self, name, body, **kwargs): # noqa path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1646,15 +2100,25 @@ def patch_flow_schema_status_with_http_info(self, name, body, **kwargs): # noqa body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1FlowSchema", + 201: "V1FlowSchema", + 401: None, + } + return self.api_client.call_api( '/apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/{name}/status', 'PATCH', path_params, @@ -1663,13 +2127,14 @@ def patch_flow_schema_status_with_http_info(self, name, body, **kwargs): # noqa body=body_params, post_params=form_params, files=local_var_files, - response_type='V1FlowSchema', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_priority_level_configuration(self, name, body, **kwargs): # noqa: E501 """patch_priority_level_configuration # noqa: E501 @@ -1677,27 +2142,38 @@ def patch_priority_level_configuration(self, name, body, **kwargs): # noqa: E50 partially update the specified PriorityLevelConfiguration # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_priority_level_configuration(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PriorityLevelConfiguration (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the PriorityLevelConfiguration (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1PriorityLevelConfiguration + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1PriorityLevelConfiguration """ kwargs['_return_http_data_only'] = True return self.patch_priority_level_configuration_with_http_info(name, body, **kwargs) # noqa: E501 @@ -1708,29 +2184,46 @@ def patch_priority_level_configuration_with_http_info(self, name, body, **kwargs partially update the specified PriorityLevelConfiguration # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_priority_level_configuration_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PriorityLevelConfiguration (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the PriorityLevelConfiguration (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1PriorityLevelConfiguration, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1PriorityLevelConfiguration, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1749,7 +2242,10 @@ def patch_priority_level_configuration_with_http_info(self, name, body, **kwargs 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1762,12 +2258,10 @@ def patch_priority_level_configuration_with_http_info(self, name, body, **kwargs local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_priority_level_configuration`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_priority_level_configuration`") # noqa: E501 collection_formats = {} @@ -1777,18 +2271,18 @@ def patch_priority_level_configuration_with_http_info(self, name, body, **kwargs path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1798,15 +2292,25 @@ def patch_priority_level_configuration_with_http_info(self, name, body, **kwargs body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1PriorityLevelConfiguration", + 201: "V1PriorityLevelConfiguration", + 401: None, + } + return self.api_client.call_api( '/apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations/{name}', 'PATCH', path_params, @@ -1815,13 +2319,14 @@ def patch_priority_level_configuration_with_http_info(self, name, body, **kwargs body=body_params, post_params=form_params, files=local_var_files, - response_type='V1PriorityLevelConfiguration', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_priority_level_configuration_status(self, name, body, **kwargs): # noqa: E501 """patch_priority_level_configuration_status # noqa: E501 @@ -1829,27 +2334,38 @@ def patch_priority_level_configuration_status(self, name, body, **kwargs): # no partially update status of the specified PriorityLevelConfiguration # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_priority_level_configuration_status(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PriorityLevelConfiguration (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the PriorityLevelConfiguration (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1PriorityLevelConfiguration + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1PriorityLevelConfiguration """ kwargs['_return_http_data_only'] = True return self.patch_priority_level_configuration_status_with_http_info(name, body, **kwargs) # noqa: E501 @@ -1860,29 +2376,46 @@ def patch_priority_level_configuration_status_with_http_info(self, name, body, * partially update status of the specified PriorityLevelConfiguration # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_priority_level_configuration_status_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PriorityLevelConfiguration (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the PriorityLevelConfiguration (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1PriorityLevelConfiguration, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1PriorityLevelConfiguration, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1901,7 +2434,10 @@ def patch_priority_level_configuration_status_with_http_info(self, name, body, * 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1914,12 +2450,10 @@ def patch_priority_level_configuration_status_with_http_info(self, name, body, * local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_priority_level_configuration_status`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_priority_level_configuration_status`") # noqa: E501 collection_formats = {} @@ -1929,18 +2463,18 @@ def patch_priority_level_configuration_status_with_http_info(self, name, body, * path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1950,15 +2484,25 @@ def patch_priority_level_configuration_status_with_http_info(self, name, body, * body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1PriorityLevelConfiguration", + 201: "V1PriorityLevelConfiguration", + 401: None, + } + return self.api_client.call_api( '/apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations/{name}/status', 'PATCH', path_params, @@ -1967,13 +2511,14 @@ def patch_priority_level_configuration_status_with_http_info(self, name, body, * body=body_params, post_params=form_params, files=local_var_files, - response_type='V1PriorityLevelConfiguration', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_flow_schema(self, name, **kwargs): # noqa: E501 """read_flow_schema # noqa: E501 @@ -1981,22 +2526,28 @@ def read_flow_schema(self, name, **kwargs): # noqa: E501 read the specified FlowSchema # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_flow_schema(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the FlowSchema (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the FlowSchema (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1FlowSchema + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1FlowSchema """ kwargs['_return_http_data_only'] = True return self.read_flow_schema_with_http_info(name, **kwargs) # noqa: E501 @@ -2007,24 +2558,36 @@ def read_flow_schema_with_http_info(self, name, **kwargs): # noqa: E501 read the specified FlowSchema # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_flow_schema_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the FlowSchema (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the FlowSchema (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1FlowSchema, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1FlowSchema, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -2038,7 +2601,10 @@ def read_flow_schema_with_http_info(self, name, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2051,8 +2617,7 @@ def read_flow_schema_with_http_info(self, name, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_flow_schema`") # noqa: E501 collection_formats = {} @@ -2062,10 +2627,10 @@ def read_flow_schema_with_http_info(self, name, **kwargs): # noqa: E501 path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2073,11 +2638,16 @@ def read_flow_schema_with_http_info(self, name, **kwargs): # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1FlowSchema", + 401: None, + } + return self.api_client.call_api( '/apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/{name}', 'GET', path_params, @@ -2086,13 +2656,14 @@ def read_flow_schema_with_http_info(self, name, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1FlowSchema', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_flow_schema_status(self, name, **kwargs): # noqa: E501 """read_flow_schema_status # noqa: E501 @@ -2100,22 +2671,28 @@ def read_flow_schema_status(self, name, **kwargs): # noqa: E501 read status of the specified FlowSchema # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_flow_schema_status(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the FlowSchema (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the FlowSchema (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1FlowSchema + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1FlowSchema """ kwargs['_return_http_data_only'] = True return self.read_flow_schema_status_with_http_info(name, **kwargs) # noqa: E501 @@ -2126,24 +2703,36 @@ def read_flow_schema_status_with_http_info(self, name, **kwargs): # noqa: E501 read status of the specified FlowSchema # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_flow_schema_status_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the FlowSchema (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the FlowSchema (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1FlowSchema, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1FlowSchema, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -2157,7 +2746,10 @@ def read_flow_schema_status_with_http_info(self, name, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2170,8 +2762,7 @@ def read_flow_schema_status_with_http_info(self, name, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_flow_schema_status`") # noqa: E501 collection_formats = {} @@ -2181,10 +2772,10 @@ def read_flow_schema_status_with_http_info(self, name, **kwargs): # noqa: E501 path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2192,11 +2783,16 @@ def read_flow_schema_status_with_http_info(self, name, **kwargs): # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1FlowSchema", + 401: None, + } + return self.api_client.call_api( '/apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/{name}/status', 'GET', path_params, @@ -2205,13 +2801,14 @@ def read_flow_schema_status_with_http_info(self, name, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1FlowSchema', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_priority_level_configuration(self, name, **kwargs): # noqa: E501 """read_priority_level_configuration # noqa: E501 @@ -2219,22 +2816,28 @@ def read_priority_level_configuration(self, name, **kwargs): # noqa: E501 read the specified PriorityLevelConfiguration # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_priority_level_configuration(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PriorityLevelConfiguration (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the PriorityLevelConfiguration (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1PriorityLevelConfiguration + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1PriorityLevelConfiguration """ kwargs['_return_http_data_only'] = True return self.read_priority_level_configuration_with_http_info(name, **kwargs) # noqa: E501 @@ -2245,24 +2848,36 @@ def read_priority_level_configuration_with_http_info(self, name, **kwargs): # n read the specified PriorityLevelConfiguration # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_priority_level_configuration_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PriorityLevelConfiguration (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the PriorityLevelConfiguration (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1PriorityLevelConfiguration, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1PriorityLevelConfiguration, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -2276,7 +2891,10 @@ def read_priority_level_configuration_with_http_info(self, name, **kwargs): # n 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2289,8 +2907,7 @@ def read_priority_level_configuration_with_http_info(self, name, **kwargs): # n local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_priority_level_configuration`") # noqa: E501 collection_formats = {} @@ -2300,10 +2917,10 @@ def read_priority_level_configuration_with_http_info(self, name, **kwargs): # n path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2311,11 +2928,16 @@ def read_priority_level_configuration_with_http_info(self, name, **kwargs): # n body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1PriorityLevelConfiguration", + 401: None, + } + return self.api_client.call_api( '/apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations/{name}', 'GET', path_params, @@ -2324,13 +2946,14 @@ def read_priority_level_configuration_with_http_info(self, name, **kwargs): # n body=body_params, post_params=form_params, files=local_var_files, - response_type='V1PriorityLevelConfiguration', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_priority_level_configuration_status(self, name, **kwargs): # noqa: E501 """read_priority_level_configuration_status # noqa: E501 @@ -2338,22 +2961,28 @@ def read_priority_level_configuration_status(self, name, **kwargs): # noqa: E50 read status of the specified PriorityLevelConfiguration # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_priority_level_configuration_status(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PriorityLevelConfiguration (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the PriorityLevelConfiguration (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1PriorityLevelConfiguration + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1PriorityLevelConfiguration """ kwargs['_return_http_data_only'] = True return self.read_priority_level_configuration_status_with_http_info(name, **kwargs) # noqa: E501 @@ -2364,24 +2993,36 @@ def read_priority_level_configuration_status_with_http_info(self, name, **kwargs read status of the specified PriorityLevelConfiguration # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_priority_level_configuration_status_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PriorityLevelConfiguration (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the PriorityLevelConfiguration (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1PriorityLevelConfiguration, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1PriorityLevelConfiguration, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -2395,7 +3036,10 @@ def read_priority_level_configuration_status_with_http_info(self, name, **kwargs 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2408,8 +3052,7 @@ def read_priority_level_configuration_status_with_http_info(self, name, **kwargs local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_priority_level_configuration_status`") # noqa: E501 collection_formats = {} @@ -2419,10 +3062,10 @@ def read_priority_level_configuration_status_with_http_info(self, name, **kwargs path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2430,11 +3073,16 @@ def read_priority_level_configuration_status_with_http_info(self, name, **kwargs body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1PriorityLevelConfiguration", + 401: None, + } + return self.api_client.call_api( '/apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations/{name}/status', 'GET', path_params, @@ -2443,13 +3091,14 @@ def read_priority_level_configuration_status_with_http_info(self, name, **kwargs body=body_params, post_params=form_params, files=local_var_files, - response_type='V1PriorityLevelConfiguration', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_flow_schema(self, name, body, **kwargs): # noqa: E501 """replace_flow_schema # noqa: E501 @@ -2457,26 +3106,36 @@ def replace_flow_schema(self, name, body, **kwargs): # noqa: E501 replace the specified FlowSchema # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_flow_schema(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the FlowSchema (required) - :param V1FlowSchema body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the FlowSchema (required) + :type name: str + :param body: (required) + :type body: V1FlowSchema + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1FlowSchema + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1FlowSchema """ kwargs['_return_http_data_only'] = True return self.replace_flow_schema_with_http_info(name, body, **kwargs) # noqa: E501 @@ -2487,28 +3146,44 @@ def replace_flow_schema_with_http_info(self, name, body, **kwargs): # noqa: E50 replace the specified FlowSchema # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_flow_schema_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the FlowSchema (required) - :param V1FlowSchema body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the FlowSchema (required) + :type name: str + :param body: (required) + :type body: V1FlowSchema + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1FlowSchema, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1FlowSchema, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -2526,7 +3201,10 @@ def replace_flow_schema_with_http_info(self, name, body, **kwargs): # noqa: E50 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2539,12 +3217,10 @@ def replace_flow_schema_with_http_info(self, name, body, **kwargs): # noqa: E50 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_flow_schema`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_flow_schema`") # noqa: E501 collection_formats = {} @@ -2554,16 +3230,16 @@ def replace_flow_schema_with_http_info(self, name, body, **kwargs): # noqa: E50 path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2573,11 +3249,17 @@ def replace_flow_schema_with_http_info(self, name, body, **kwargs): # noqa: E50 body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1FlowSchema", + 201: "V1FlowSchema", + 401: None, + } + return self.api_client.call_api( '/apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/{name}', 'PUT', path_params, @@ -2586,13 +3268,14 @@ def replace_flow_schema_with_http_info(self, name, body, **kwargs): # noqa: E50 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1FlowSchema', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_flow_schema_status(self, name, body, **kwargs): # noqa: E501 """replace_flow_schema_status # noqa: E501 @@ -2600,26 +3283,36 @@ def replace_flow_schema_status(self, name, body, **kwargs): # noqa: E501 replace status of the specified FlowSchema # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_flow_schema_status(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the FlowSchema (required) - :param V1FlowSchema body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the FlowSchema (required) + :type name: str + :param body: (required) + :type body: V1FlowSchema + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1FlowSchema + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1FlowSchema """ kwargs['_return_http_data_only'] = True return self.replace_flow_schema_status_with_http_info(name, body, **kwargs) # noqa: E501 @@ -2630,28 +3323,44 @@ def replace_flow_schema_status_with_http_info(self, name, body, **kwargs): # no replace status of the specified FlowSchema # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_flow_schema_status_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the FlowSchema (required) - :param V1FlowSchema body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the FlowSchema (required) + :type name: str + :param body: (required) + :type body: V1FlowSchema + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1FlowSchema, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1FlowSchema, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -2669,7 +3378,10 @@ def replace_flow_schema_status_with_http_info(self, name, body, **kwargs): # no 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2682,12 +3394,10 @@ def replace_flow_schema_status_with_http_info(self, name, body, **kwargs): # no local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_flow_schema_status`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_flow_schema_status`") # noqa: E501 collection_formats = {} @@ -2697,16 +3407,16 @@ def replace_flow_schema_status_with_http_info(self, name, body, **kwargs): # no path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2716,11 +3426,17 @@ def replace_flow_schema_status_with_http_info(self, name, body, **kwargs): # no body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1FlowSchema", + 201: "V1FlowSchema", + 401: None, + } + return self.api_client.call_api( '/apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/{name}/status', 'PUT', path_params, @@ -2729,13 +3445,14 @@ def replace_flow_schema_status_with_http_info(self, name, body, **kwargs): # no body=body_params, post_params=form_params, files=local_var_files, - response_type='V1FlowSchema', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_priority_level_configuration(self, name, body, **kwargs): # noqa: E501 """replace_priority_level_configuration # noqa: E501 @@ -2743,26 +3460,36 @@ def replace_priority_level_configuration(self, name, body, **kwargs): # noqa: E replace the specified PriorityLevelConfiguration # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_priority_level_configuration(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PriorityLevelConfiguration (required) - :param V1PriorityLevelConfiguration body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the PriorityLevelConfiguration (required) + :type name: str + :param body: (required) + :type body: V1PriorityLevelConfiguration + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1PriorityLevelConfiguration + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1PriorityLevelConfiguration """ kwargs['_return_http_data_only'] = True return self.replace_priority_level_configuration_with_http_info(name, body, **kwargs) # noqa: E501 @@ -2773,28 +3500,44 @@ def replace_priority_level_configuration_with_http_info(self, name, body, **kwar replace the specified PriorityLevelConfiguration # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_priority_level_configuration_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PriorityLevelConfiguration (required) - :param V1PriorityLevelConfiguration body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the PriorityLevelConfiguration (required) + :type name: str + :param body: (required) + :type body: V1PriorityLevelConfiguration + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1PriorityLevelConfiguration, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1PriorityLevelConfiguration, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -2812,7 +3555,10 @@ def replace_priority_level_configuration_with_http_info(self, name, body, **kwar 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2825,12 +3571,10 @@ def replace_priority_level_configuration_with_http_info(self, name, body, **kwar local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_priority_level_configuration`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_priority_level_configuration`") # noqa: E501 collection_formats = {} @@ -2840,16 +3584,16 @@ def replace_priority_level_configuration_with_http_info(self, name, body, **kwar path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2859,11 +3603,17 @@ def replace_priority_level_configuration_with_http_info(self, name, body, **kwar body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1PriorityLevelConfiguration", + 201: "V1PriorityLevelConfiguration", + 401: None, + } + return self.api_client.call_api( '/apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations/{name}', 'PUT', path_params, @@ -2872,13 +3622,14 @@ def replace_priority_level_configuration_with_http_info(self, name, body, **kwar body=body_params, post_params=form_params, files=local_var_files, - response_type='V1PriorityLevelConfiguration', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_priority_level_configuration_status(self, name, body, **kwargs): # noqa: E501 """replace_priority_level_configuration_status # noqa: E501 @@ -2886,26 +3637,36 @@ def replace_priority_level_configuration_status(self, name, body, **kwargs): # replace status of the specified PriorityLevelConfiguration # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_priority_level_configuration_status(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PriorityLevelConfiguration (required) - :param V1PriorityLevelConfiguration body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the PriorityLevelConfiguration (required) + :type name: str + :param body: (required) + :type body: V1PriorityLevelConfiguration + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1PriorityLevelConfiguration + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1PriorityLevelConfiguration """ kwargs['_return_http_data_only'] = True return self.replace_priority_level_configuration_status_with_http_info(name, body, **kwargs) # noqa: E501 @@ -2916,28 +3677,44 @@ def replace_priority_level_configuration_status_with_http_info(self, name, body, replace status of the specified PriorityLevelConfiguration # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_priority_level_configuration_status_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PriorityLevelConfiguration (required) - :param V1PriorityLevelConfiguration body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the PriorityLevelConfiguration (required) + :type name: str + :param body: (required) + :type body: V1PriorityLevelConfiguration + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1PriorityLevelConfiguration, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1PriorityLevelConfiguration, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -2955,7 +3732,10 @@ def replace_priority_level_configuration_status_with_http_info(self, name, body, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2968,12 +3748,10 @@ def replace_priority_level_configuration_status_with_http_info(self, name, body, local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_priority_level_configuration_status`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_priority_level_configuration_status`") # noqa: E501 collection_formats = {} @@ -2983,16 +3761,16 @@ def replace_priority_level_configuration_status_with_http_info(self, name, body, path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -3002,11 +3780,17 @@ def replace_priority_level_configuration_status_with_http_info(self, name, body, body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1PriorityLevelConfiguration", + 201: "V1PriorityLevelConfiguration", + 401: None, + } + return self.api_client.call_api( '/apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations/{name}/status', 'PUT', path_params, @@ -3015,10 +3799,11 @@ def replace_priority_level_configuration_status_with_http_info(self, name, body, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1PriorityLevelConfiguration', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) diff --git a/kubernetes/client/api/flowcontrol_apiserver_v1beta3_api.py b/kubernetes/client/api/flowcontrol_apiserver_v1beta3_api.py deleted file mode 100644 index 81d6e6e290..0000000000 --- a/kubernetes/client/api/flowcontrol_apiserver_v1beta3_api.py +++ /dev/null @@ -1,3024 +0,0 @@ -# coding: utf-8 - -""" - Kubernetes - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - - The version of the OpenAPI document: release-1.30 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from kubernetes.client.api_client import ApiClient -from kubernetes.client.exceptions import ( # noqa: F401 - ApiTypeError, - ApiValueError -) - - -class FlowcontrolApiserverV1beta3Api(object): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def create_flow_schema(self, body, **kwargs): # noqa: E501 - """create_flow_schema # noqa: E501 - - create a FlowSchema # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_flow_schema(body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param V1beta3FlowSchema body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1beta3FlowSchema - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.create_flow_schema_with_http_info(body, **kwargs) # noqa: E501 - - def create_flow_schema_with_http_info(self, body, **kwargs): # noqa: E501 - """create_flow_schema # noqa: E501 - - create a FlowSchema # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_flow_schema_with_http_info(body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param V1beta3FlowSchema body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1beta3FlowSchema, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'body', - 'pretty', - 'dry_run', - 'field_manager', - 'field_validation' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method create_flow_schema" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `create_flow_schema`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 - query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 - query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1beta3FlowSchema', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def create_priority_level_configuration(self, body, **kwargs): # noqa: E501 - """create_priority_level_configuration # noqa: E501 - - create a PriorityLevelConfiguration # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_priority_level_configuration(body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param V1beta3PriorityLevelConfiguration body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1beta3PriorityLevelConfiguration - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.create_priority_level_configuration_with_http_info(body, **kwargs) # noqa: E501 - - def create_priority_level_configuration_with_http_info(self, body, **kwargs): # noqa: E501 - """create_priority_level_configuration # noqa: E501 - - create a PriorityLevelConfiguration # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_priority_level_configuration_with_http_info(body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param V1beta3PriorityLevelConfiguration body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1beta3PriorityLevelConfiguration, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'body', - 'pretty', - 'dry_run', - 'field_manager', - 'field_validation' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method create_priority_level_configuration" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `create_priority_level_configuration`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 - query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 - query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1beta3PriorityLevelConfiguration', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def delete_collection_flow_schema(self, **kwargs): # noqa: E501 - """delete_collection_flow_schema # noqa: E501 - - delete collection of FlowSchema # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_collection_flow_schema(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1Status - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.delete_collection_flow_schema_with_http_info(**kwargs) # noqa: E501 - - def delete_collection_flow_schema_with_http_info(self, **kwargs): # noqa: E501 - """delete_collection_flow_schema # noqa: E501 - - delete collection of FlowSchema # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_collection_flow_schema_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'pretty', - '_continue', - 'dry_run', - 'field_selector', - 'grace_period_seconds', - 'label_selector', - 'limit', - 'orphan_dependents', - 'propagation_policy', - 'resource_version', - 'resource_version_match', - 'send_initial_events', - 'timeout_seconds', - 'body' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method delete_collection_flow_schema" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 - query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 - query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 - query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 - query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 - query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 - query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 - query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 - query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 - query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 - query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1Status', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def delete_collection_priority_level_configuration(self, **kwargs): # noqa: E501 - """delete_collection_priority_level_configuration # noqa: E501 - - delete collection of PriorityLevelConfiguration # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_collection_priority_level_configuration(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1Status - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.delete_collection_priority_level_configuration_with_http_info(**kwargs) # noqa: E501 - - def delete_collection_priority_level_configuration_with_http_info(self, **kwargs): # noqa: E501 - """delete_collection_priority_level_configuration # noqa: E501 - - delete collection of PriorityLevelConfiguration # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_collection_priority_level_configuration_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'pretty', - '_continue', - 'dry_run', - 'field_selector', - 'grace_period_seconds', - 'label_selector', - 'limit', - 'orphan_dependents', - 'propagation_policy', - 'resource_version', - 'resource_version_match', - 'send_initial_events', - 'timeout_seconds', - 'body' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method delete_collection_priority_level_configuration" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 - query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 - query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 - query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 - query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 - query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 - query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 - query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 - query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 - query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 - query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1Status', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def delete_flow_schema(self, name, **kwargs): # noqa: E501 - """delete_flow_schema # noqa: E501 - - delete a FlowSchema # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_flow_schema(name, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the FlowSchema (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1Status - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.delete_flow_schema_with_http_info(name, **kwargs) # noqa: E501 - - def delete_flow_schema_with_http_info(self, name, **kwargs): # noqa: E501 - """delete_flow_schema # noqa: E501 - - delete a FlowSchema # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_flow_schema_with_http_info(name, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the FlowSchema (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'pretty', - 'dry_run', - 'grace_period_seconds', - 'orphan_dependents', - 'propagation_policy', - 'body' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method delete_flow_schema" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `delete_flow_schema`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 - query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 - query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 - query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas/{name}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1Status', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def delete_priority_level_configuration(self, name, **kwargs): # noqa: E501 - """delete_priority_level_configuration # noqa: E501 - - delete a PriorityLevelConfiguration # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_priority_level_configuration(name, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the PriorityLevelConfiguration (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1Status - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.delete_priority_level_configuration_with_http_info(name, **kwargs) # noqa: E501 - - def delete_priority_level_configuration_with_http_info(self, name, **kwargs): # noqa: E501 - """delete_priority_level_configuration # noqa: E501 - - delete a PriorityLevelConfiguration # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_priority_level_configuration_with_http_info(name, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the PriorityLevelConfiguration (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'pretty', - 'dry_run', - 'grace_period_seconds', - 'orphan_dependents', - 'propagation_policy', - 'body' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method delete_priority_level_configuration" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `delete_priority_level_configuration`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 - query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 - query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 - query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations/{name}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1Status', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_api_resources(self, **kwargs): # noqa: E501 - """get_api_resources # noqa: E501 - - get available resources # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_api_resources(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1APIResourceList - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_api_resources_with_http_info(**kwargs) # noqa: E501 - - def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 - """get_api_resources # noqa: E501 - - get available resources # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_api_resources_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_api_resources" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/flowcontrol.apiserver.k8s.io/v1beta3/', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1APIResourceList', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_flow_schema(self, **kwargs): # noqa: E501 - """list_flow_schema # noqa: E501 - - list or watch objects of kind FlowSchema # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_flow_schema(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1beta3FlowSchemaList - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_flow_schema_with_http_info(**kwargs) # noqa: E501 - - def list_flow_schema_with_http_info(self, **kwargs): # noqa: E501 - """list_flow_schema # noqa: E501 - - list or watch objects of kind FlowSchema # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_flow_schema_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1beta3FlowSchemaList, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'pretty', - 'allow_watch_bookmarks', - '_continue', - 'field_selector', - 'label_selector', - 'limit', - 'resource_version', - 'resource_version_match', - 'send_initial_events', - 'timeout_seconds', - 'watch' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_flow_schema" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 - query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 - query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 - query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 - query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 - query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 - query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 - query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 - query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 - query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1beta3FlowSchemaList', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_priority_level_configuration(self, **kwargs): # noqa: E501 - """list_priority_level_configuration # noqa: E501 - - list or watch objects of kind PriorityLevelConfiguration # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_priority_level_configuration(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1beta3PriorityLevelConfigurationList - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_priority_level_configuration_with_http_info(**kwargs) # noqa: E501 - - def list_priority_level_configuration_with_http_info(self, **kwargs): # noqa: E501 - """list_priority_level_configuration # noqa: E501 - - list or watch objects of kind PriorityLevelConfiguration # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_priority_level_configuration_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1beta3PriorityLevelConfigurationList, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'pretty', - 'allow_watch_bookmarks', - '_continue', - 'field_selector', - 'label_selector', - 'limit', - 'resource_version', - 'resource_version_match', - 'send_initial_events', - 'timeout_seconds', - 'watch' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_priority_level_configuration" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 - query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 - query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 - query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 - query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 - query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 - query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 - query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 - query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 - query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1beta3PriorityLevelConfigurationList', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def patch_flow_schema(self, name, body, **kwargs): # noqa: E501 - """patch_flow_schema # noqa: E501 - - partially update the specified FlowSchema # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_flow_schema(name, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the FlowSchema (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1beta3FlowSchema - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.patch_flow_schema_with_http_info(name, body, **kwargs) # noqa: E501 - - def patch_flow_schema_with_http_info(self, name, body, **kwargs): # noqa: E501 - """patch_flow_schema # noqa: E501 - - partially update the specified FlowSchema # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_flow_schema_with_http_info(name, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the FlowSchema (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1beta3FlowSchema, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'body', - 'pretty', - 'dry_run', - 'field_manager', - 'field_validation', - 'force' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method patch_flow_schema" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `patch_flow_schema`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `patch_flow_schema`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 - query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 - query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 - query_params.append(('force', local_var_params['force'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas/{name}', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1beta3FlowSchema', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def patch_flow_schema_status(self, name, body, **kwargs): # noqa: E501 - """patch_flow_schema_status # noqa: E501 - - partially update status of the specified FlowSchema # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_flow_schema_status(name, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the FlowSchema (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1beta3FlowSchema - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.patch_flow_schema_status_with_http_info(name, body, **kwargs) # noqa: E501 - - def patch_flow_schema_status_with_http_info(self, name, body, **kwargs): # noqa: E501 - """patch_flow_schema_status # noqa: E501 - - partially update status of the specified FlowSchema # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_flow_schema_status_with_http_info(name, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the FlowSchema (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1beta3FlowSchema, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'body', - 'pretty', - 'dry_run', - 'field_manager', - 'field_validation', - 'force' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method patch_flow_schema_status" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `patch_flow_schema_status`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `patch_flow_schema_status`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 - query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 - query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 - query_params.append(('force', local_var_params['force'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas/{name}/status', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1beta3FlowSchema', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def patch_priority_level_configuration(self, name, body, **kwargs): # noqa: E501 - """patch_priority_level_configuration # noqa: E501 - - partially update the specified PriorityLevelConfiguration # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_priority_level_configuration(name, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the PriorityLevelConfiguration (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1beta3PriorityLevelConfiguration - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.patch_priority_level_configuration_with_http_info(name, body, **kwargs) # noqa: E501 - - def patch_priority_level_configuration_with_http_info(self, name, body, **kwargs): # noqa: E501 - """patch_priority_level_configuration # noqa: E501 - - partially update the specified PriorityLevelConfiguration # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_priority_level_configuration_with_http_info(name, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the PriorityLevelConfiguration (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1beta3PriorityLevelConfiguration, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'body', - 'pretty', - 'dry_run', - 'field_manager', - 'field_validation', - 'force' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method patch_priority_level_configuration" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `patch_priority_level_configuration`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `patch_priority_level_configuration`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 - query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 - query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 - query_params.append(('force', local_var_params['force'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations/{name}', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1beta3PriorityLevelConfiguration', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def patch_priority_level_configuration_status(self, name, body, **kwargs): # noqa: E501 - """patch_priority_level_configuration_status # noqa: E501 - - partially update status of the specified PriorityLevelConfiguration # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_priority_level_configuration_status(name, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the PriorityLevelConfiguration (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1beta3PriorityLevelConfiguration - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.patch_priority_level_configuration_status_with_http_info(name, body, **kwargs) # noqa: E501 - - def patch_priority_level_configuration_status_with_http_info(self, name, body, **kwargs): # noqa: E501 - """patch_priority_level_configuration_status # noqa: E501 - - partially update status of the specified PriorityLevelConfiguration # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_priority_level_configuration_status_with_http_info(name, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the PriorityLevelConfiguration (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1beta3PriorityLevelConfiguration, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'body', - 'pretty', - 'dry_run', - 'field_manager', - 'field_validation', - 'force' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method patch_priority_level_configuration_status" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `patch_priority_level_configuration_status`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `patch_priority_level_configuration_status`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 - query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 - query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 - query_params.append(('force', local_var_params['force'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations/{name}/status', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1beta3PriorityLevelConfiguration', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def read_flow_schema(self, name, **kwargs): # noqa: E501 - """read_flow_schema # noqa: E501 - - read the specified FlowSchema # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.read_flow_schema(name, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the FlowSchema (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1beta3FlowSchema - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.read_flow_schema_with_http_info(name, **kwargs) # noqa: E501 - - def read_flow_schema_with_http_info(self, name, **kwargs): # noqa: E501 - """read_flow_schema # noqa: E501 - - read the specified FlowSchema # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.read_flow_schema_with_http_info(name, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the FlowSchema (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1beta3FlowSchema, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'pretty' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method read_flow_schema" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `read_flow_schema`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas/{name}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1beta3FlowSchema', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def read_flow_schema_status(self, name, **kwargs): # noqa: E501 - """read_flow_schema_status # noqa: E501 - - read status of the specified FlowSchema # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.read_flow_schema_status(name, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the FlowSchema (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1beta3FlowSchema - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.read_flow_schema_status_with_http_info(name, **kwargs) # noqa: E501 - - def read_flow_schema_status_with_http_info(self, name, **kwargs): # noqa: E501 - """read_flow_schema_status # noqa: E501 - - read status of the specified FlowSchema # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.read_flow_schema_status_with_http_info(name, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the FlowSchema (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1beta3FlowSchema, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'pretty' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method read_flow_schema_status" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `read_flow_schema_status`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas/{name}/status', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1beta3FlowSchema', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def read_priority_level_configuration(self, name, **kwargs): # noqa: E501 - """read_priority_level_configuration # noqa: E501 - - read the specified PriorityLevelConfiguration # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.read_priority_level_configuration(name, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the PriorityLevelConfiguration (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1beta3PriorityLevelConfiguration - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.read_priority_level_configuration_with_http_info(name, **kwargs) # noqa: E501 - - def read_priority_level_configuration_with_http_info(self, name, **kwargs): # noqa: E501 - """read_priority_level_configuration # noqa: E501 - - read the specified PriorityLevelConfiguration # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.read_priority_level_configuration_with_http_info(name, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the PriorityLevelConfiguration (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1beta3PriorityLevelConfiguration, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'pretty' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method read_priority_level_configuration" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `read_priority_level_configuration`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations/{name}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1beta3PriorityLevelConfiguration', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def read_priority_level_configuration_status(self, name, **kwargs): # noqa: E501 - """read_priority_level_configuration_status # noqa: E501 - - read status of the specified PriorityLevelConfiguration # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.read_priority_level_configuration_status(name, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the PriorityLevelConfiguration (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1beta3PriorityLevelConfiguration - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.read_priority_level_configuration_status_with_http_info(name, **kwargs) # noqa: E501 - - def read_priority_level_configuration_status_with_http_info(self, name, **kwargs): # noqa: E501 - """read_priority_level_configuration_status # noqa: E501 - - read status of the specified PriorityLevelConfiguration # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.read_priority_level_configuration_status_with_http_info(name, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the PriorityLevelConfiguration (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1beta3PriorityLevelConfiguration, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'pretty' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method read_priority_level_configuration_status" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `read_priority_level_configuration_status`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations/{name}/status', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1beta3PriorityLevelConfiguration', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def replace_flow_schema(self, name, body, **kwargs): # noqa: E501 - """replace_flow_schema # noqa: E501 - - replace the specified FlowSchema # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.replace_flow_schema(name, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the FlowSchema (required) - :param V1beta3FlowSchema body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1beta3FlowSchema - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.replace_flow_schema_with_http_info(name, body, **kwargs) # noqa: E501 - - def replace_flow_schema_with_http_info(self, name, body, **kwargs): # noqa: E501 - """replace_flow_schema # noqa: E501 - - replace the specified FlowSchema # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.replace_flow_schema_with_http_info(name, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the FlowSchema (required) - :param V1beta3FlowSchema body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1beta3FlowSchema, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'body', - 'pretty', - 'dry_run', - 'field_manager', - 'field_validation' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method replace_flow_schema" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `replace_flow_schema`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `replace_flow_schema`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 - query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 - query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas/{name}', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1beta3FlowSchema', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def replace_flow_schema_status(self, name, body, **kwargs): # noqa: E501 - """replace_flow_schema_status # noqa: E501 - - replace status of the specified FlowSchema # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.replace_flow_schema_status(name, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the FlowSchema (required) - :param V1beta3FlowSchema body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1beta3FlowSchema - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.replace_flow_schema_status_with_http_info(name, body, **kwargs) # noqa: E501 - - def replace_flow_schema_status_with_http_info(self, name, body, **kwargs): # noqa: E501 - """replace_flow_schema_status # noqa: E501 - - replace status of the specified FlowSchema # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.replace_flow_schema_status_with_http_info(name, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the FlowSchema (required) - :param V1beta3FlowSchema body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1beta3FlowSchema, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'body', - 'pretty', - 'dry_run', - 'field_manager', - 'field_validation' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method replace_flow_schema_status" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `replace_flow_schema_status`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `replace_flow_schema_status`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 - query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 - query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas/{name}/status', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1beta3FlowSchema', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def replace_priority_level_configuration(self, name, body, **kwargs): # noqa: E501 - """replace_priority_level_configuration # noqa: E501 - - replace the specified PriorityLevelConfiguration # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.replace_priority_level_configuration(name, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the PriorityLevelConfiguration (required) - :param V1beta3PriorityLevelConfiguration body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1beta3PriorityLevelConfiguration - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.replace_priority_level_configuration_with_http_info(name, body, **kwargs) # noqa: E501 - - def replace_priority_level_configuration_with_http_info(self, name, body, **kwargs): # noqa: E501 - """replace_priority_level_configuration # noqa: E501 - - replace the specified PriorityLevelConfiguration # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.replace_priority_level_configuration_with_http_info(name, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the PriorityLevelConfiguration (required) - :param V1beta3PriorityLevelConfiguration body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1beta3PriorityLevelConfiguration, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'body', - 'pretty', - 'dry_run', - 'field_manager', - 'field_validation' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method replace_priority_level_configuration" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `replace_priority_level_configuration`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `replace_priority_level_configuration`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 - query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 - query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations/{name}', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1beta3PriorityLevelConfiguration', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def replace_priority_level_configuration_status(self, name, body, **kwargs): # noqa: E501 - """replace_priority_level_configuration_status # noqa: E501 - - replace status of the specified PriorityLevelConfiguration # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.replace_priority_level_configuration_status(name, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the PriorityLevelConfiguration (required) - :param V1beta3PriorityLevelConfiguration body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1beta3PriorityLevelConfiguration - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.replace_priority_level_configuration_status_with_http_info(name, body, **kwargs) # noqa: E501 - - def replace_priority_level_configuration_status_with_http_info(self, name, body, **kwargs): # noqa: E501 - """replace_priority_level_configuration_status # noqa: E501 - - replace status of the specified PriorityLevelConfiguration # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.replace_priority_level_configuration_status_with_http_info(name, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the PriorityLevelConfiguration (required) - :param V1beta3PriorityLevelConfiguration body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1beta3PriorityLevelConfiguration, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'body', - 'pretty', - 'dry_run', - 'field_manager', - 'field_validation' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method replace_priority_level_configuration_status" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `replace_priority_level_configuration_status`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `replace_priority_level_configuration_status`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 - query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 - query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations/{name}/status', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1beta3PriorityLevelConfiguration', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) diff --git a/kubernetes/client/api/internal_apiserver_api.py b/kubernetes/client/api/internal_apiserver_api.py index e9cecb1424..eff2a01456 100644 --- a/kubernetes/client/api/internal_apiserver_api.py +++ b/kubernetes/client/api/internal_apiserver_api.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ @@ -42,20 +42,24 @@ def get_api_group(self, **kwargs): # noqa: E501 get information of a group # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_group(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1APIGroup + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1APIGroup """ kwargs['_return_http_data_only'] = True return self.get_api_group_with_http_info(**kwargs) # noqa: E501 @@ -66,22 +70,32 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 get information of a group # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_group_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1APIGroup, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1APIGroup, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -93,7 +107,10 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -112,7 +129,7 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -125,6 +142,11 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1APIGroup", + 401: None, + } + return self.api_client.call_api( '/apis/internal.apiserver.k8s.io/', 'GET', path_params, @@ -133,10 +155,11 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1APIGroup', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) diff --git a/kubernetes/client/api/internal_apiserver_v1alpha1_api.py b/kubernetes/client/api/internal_apiserver_v1alpha1_api.py index 8bc0a939f1..1caa70abe1 100644 --- a/kubernetes/client/api/internal_apiserver_v1alpha1_api.py +++ b/kubernetes/client/api/internal_apiserver_v1alpha1_api.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ @@ -42,25 +42,34 @@ def create_storage_version(self, body, **kwargs): # noqa: E501 create a StorageVersion # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_storage_version(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param V1alpha1StorageVersion body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param body: (required) + :type body: V1alpha1StorageVersion + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1alpha1StorageVersion + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1alpha1StorageVersion """ kwargs['_return_http_data_only'] = True return self.create_storage_version_with_http_info(body, **kwargs) # noqa: E501 @@ -71,27 +80,42 @@ def create_storage_version_with_http_info(self, body, **kwargs): # noqa: E501 create a StorageVersion # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_storage_version_with_http_info(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param V1alpha1StorageVersion body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param body: (required) + :type body: V1alpha1StorageVersion + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1alpha1StorageVersion, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1alpha1StorageVersion, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -108,7 +132,10 @@ def create_storage_version_with_http_info(self, body, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -121,8 +148,7 @@ def create_storage_version_with_http_info(self, body, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_storage_version`") # noqa: E501 collection_formats = {} @@ -130,16 +156,16 @@ def create_storage_version_with_http_info(self, body, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -149,11 +175,18 @@ def create_storage_version_with_http_info(self, body, **kwargs): # noqa: E501 body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1alpha1StorageVersion", + 201: "V1alpha1StorageVersion", + 202: "V1alpha1StorageVersion", + 401: None, + } + return self.api_client.call_api( '/apis/internal.apiserver.k8s.io/v1alpha1/storageversions', 'POST', path_params, @@ -162,13 +195,14 @@ def create_storage_version_with_http_info(self, body, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1alpha1StorageVersion', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_collection_storage_version(self, **kwargs): # noqa: E501 """delete_collection_storage_version # noqa: E501 @@ -176,34 +210,54 @@ def delete_collection_storage_version(self, **kwargs): # noqa: E501 delete collection of StorageVersion # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_storage_version(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_collection_storage_version_with_http_info(**kwargs) # noqa: E501 @@ -214,36 +268,62 @@ def delete_collection_storage_version_with_http_info(self, **kwargs): # noqa: E delete collection of StorageVersion # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_storage_version_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -254,6 +334,7 @@ def delete_collection_storage_version_with_http_info(self, **kwargs): # noqa: E 'dry_run', 'field_selector', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'label_selector', 'limit', 'orphan_dependents', @@ -269,7 +350,10 @@ def delete_collection_storage_version_with_http_info(self, **kwargs): # noqa: E 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -287,34 +371,36 @@ def delete_collection_storage_version_with_http_info(self, **kwargs): # noqa: E path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -324,11 +410,16 @@ def delete_collection_storage_version_with_http_info(self, **kwargs): # noqa: E body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 401: None, + } + return self.api_client.call_api( '/apis/internal.apiserver.k8s.io/v1alpha1/storageversions', 'DELETE', path_params, @@ -337,13 +428,14 @@ def delete_collection_storage_version_with_http_info(self, **kwargs): # noqa: E body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_storage_version(self, name, **kwargs): # noqa: E501 """delete_storage_version # noqa: E501 @@ -351,27 +443,40 @@ def delete_storage_version(self, name, **kwargs): # noqa: E501 delete a StorageVersion # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_storage_version(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the StorageVersion (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the StorageVersion (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_storage_version_with_http_info(name, **kwargs) # noqa: E501 @@ -382,29 +487,48 @@ def delete_storage_version_with_http_info(self, name, **kwargs): # noqa: E501 delete a StorageVersion # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_storage_version_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the StorageVersion (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the StorageVersion (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -414,6 +538,7 @@ def delete_storage_version_with_http_info(self, name, **kwargs): # noqa: E501 'pretty', 'dry_run', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'orphan_dependents', 'propagation_policy', 'body' @@ -423,7 +548,10 @@ def delete_storage_version_with_http_info(self, name, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -436,8 +564,7 @@ def delete_storage_version_with_http_info(self, name, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `delete_storage_version`") # noqa: E501 collection_formats = {} @@ -447,18 +574,20 @@ def delete_storage_version_with_http_info(self, name, **kwargs): # noqa: E501 path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -468,11 +597,17 @@ def delete_storage_version_with_http_info(self, name, **kwargs): # noqa: E501 body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 202: "V1Status", + 401: None, + } + return self.api_client.call_api( '/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}', 'DELETE', path_params, @@ -481,13 +616,14 @@ def delete_storage_version_with_http_info(self, name, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def get_api_resources(self, **kwargs): # noqa: E501 """get_api_resources # noqa: E501 @@ -495,20 +631,24 @@ def get_api_resources(self, **kwargs): # noqa: E501 get available resources # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_resources(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1APIResourceList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1APIResourceList """ kwargs['_return_http_data_only'] = True return self.get_api_resources_with_http_info(**kwargs) # noqa: E501 @@ -519,22 +659,32 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 get available resources # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_resources_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -546,7 +696,10 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -565,7 +718,7 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -573,11 +726,16 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1APIResourceList", + 401: None, + } + return self.api_client.call_api( '/apis/internal.apiserver.k8s.io/v1alpha1/', 'GET', path_params, @@ -586,13 +744,14 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1APIResourceList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_storage_version(self, **kwargs): # noqa: E501 """list_storage_version # noqa: E501 @@ -600,31 +759,46 @@ def list_storage_version(self, **kwargs): # noqa: E501 list or watch objects of kind StorageVersion # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_storage_version(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1alpha1StorageVersionList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1alpha1StorageVersionList """ kwargs['_return_http_data_only'] = True return self.list_storage_version_with_http_info(**kwargs) # noqa: E501 @@ -635,33 +809,54 @@ def list_storage_version_with_http_info(self, **kwargs): # noqa: E501 list or watch objects of kind StorageVersion # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_storage_version_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1alpha1StorageVersionList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1alpha1StorageVersionList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -684,7 +879,10 @@ def list_storage_version_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -702,30 +900,30 @@ def list_storage_version_with_http_info(self, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -733,11 +931,16 @@ def list_storage_version_with_http_info(self, **kwargs): # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1alpha1StorageVersionList", + 401: None, + } + return self.api_client.call_api( '/apis/internal.apiserver.k8s.io/v1alpha1/storageversions', 'GET', path_params, @@ -746,13 +949,14 @@ def list_storage_version_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1alpha1StorageVersionList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_storage_version(self, name, body, **kwargs): # noqa: E501 """patch_storage_version # noqa: E501 @@ -760,27 +964,38 @@ def patch_storage_version(self, name, body, **kwargs): # noqa: E501 partially update the specified StorageVersion # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_storage_version(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the StorageVersion (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the StorageVersion (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1alpha1StorageVersion + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1alpha1StorageVersion """ kwargs['_return_http_data_only'] = True return self.patch_storage_version_with_http_info(name, body, **kwargs) # noqa: E501 @@ -791,29 +1006,46 @@ def patch_storage_version_with_http_info(self, name, body, **kwargs): # noqa: E partially update the specified StorageVersion # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_storage_version_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the StorageVersion (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the StorageVersion (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1alpha1StorageVersion, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1alpha1StorageVersion, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -832,7 +1064,10 @@ def patch_storage_version_with_http_info(self, name, body, **kwargs): # noqa: E 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -845,12 +1080,10 @@ def patch_storage_version_with_http_info(self, name, body, **kwargs): # noqa: E local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_storage_version`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_storage_version`") # noqa: E501 collection_formats = {} @@ -860,18 +1093,18 @@ def patch_storage_version_with_http_info(self, name, body, **kwargs): # noqa: E path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -881,15 +1114,25 @@ def patch_storage_version_with_http_info(self, name, body, **kwargs): # noqa: E body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1alpha1StorageVersion", + 201: "V1alpha1StorageVersion", + 401: None, + } + return self.api_client.call_api( '/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}', 'PATCH', path_params, @@ -898,13 +1141,14 @@ def patch_storage_version_with_http_info(self, name, body, **kwargs): # noqa: E body=body_params, post_params=form_params, files=local_var_files, - response_type='V1alpha1StorageVersion', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_storage_version_status(self, name, body, **kwargs): # noqa: E501 """patch_storage_version_status # noqa: E501 @@ -912,27 +1156,38 @@ def patch_storage_version_status(self, name, body, **kwargs): # noqa: E501 partially update status of the specified StorageVersion # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_storage_version_status(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the StorageVersion (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the StorageVersion (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1alpha1StorageVersion + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1alpha1StorageVersion """ kwargs['_return_http_data_only'] = True return self.patch_storage_version_status_with_http_info(name, body, **kwargs) # noqa: E501 @@ -943,29 +1198,46 @@ def patch_storage_version_status_with_http_info(self, name, body, **kwargs): # partially update status of the specified StorageVersion # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_storage_version_status_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the StorageVersion (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the StorageVersion (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1alpha1StorageVersion, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1alpha1StorageVersion, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -984,7 +1256,10 @@ def patch_storage_version_status_with_http_info(self, name, body, **kwargs): # 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -997,12 +1272,10 @@ def patch_storage_version_status_with_http_info(self, name, body, **kwargs): # local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_storage_version_status`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_storage_version_status`") # noqa: E501 collection_formats = {} @@ -1012,18 +1285,18 @@ def patch_storage_version_status_with_http_info(self, name, body, **kwargs): # path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1033,15 +1306,25 @@ def patch_storage_version_status_with_http_info(self, name, body, **kwargs): # body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1alpha1StorageVersion", + 201: "V1alpha1StorageVersion", + 401: None, + } + return self.api_client.call_api( '/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}/status', 'PATCH', path_params, @@ -1050,13 +1333,14 @@ def patch_storage_version_status_with_http_info(self, name, body, **kwargs): # body=body_params, post_params=form_params, files=local_var_files, - response_type='V1alpha1StorageVersion', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_storage_version(self, name, **kwargs): # noqa: E501 """read_storage_version # noqa: E501 @@ -1064,22 +1348,28 @@ def read_storage_version(self, name, **kwargs): # noqa: E501 read the specified StorageVersion # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_storage_version(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the StorageVersion (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the StorageVersion (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1alpha1StorageVersion + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1alpha1StorageVersion """ kwargs['_return_http_data_only'] = True return self.read_storage_version_with_http_info(name, **kwargs) # noqa: E501 @@ -1090,24 +1380,36 @@ def read_storage_version_with_http_info(self, name, **kwargs): # noqa: E501 read the specified StorageVersion # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_storage_version_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the StorageVersion (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the StorageVersion (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1alpha1StorageVersion, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1alpha1StorageVersion, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1121,7 +1423,10 @@ def read_storage_version_with_http_info(self, name, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1134,8 +1439,7 @@ def read_storage_version_with_http_info(self, name, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_storage_version`") # noqa: E501 collection_formats = {} @@ -1145,10 +1449,10 @@ def read_storage_version_with_http_info(self, name, **kwargs): # noqa: E501 path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1156,11 +1460,16 @@ def read_storage_version_with_http_info(self, name, **kwargs): # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1alpha1StorageVersion", + 401: None, + } + return self.api_client.call_api( '/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}', 'GET', path_params, @@ -1169,13 +1478,14 @@ def read_storage_version_with_http_info(self, name, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1alpha1StorageVersion', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_storage_version_status(self, name, **kwargs): # noqa: E501 """read_storage_version_status # noqa: E501 @@ -1183,22 +1493,28 @@ def read_storage_version_status(self, name, **kwargs): # noqa: E501 read status of the specified StorageVersion # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_storage_version_status(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the StorageVersion (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the StorageVersion (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1alpha1StorageVersion + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1alpha1StorageVersion """ kwargs['_return_http_data_only'] = True return self.read_storage_version_status_with_http_info(name, **kwargs) # noqa: E501 @@ -1209,24 +1525,36 @@ def read_storage_version_status_with_http_info(self, name, **kwargs): # noqa: E read status of the specified StorageVersion # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_storage_version_status_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the StorageVersion (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the StorageVersion (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1alpha1StorageVersion, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1alpha1StorageVersion, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1240,7 +1568,10 @@ def read_storage_version_status_with_http_info(self, name, **kwargs): # noqa: E 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1253,8 +1584,7 @@ def read_storage_version_status_with_http_info(self, name, **kwargs): # noqa: E local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_storage_version_status`") # noqa: E501 collection_formats = {} @@ -1264,10 +1594,10 @@ def read_storage_version_status_with_http_info(self, name, **kwargs): # noqa: E path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1275,11 +1605,16 @@ def read_storage_version_status_with_http_info(self, name, **kwargs): # noqa: E body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1alpha1StorageVersion", + 401: None, + } + return self.api_client.call_api( '/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}/status', 'GET', path_params, @@ -1288,13 +1623,14 @@ def read_storage_version_status_with_http_info(self, name, **kwargs): # noqa: E body=body_params, post_params=form_params, files=local_var_files, - response_type='V1alpha1StorageVersion', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_storage_version(self, name, body, **kwargs): # noqa: E501 """replace_storage_version # noqa: E501 @@ -1302,26 +1638,36 @@ def replace_storage_version(self, name, body, **kwargs): # noqa: E501 replace the specified StorageVersion # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_storage_version(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the StorageVersion (required) - :param V1alpha1StorageVersion body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the StorageVersion (required) + :type name: str + :param body: (required) + :type body: V1alpha1StorageVersion + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1alpha1StorageVersion + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1alpha1StorageVersion """ kwargs['_return_http_data_only'] = True return self.replace_storage_version_with_http_info(name, body, **kwargs) # noqa: E501 @@ -1332,28 +1678,44 @@ def replace_storage_version_with_http_info(self, name, body, **kwargs): # noqa: replace the specified StorageVersion # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_storage_version_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the StorageVersion (required) - :param V1alpha1StorageVersion body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the StorageVersion (required) + :type name: str + :param body: (required) + :type body: V1alpha1StorageVersion + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1alpha1StorageVersion, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1alpha1StorageVersion, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1371,7 +1733,10 @@ def replace_storage_version_with_http_info(self, name, body, **kwargs): # noqa: 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1384,12 +1749,10 @@ def replace_storage_version_with_http_info(self, name, body, **kwargs): # noqa: local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_storage_version`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_storage_version`") # noqa: E501 collection_formats = {} @@ -1399,16 +1762,16 @@ def replace_storage_version_with_http_info(self, name, body, **kwargs): # noqa: path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1418,11 +1781,17 @@ def replace_storage_version_with_http_info(self, name, body, **kwargs): # noqa: body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1alpha1StorageVersion", + 201: "V1alpha1StorageVersion", + 401: None, + } + return self.api_client.call_api( '/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}', 'PUT', path_params, @@ -1431,13 +1800,14 @@ def replace_storage_version_with_http_info(self, name, body, **kwargs): # noqa: body=body_params, post_params=form_params, files=local_var_files, - response_type='V1alpha1StorageVersion', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_storage_version_status(self, name, body, **kwargs): # noqa: E501 """replace_storage_version_status # noqa: E501 @@ -1445,26 +1815,36 @@ def replace_storage_version_status(self, name, body, **kwargs): # noqa: E501 replace status of the specified StorageVersion # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_storage_version_status(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the StorageVersion (required) - :param V1alpha1StorageVersion body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the StorageVersion (required) + :type name: str + :param body: (required) + :type body: V1alpha1StorageVersion + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1alpha1StorageVersion + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1alpha1StorageVersion """ kwargs['_return_http_data_only'] = True return self.replace_storage_version_status_with_http_info(name, body, **kwargs) # noqa: E501 @@ -1475,28 +1855,44 @@ def replace_storage_version_status_with_http_info(self, name, body, **kwargs): replace status of the specified StorageVersion # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_storage_version_status_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the StorageVersion (required) - :param V1alpha1StorageVersion body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the StorageVersion (required) + :type name: str + :param body: (required) + :type body: V1alpha1StorageVersion + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1alpha1StorageVersion, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1alpha1StorageVersion, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1514,7 +1910,10 @@ def replace_storage_version_status_with_http_info(self, name, body, **kwargs): 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1527,12 +1926,10 @@ def replace_storage_version_status_with_http_info(self, name, body, **kwargs): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_storage_version_status`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_storage_version_status`") # noqa: E501 collection_formats = {} @@ -1542,16 +1939,16 @@ def replace_storage_version_status_with_http_info(self, name, body, **kwargs): path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1561,11 +1958,17 @@ def replace_storage_version_status_with_http_info(self, name, body, **kwargs): body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1alpha1StorageVersion", + 201: "V1alpha1StorageVersion", + 401: None, + } + return self.api_client.call_api( '/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}/status', 'PUT', path_params, @@ -1574,10 +1977,11 @@ def replace_storage_version_status_with_http_info(self, name, body, **kwargs): body=body_params, post_params=form_params, files=local_var_files, - response_type='V1alpha1StorageVersion', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) diff --git a/kubernetes/client/api/logs_api.py b/kubernetes/client/api/logs_api.py index 686851670a..eef209f9d4 100644 --- a/kubernetes/client/api/logs_api.py +++ b/kubernetes/client/api/logs_api.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ @@ -41,21 +41,26 @@ def log_file_handler(self, logpath, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.log_file_handler(logpath, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str logpath: path to the log (required) + :param logpath: path to the log (required) + :type logpath: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: None + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: None """ kwargs['_return_http_data_only'] = True return self.log_file_handler_with_http_info(logpath, **kwargs) # noqa: E501 @@ -65,23 +70,34 @@ def log_file_handler_with_http_info(self, logpath, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.log_file_handler_with_http_info(logpath, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str logpath: path to the log (required) + :param logpath: path to the log (required) + :type logpath: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: None + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: None """ local_var_params = locals() @@ -94,7 +110,10 @@ def log_file_handler_with_http_info(self, logpath, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -107,8 +126,7 @@ def log_file_handler_with_http_info(self, logpath, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'logpath' is set - if self.api_client.client_side_validation and ('logpath' not in local_var_params or # noqa: E501 - local_var_params['logpath'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('logpath') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `logpath` when calling `log_file_handler`") # noqa: E501 collection_formats = {} @@ -119,7 +137,7 @@ def log_file_handler_with_http_info(self, logpath, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -128,6 +146,8 @@ def log_file_handler_with_http_info(self, logpath, **kwargs): # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = {} + return self.api_client.call_api( '/logs/{logpath}', 'GET', path_params, @@ -136,33 +156,38 @@ def log_file_handler_with_http_info(self, logpath, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type=None, # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def log_file_list_handler(self, **kwargs): # noqa: E501 """log_file_list_handler # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.log_file_list_handler(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: None + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: None """ kwargs['_return_http_data_only'] = True return self.log_file_list_handler_with_http_info(**kwargs) # noqa: E501 @@ -172,22 +197,32 @@ def log_file_list_handler_with_http_info(self, **kwargs): # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.log_file_list_handler_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: None + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: None """ local_var_params = locals() @@ -199,7 +234,10 @@ def log_file_list_handler_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -218,7 +256,7 @@ def log_file_list_handler_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -227,6 +265,8 @@ def log_file_list_handler_with_http_info(self, **kwargs): # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = {} + return self.api_client.call_api( '/logs/', 'GET', path_params, @@ -235,10 +275,11 @@ def log_file_list_handler_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type=None, # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) diff --git a/kubernetes/client/api/networking_api.py b/kubernetes/client/api/networking_api.py index 1b0bf75a3c..2dda743e86 100644 --- a/kubernetes/client/api/networking_api.py +++ b/kubernetes/client/api/networking_api.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ @@ -42,20 +42,24 @@ def get_api_group(self, **kwargs): # noqa: E501 get information of a group # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_group(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1APIGroup + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1APIGroup """ kwargs['_return_http_data_only'] = True return self.get_api_group_with_http_info(**kwargs) # noqa: E501 @@ -66,22 +70,32 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 get information of a group # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_group_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1APIGroup, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1APIGroup, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -93,7 +107,10 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -112,7 +129,7 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -125,6 +142,11 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1APIGroup", + 401: None, + } + return self.api_client.call_api( '/apis/networking.k8s.io/', 'GET', path_params, @@ -133,10 +155,11 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1APIGroup', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) diff --git a/kubernetes/client/api/networking_v1_api.py b/kubernetes/client/api/networking_v1_api.py index 9148d6d052..a60c0c9de4 100644 --- a/kubernetes/client/api/networking_v1_api.py +++ b/kubernetes/client/api/networking_v1_api.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ @@ -42,25 +42,34 @@ def create_ingress_class(self, body, **kwargs): # noqa: E501 create an IngressClass # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_ingress_class(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param V1IngressClass body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param body: (required) + :type body: V1IngressClass + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1IngressClass + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1IngressClass """ kwargs['_return_http_data_only'] = True return self.create_ingress_class_with_http_info(body, **kwargs) # noqa: E501 @@ -71,27 +80,42 @@ def create_ingress_class_with_http_info(self, body, **kwargs): # noqa: E501 create an IngressClass # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_ingress_class_with_http_info(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param V1IngressClass body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param body: (required) + :type body: V1IngressClass + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1IngressClass, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1IngressClass, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -108,7 +132,10 @@ def create_ingress_class_with_http_info(self, body, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -121,8 +148,7 @@ def create_ingress_class_with_http_info(self, body, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_ingress_class`") # noqa: E501 collection_formats = {} @@ -130,16 +156,16 @@ def create_ingress_class_with_http_info(self, body, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -149,11 +175,18 @@ def create_ingress_class_with_http_info(self, body, **kwargs): # noqa: E501 body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1IngressClass", + 201: "V1IngressClass", + 202: "V1IngressClass", + 401: None, + } + return self.api_client.call_api( '/apis/networking.k8s.io/v1/ingressclasses', 'POST', path_params, @@ -162,78 +195,100 @@ def create_ingress_class_with_http_info(self, body, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1IngressClass', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) - def create_namespaced_ingress(self, namespace, body, **kwargs): # noqa: E501 - """create_namespaced_ingress # noqa: E501 + def create_ip_address(self, body, **kwargs): # noqa: E501 + """create_ip_address # noqa: E501 - create an Ingress # noqa: E501 + create an IPAddress # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_namespaced_ingress(namespace, body, async_req=True) + + >>> thread = api.create_ip_address(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1Ingress body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param body: (required) + :type body: V1IPAddress + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Ingress + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1IPAddress """ kwargs['_return_http_data_only'] = True - return self.create_namespaced_ingress_with_http_info(namespace, body, **kwargs) # noqa: E501 + return self.create_ip_address_with_http_info(body, **kwargs) # noqa: E501 - def create_namespaced_ingress_with_http_info(self, namespace, body, **kwargs): # noqa: E501 - """create_namespaced_ingress # noqa: E501 + def create_ip_address_with_http_info(self, body, **kwargs): # noqa: E501 + """create_ip_address # noqa: E501 - create an Ingress # noqa: E501 + create an IPAddress # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_namespaced_ingress_with_http_info(namespace, body, async_req=True) + + >>> thread = api.create_ip_address_with_http_info(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1Ingress body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param body: (required) + :type body: V1IPAddress + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Ingress, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1IPAddress, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ - 'namespace', 'body', 'pretty', 'dry_run', @@ -245,7 +300,10 @@ def create_namespaced_ingress_with_http_info(self, namespace, body, **kwargs): 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -253,36 +311,29 @@ def create_namespaced_ingress_with_http_info(self, namespace, body, **kwargs): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method create_namespaced_ingress" % key + " to method create_ip_address" % key ) local_var_params[key] = val del local_var_params['kwargs'] - # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_ingress`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_ingress`") # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `create_ip_address`") # noqa: E501 collection_formats = {} path_params = {} - if 'namespace' in local_var_params: - path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -292,85 +343,119 @@ def create_namespaced_ingress_with_http_info(self, namespace, body, **kwargs): body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1IPAddress", + 201: "V1IPAddress", + 202: "V1IPAddress", + 401: None, + } + return self.api_client.call_api( - '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses', 'POST', + '/apis/networking.k8s.io/v1/ipaddresses', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Ingress', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) - def create_namespaced_network_policy(self, namespace, body, **kwargs): # noqa: E501 - """create_namespaced_network_policy # noqa: E501 + def create_namespaced_ingress(self, namespace, body, **kwargs): # noqa: E501 + """create_namespaced_ingress # noqa: E501 - create a NetworkPolicy # noqa: E501 + create an Ingress # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_namespaced_network_policy(namespace, body, async_req=True) + + >>> thread = api.create_namespaced_ingress(namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1NetworkPolicy body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1Ingress + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1NetworkPolicy + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Ingress """ kwargs['_return_http_data_only'] = True - return self.create_namespaced_network_policy_with_http_info(namespace, body, **kwargs) # noqa: E501 + return self.create_namespaced_ingress_with_http_info(namespace, body, **kwargs) # noqa: E501 - def create_namespaced_network_policy_with_http_info(self, namespace, body, **kwargs): # noqa: E501 - """create_namespaced_network_policy # noqa: E501 + def create_namespaced_ingress_with_http_info(self, namespace, body, **kwargs): # noqa: E501 + """create_namespaced_ingress # noqa: E501 - create a NetworkPolicy # noqa: E501 + create an Ingress # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_namespaced_network_policy_with_http_info(namespace, body, async_req=True) + + >>> thread = api.create_namespaced_ingress_with_http_info(namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1NetworkPolicy body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1Ingress + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1NetworkPolicy, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Ingress, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -388,7 +473,10 @@ def create_namespaced_network_policy_with_http_info(self, namespace, body, **kwa 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -396,18 +484,16 @@ def create_namespaced_network_policy_with_http_info(self, namespace, body, **kwa if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method create_namespaced_network_policy" % key + " to method create_namespaced_ingress" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_network_policy`") # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_ingress`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_network_policy`") # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_ingress`") # noqa: E501 collection_formats = {} @@ -416,16 +502,16 @@ def create_namespaced_network_policy_with_http_info(self, namespace, body, **kwa path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -435,127 +521,140 @@ def create_namespaced_network_policy_with_http_info(self, namespace, body, **kwa body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Ingress", + 201: "V1Ingress", + 202: "V1Ingress", + 401: None, + } + return self.api_client.call_api( - '/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies', 'POST', + '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1NetworkPolicy', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) - def delete_collection_ingress_class(self, **kwargs): # noqa: E501 - """delete_collection_ingress_class # noqa: E501 + def create_namespaced_network_policy(self, namespace, body, **kwargs): # noqa: E501 + """create_namespaced_network_policy # noqa: E501 - delete collection of IngressClass # noqa: E501 + create a NetworkPolicy # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_collection_ingress_class(async_req=True) + + >>> thread = api.create_namespaced_network_policy(namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1NetworkPolicy + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1NetworkPolicy """ kwargs['_return_http_data_only'] = True - return self.delete_collection_ingress_class_with_http_info(**kwargs) # noqa: E501 + return self.create_namespaced_network_policy_with_http_info(namespace, body, **kwargs) # noqa: E501 - def delete_collection_ingress_class_with_http_info(self, **kwargs): # noqa: E501 - """delete_collection_ingress_class # noqa: E501 + def create_namespaced_network_policy_with_http_info(self, namespace, body, **kwargs): # noqa: E501 + """create_namespaced_network_policy # noqa: E501 - delete collection of IngressClass # noqa: E501 + create a NetworkPolicy # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_collection_ingress_class_with_http_info(async_req=True) + + >>> thread = api.create_namespaced_network_policy_with_http_info(namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1NetworkPolicy + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1NetworkPolicy, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ + 'namespace', + 'body', 'pretty', - '_continue', 'dry_run', - 'field_selector', - 'grace_period_seconds', - 'label_selector', - 'limit', - 'orphan_dependents', - 'propagation_policy', - 'resource_version', - 'resource_version_match', - 'send_initial_events', - 'timeout_seconds', - 'body' + 'field_manager', + 'field_validation' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -563,44 +662,34 @@ def delete_collection_ingress_class_with_http_info(self, **kwargs): # noqa: E50 if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method delete_collection_ingress_class" % key + " to method create_namespaced_network_policy" % key ) local_var_params[key] = val del local_var_params['kwargs'] + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_network_policy`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_network_policy`") # noqa: E501 collection_formats = {} path_params = {} + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 - query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 - query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 - query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 - query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 - query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 - query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 - query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 - query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 - query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 - query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -610,130 +699,135 @@ def delete_collection_ingress_class_with_http_info(self, **kwargs): # noqa: E50 body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1NetworkPolicy", + 201: "V1NetworkPolicy", + 202: "V1NetworkPolicy", + 401: None, + } + return self.api_client.call_api( - '/apis/networking.k8s.io/v1/ingressclasses', 'DELETE', + '/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) - def delete_collection_namespaced_ingress(self, namespace, **kwargs): # noqa: E501 - """delete_collection_namespaced_ingress # noqa: E501 + def create_service_cidr(self, body, **kwargs): # noqa: E501 + """create_service_cidr # noqa: E501 - delete collection of Ingress # noqa: E501 + create a ServiceCIDR # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_collection_namespaced_ingress(namespace, async_req=True) + + >>> thread = api.create_service_cidr(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param body: (required) + :type body: V1ServiceCIDR + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ServiceCIDR """ kwargs['_return_http_data_only'] = True - return self.delete_collection_namespaced_ingress_with_http_info(namespace, **kwargs) # noqa: E501 + return self.create_service_cidr_with_http_info(body, **kwargs) # noqa: E501 - def delete_collection_namespaced_ingress_with_http_info(self, namespace, **kwargs): # noqa: E501 - """delete_collection_namespaced_ingress # noqa: E501 + def create_service_cidr_with_http_info(self, body, **kwargs): # noqa: E501 + """create_service_cidr # noqa: E501 - delete collection of Ingress # noqa: E501 + create a ServiceCIDR # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_collection_namespaced_ingress_with_http_info(namespace, async_req=True) + + >>> thread = api.create_service_cidr_with_http_info(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param body: (required) + :type body: V1ServiceCIDR + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ServiceCIDR, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ - 'namespace', + 'body', 'pretty', - '_continue', 'dry_run', - 'field_selector', - 'grace_period_seconds', - 'label_selector', - 'limit', - 'orphan_dependents', - 'propagation_policy', - 'resource_version', - 'resource_version_match', - 'send_initial_events', - 'timeout_seconds', - 'body' + 'field_manager', + 'field_validation' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -741,50 +835,29 @@ def delete_collection_namespaced_ingress_with_http_info(self, namespace, **kwarg if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method delete_collection_namespaced_ingress" % key + " to method create_service_cidr" % key ) local_var_params[key] = val del local_var_params['kwargs'] - # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_ingress`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `create_service_cidr`") # noqa: E501 collection_formats = {} path_params = {} - if 'namespace' in local_var_params: - path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 - query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 - query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 - query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 - query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 - query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 - query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 - query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 - query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 - query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 - query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -794,114 +867,166 @@ def delete_collection_namespaced_ingress_with_http_info(self, namespace, **kwarg body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ServiceCIDR", + 201: "V1ServiceCIDR", + 202: "V1ServiceCIDR", + 401: None, + } + return self.api_client.call_api( - '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses', 'DELETE', + '/apis/networking.k8s.io/v1/servicecidrs', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) - def delete_collection_namespaced_network_policy(self, namespace, **kwargs): # noqa: E501 - """delete_collection_namespaced_network_policy # noqa: E501 + def delete_collection_ingress_class(self, **kwargs): # noqa: E501 + """delete_collection_ingress_class # noqa: E501 - delete collection of NetworkPolicy # noqa: E501 + delete collection of IngressClass # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_collection_namespaced_network_policy(namespace, async_req=True) + + >>> thread = api.delete_collection_ingress_class(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True - return self.delete_collection_namespaced_network_policy_with_http_info(namespace, **kwargs) # noqa: E501 + return self.delete_collection_ingress_class_with_http_info(**kwargs) # noqa: E501 - def delete_collection_namespaced_network_policy_with_http_info(self, namespace, **kwargs): # noqa: E501 - """delete_collection_namespaced_network_policy # noqa: E501 + def delete_collection_ingress_class_with_http_info(self, **kwargs): # noqa: E501 + """delete_collection_ingress_class # noqa: E501 - delete collection of NetworkPolicy # noqa: E501 + delete collection of IngressClass # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_collection_namespaced_network_policy_with_http_info(namespace, async_req=True) + + >>> thread = api.delete_collection_ingress_class_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ - 'namespace', 'pretty', '_continue', 'dry_run', 'field_selector', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'label_selector', 'limit', 'orphan_dependents', @@ -917,7 +1042,10 @@ def delete_collection_namespaced_network_policy_with_http_info(self, namespace, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -925,50 +1053,46 @@ def delete_collection_namespaced_network_policy_with_http_info(self, namespace, if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method delete_collection_namespaced_network_policy" % key + " to method delete_collection_ingress_class" % key ) local_var_params[key] = val del local_var_params['kwargs'] - # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_network_policy`") # noqa: E501 collection_formats = {} path_params = {} - if 'namespace' in local_var_params: - path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -978,98 +1102,172 @@ def delete_collection_namespaced_network_policy_with_http_info(self, namespace, body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 401: None, + } + return self.api_client.call_api( - '/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies', 'DELETE', + '/apis/networking.k8s.io/v1/ingressclasses', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) - def delete_ingress_class(self, name, **kwargs): # noqa: E501 - """delete_ingress_class # noqa: E501 + def delete_collection_ip_address(self, **kwargs): # noqa: E501 + """delete_collection_ip_address # noqa: E501 - delete an IngressClass # noqa: E501 + delete collection of IPAddress # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_ingress_class(name, async_req=True) + + >>> thread = api.delete_collection_ip_address(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the IngressClass (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True - return self.delete_ingress_class_with_http_info(name, **kwargs) # noqa: E501 + return self.delete_collection_ip_address_with_http_info(**kwargs) # noqa: E501 - def delete_ingress_class_with_http_info(self, name, **kwargs): # noqa: E501 - """delete_ingress_class # noqa: E501 + def delete_collection_ip_address_with_http_info(self, **kwargs): # noqa: E501 + """delete_collection_ip_address # noqa: E501 - delete an IngressClass # noqa: E501 + delete collection of IPAddress # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_ingress_class_with_http_info(name, async_req=True) + + >>> thread = api.delete_collection_ip_address_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the IngressClass (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ - 'name', 'pretty', + '_continue', 'dry_run', + 'field_selector', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', + 'label_selector', + 'limit', 'orphan_dependents', 'propagation_policy', + 'resource_version', + 'resource_version_match', + 'send_initial_events', + 'timeout_seconds', 'body' ] all_params.extend( @@ -1077,7 +1275,10 @@ def delete_ingress_class_with_http_info(self, name, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1085,34 +1286,46 @@ def delete_ingress_class_with_http_info(self, name, **kwargs): # noqa: E501 if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method delete_ingress_class" % key + " to method delete_collection_ip_address" % key ) local_var_params[key] = val del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `delete_ingress_class`") # noqa: E501 collection_formats = {} path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 + query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 + query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 + query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 + query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 + query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 + query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 + query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1122,101 +1335,177 @@ def delete_ingress_class_with_http_info(self, name, **kwargs): # noqa: E501 body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 401: None, + } + return self.api_client.call_api( - '/apis/networking.k8s.io/v1/ingressclasses/{name}', 'DELETE', + '/apis/networking.k8s.io/v1/ipaddresses', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) - def delete_namespaced_ingress(self, name, namespace, **kwargs): # noqa: E501 - """delete_namespaced_ingress # noqa: E501 + def delete_collection_namespaced_ingress(self, namespace, **kwargs): # noqa: E501 + """delete_collection_namespaced_ingress # noqa: E501 - delete an Ingress # noqa: E501 + delete collection of Ingress # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_namespaced_ingress(name, namespace, async_req=True) + + >>> thread = api.delete_collection_namespaced_ingress(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Ingress (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True - return self.delete_namespaced_ingress_with_http_info(name, namespace, **kwargs) # noqa: E501 + return self.delete_collection_namespaced_ingress_with_http_info(namespace, **kwargs) # noqa: E501 - def delete_namespaced_ingress_with_http_info(self, name, namespace, **kwargs): # noqa: E501 - """delete_namespaced_ingress # noqa: E501 + def delete_collection_namespaced_ingress_with_http_info(self, namespace, **kwargs): # noqa: E501 + """delete_collection_namespaced_ingress # noqa: E501 - delete an Ingress # noqa: E501 + delete collection of Ingress # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_namespaced_ingress_with_http_info(name, namespace, async_req=True) + + >>> thread = api.delete_collection_namespaced_ingress_with_http_info(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Ingress (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ - 'name', 'namespace', 'pretty', + '_continue', 'dry_run', + 'field_selector', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', + 'label_selector', + 'limit', 'orphan_dependents', 'propagation_policy', + 'resource_version', + 'resource_version_match', + 'send_initial_events', + 'timeout_seconds', 'body' ] all_params.extend( @@ -1224,7 +1513,10 @@ def delete_namespaced_ingress_with_http_info(self, name, namespace, **kwargs): 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1232,40 +1524,51 @@ def delete_namespaced_ingress_with_http_info(self, name, namespace, **kwargs): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method delete_namespaced_ingress" % key + " to method delete_collection_namespaced_ingress" % key ) local_var_params[key] = val del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_ingress`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_ingress`") # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_ingress`") # noqa: E501 collection_formats = {} path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 if 'namespace' in local_var_params: path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 + query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 + query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 + query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 + query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 + query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 + query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 + query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1275,101 +1578,177 @@ def delete_namespaced_ingress_with_http_info(self, name, namespace, **kwargs): body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 401: None, + } + return self.api_client.call_api( - '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}', 'DELETE', + '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) - def delete_namespaced_network_policy(self, name, namespace, **kwargs): # noqa: E501 - """delete_namespaced_network_policy # noqa: E501 + def delete_collection_namespaced_network_policy(self, namespace, **kwargs): # noqa: E501 + """delete_collection_namespaced_network_policy # noqa: E501 - delete a NetworkPolicy # noqa: E501 + delete collection of NetworkPolicy # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_namespaced_network_policy(name, namespace, async_req=True) + + >>> thread = api.delete_collection_namespaced_network_policy(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the NetworkPolicy (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True - return self.delete_namespaced_network_policy_with_http_info(name, namespace, **kwargs) # noqa: E501 + return self.delete_collection_namespaced_network_policy_with_http_info(namespace, **kwargs) # noqa: E501 - def delete_namespaced_network_policy_with_http_info(self, name, namespace, **kwargs): # noqa: E501 - """delete_namespaced_network_policy # noqa: E501 + def delete_collection_namespaced_network_policy_with_http_info(self, namespace, **kwargs): # noqa: E501 + """delete_collection_namespaced_network_policy # noqa: E501 - delete a NetworkPolicy # noqa: E501 + delete collection of NetworkPolicy # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_namespaced_network_policy_with_http_info(name, namespace, async_req=True) + + >>> thread = api.delete_collection_namespaced_network_policy_with_http_info(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the NetworkPolicy (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ - 'name', 'namespace', 'pretty', + '_continue', 'dry_run', + 'field_selector', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', + 'label_selector', + 'limit', 'orphan_dependents', 'propagation_policy', + 'resource_version', + 'resource_version_match', + 'send_initial_events', + 'timeout_seconds', 'body' ] all_params.extend( @@ -1377,7 +1756,10 @@ def delete_namespaced_network_policy_with_http_info(self, name, namespace, **kwa 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1385,40 +1767,51 @@ def delete_namespaced_network_policy_with_http_info(self, name, namespace, **kwa if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method delete_namespaced_network_policy" % key + " to method delete_collection_namespaced_network_policy" % key ) local_var_params[key] = val del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_network_policy`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_network_policy`") # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_network_policy`") # noqa: E501 collection_formats = {} path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 if 'namespace' in local_var_params: path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 + query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 + query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 + query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 + query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 + query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 + query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 + query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1428,85 +1821,183 @@ def delete_namespaced_network_policy_with_http_info(self, name, namespace, **kwa body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 401: None, + } + return self.api_client.call_api( - '/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}', 'DELETE', + '/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) - def get_api_resources(self, **kwargs): # noqa: E501 - """get_api_resources # noqa: E501 + def delete_collection_service_cidr(self, **kwargs): # noqa: E501 + """delete_collection_service_cidr # noqa: E501 - get available resources # noqa: E501 + delete collection of ServiceCIDR # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_api_resources(async_req=True) + + >>> thread = api.delete_collection_service_cidr(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1APIResourceList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True - return self.get_api_resources_with_http_info(**kwargs) # noqa: E501 + return self.delete_collection_service_cidr_with_http_info(**kwargs) # noqa: E501 - def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 - """get_api_resources # noqa: E501 + def delete_collection_service_cidr_with_http_info(self, **kwargs): # noqa: E501 + """delete_collection_service_cidr # noqa: E501 - get available resources # noqa: E501 + delete collection of ServiceCIDR # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_api_resources_with_http_info(async_req=True) + + >>> thread = api.delete_collection_service_cidr_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ + 'pretty', + '_continue', + 'dry_run', + 'field_selector', + 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', + 'label_selector', + 'limit', + 'orphan_dependents', + 'propagation_policy', + 'resource_version', + 'resource_version_match', + 'send_initial_events', + 'timeout_seconds', + 'body' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1514,7 +2005,7 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method get_api_resources" % key + " to method delete_collection_service_cidr" % key ) local_var_params[key] = val del local_var_params['kwargs'] @@ -1524,127 +2015,187 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 path_params = {} query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 + query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 + query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 + query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 + query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 + query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 + query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 + query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 + query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 + query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 + query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 401: None, + } + return self.api_client.call_api( - '/apis/networking.k8s.io/v1/', 'GET', + '/apis/networking.k8s.io/v1/servicecidrs', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1APIResourceList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) - def list_ingress_class(self, **kwargs): # noqa: E501 - """list_ingress_class # noqa: E501 + def delete_ingress_class(self, name, **kwargs): # noqa: E501 + """delete_ingress_class # noqa: E501 - list or watch objects of kind IngressClass # noqa: E501 + delete an IngressClass # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_ingress_class(async_req=True) + + >>> thread = api.delete_ingress_class(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param name: name of the IngressClass (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1IngressClassList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True - return self.list_ingress_class_with_http_info(**kwargs) # noqa: E501 + return self.delete_ingress_class_with_http_info(name, **kwargs) # noqa: E501 - def list_ingress_class_with_http_info(self, **kwargs): # noqa: E501 - """list_ingress_class # noqa: E501 + def delete_ingress_class_with_http_info(self, name, **kwargs): # noqa: E501 + """delete_ingress_class # noqa: E501 - list or watch objects of kind IngressClass # noqa: E501 + delete an IngressClass # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_ingress_class_with_http_info(async_req=True) + + >>> thread = api.delete_ingress_class_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param name: name of the IngressClass (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1IngressClassList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ + 'name', 'pretty', - 'allow_watch_bookmarks', - '_continue', - 'field_selector', - 'label_selector', - 'limit', - 'resource_version', - 'resource_version_match', - 'send_initial_events', - 'timeout_seconds', - 'watch' + 'dry_run', + 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', + 'orphan_dependents', + 'propagation_policy', + 'body' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1652,159 +2203,187 @@ def list_ingress_class_with_http_info(self, **kwargs): # noqa: E501 if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method list_ingress_class" % key + " to method delete_ingress_class" % key ) local_var_params[key] = val del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `delete_ingress_class`") # noqa: E501 collection_formats = {} path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 - query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 - query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 - query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 - query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 - query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 - query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 - query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 - query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 - query_params.append(('watch', local_var_params['watch'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 + query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 + query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 + query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 202: "V1Status", + 401: None, + } + return self.api_client.call_api( - '/apis/networking.k8s.io/v1/ingressclasses', 'GET', + '/apis/networking.k8s.io/v1/ingressclasses/{name}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1IngressClassList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) - def list_ingress_for_all_namespaces(self, **kwargs): # noqa: E501 - """list_ingress_for_all_namespaces # noqa: E501 + def delete_ip_address(self, name, **kwargs): # noqa: E501 + """delete_ip_address # noqa: E501 - list or watch objects of kind Ingress # noqa: E501 + delete an IPAddress # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_ingress_for_all_namespaces(async_req=True) + + >>> thread = api.delete_ip_address(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param name: name of the IPAddress (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1IngressList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True - return self.list_ingress_for_all_namespaces_with_http_info(**kwargs) # noqa: E501 + return self.delete_ip_address_with_http_info(name, **kwargs) # noqa: E501 - def list_ingress_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501 - """list_ingress_for_all_namespaces # noqa: E501 + def delete_ip_address_with_http_info(self, name, **kwargs): # noqa: E501 + """delete_ip_address # noqa: E501 - list or watch objects of kind Ingress # noqa: E501 + delete an IPAddress # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_ingress_for_all_namespaces_with_http_info(async_req=True) + + >>> thread = api.delete_ip_address_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param name: name of the IPAddress (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1IngressList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ - 'allow_watch_bookmarks', - '_continue', - 'field_selector', - 'label_selector', - 'limit', + 'name', 'pretty', - 'resource_version', - 'resource_version_match', - 'send_initial_events', - 'timeout_seconds', - 'watch' + 'dry_run', + 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', + 'orphan_dependents', + 'propagation_policy', + 'body' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1812,162 +2391,192 @@ def list_ingress_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E50 if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method list_ingress_for_all_namespaces" % key + " to method delete_ip_address" % key ) local_var_params[key] = val del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `delete_ip_address`") # noqa: E501 collection_formats = {} path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 - query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 - query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 - query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 - query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 - query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 - query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 - query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 - query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 - query_params.append(('watch', local_var_params['watch'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 + query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 + query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 + query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 202: "V1Status", + 401: None, + } + return self.api_client.call_api( - '/apis/networking.k8s.io/v1/ingresses', 'GET', + '/apis/networking.k8s.io/v1/ipaddresses/{name}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1IngressList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) - def list_namespaced_ingress(self, namespace, **kwargs): # noqa: E501 - """list_namespaced_ingress # noqa: E501 + def delete_namespaced_ingress(self, name, namespace, **kwargs): # noqa: E501 + """delete_namespaced_ingress # noqa: E501 - list or watch objects of kind Ingress # noqa: E501 + delete an Ingress # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_namespaced_ingress(namespace, async_req=True) + + >>> thread = api.delete_namespaced_ingress(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param name: name of the Ingress (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1IngressList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True - return self.list_namespaced_ingress_with_http_info(namespace, **kwargs) # noqa: E501 + return self.delete_namespaced_ingress_with_http_info(name, namespace, **kwargs) # noqa: E501 - def list_namespaced_ingress_with_http_info(self, namespace, **kwargs): # noqa: E501 - """list_namespaced_ingress # noqa: E501 + def delete_namespaced_ingress_with_http_info(self, name, namespace, **kwargs): # noqa: E501 + """delete_namespaced_ingress # noqa: E501 - list or watch objects of kind Ingress # noqa: E501 + delete an Ingress # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_namespaced_ingress_with_http_info(namespace, async_req=True) + + >>> thread = api.delete_namespaced_ingress_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param name: name of the Ingress (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1IngressList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ + 'name', 'namespace', 'pretty', - 'allow_watch_bookmarks', - '_continue', - 'field_selector', - 'label_selector', - 'limit', - 'resource_version', - 'resource_version_match', - 'send_initial_events', - 'timeout_seconds', - 'watch' + 'dry_run', + 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', + 'orphan_dependents', + 'propagation_policy', + 'body' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1975,168 +2584,3505 @@ def list_namespaced_ingress_with_http_info(self, namespace, **kwargs): # noqa: if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method list_namespaced_ingress" % key + " to method delete_namespaced_ingress" % key ) local_var_params[key] = val del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_ingress`") # noqa: E501 + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_ingress`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 + query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 + query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 + query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1Status", + 202: "V1Status", + 401: None, + } + + return self.api_client.call_api( + '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_namespaced_network_policy(self, name, namespace, **kwargs): # noqa: E501 + """delete_namespaced_network_policy # noqa: E501 + + delete a NetworkPolicy # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_namespaced_network_policy(name, namespace, async_req=True) + >>> result = thread.get() + + :param name: name of the NetworkPolicy (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1Status + """ + kwargs['_return_http_data_only'] = True + return self.delete_namespaced_network_policy_with_http_info(name, namespace, **kwargs) # noqa: E501 + + def delete_namespaced_network_policy_with_http_info(self, name, namespace, **kwargs): # noqa: E501 + """delete_namespaced_network_policy # noqa: E501 + + delete a NetworkPolicy # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_namespaced_network_policy_with_http_info(name, namespace, async_req=True) + >>> result = thread.get() + + :param name: name of the NetworkPolicy (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'namespace', + 'pretty', + 'dry_run', + 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', + 'orphan_dependents', + 'propagation_policy', + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_namespaced_network_policy" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_network_policy`") # noqa: E501 + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_network_policy`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 + query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 + query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 + query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1Status", + 202: "V1Status", + 401: None, + } + + return self.api_client.call_api( + '/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_service_cidr(self, name, **kwargs): # noqa: E501 + """delete_service_cidr # noqa: E501 + + delete a ServiceCIDR # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_service_cidr(name, async_req=True) + >>> result = thread.get() + + :param name: name of the ServiceCIDR (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1Status + """ + kwargs['_return_http_data_only'] = True + return self.delete_service_cidr_with_http_info(name, **kwargs) # noqa: E501 + + def delete_service_cidr_with_http_info(self, name, **kwargs): # noqa: E501 + """delete_service_cidr # noqa: E501 + + delete a ServiceCIDR # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_service_cidr_with_http_info(name, async_req=True) + >>> result = thread.get() + + :param name: name of the ServiceCIDR (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'pretty', + 'dry_run', + 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', + 'orphan_dependents', + 'propagation_policy', + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_service_cidr" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `delete_service_cidr`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 + query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 + query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 + query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1Status", + 202: "V1Status", + 401: None, + } + + return self.api_client.call_api( + '/apis/networking.k8s.io/v1/servicecidrs/{name}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_api_resources(self, **kwargs): # noqa: E501 + """get_api_resources # noqa: E501 + + get available resources # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_api_resources(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1APIResourceList + """ + kwargs['_return_http_data_only'] = True + return self.get_api_resources_with_http_info(**kwargs) # noqa: E501 + + def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 + """get_api_resources # noqa: E501 + + get available resources # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_api_resources_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_api_resources" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1APIResourceList", + 401: None, + } + + return self.api_client.call_api( + '/apis/networking.k8s.io/v1/', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def list_ingress_class(self, **kwargs): # noqa: E501 + """list_ingress_class # noqa: E501 + + list or watch objects of kind IngressClass # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_ingress_class(async_req=True) + >>> result = thread.get() + + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1IngressClassList + """ + kwargs['_return_http_data_only'] = True + return self.list_ingress_class_with_http_info(**kwargs) # noqa: E501 + + def list_ingress_class_with_http_info(self, **kwargs): # noqa: E501 + """list_ingress_class # noqa: E501 + + list or watch objects of kind IngressClass # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_ingress_class_with_http_info(async_req=True) + >>> result = thread.get() + + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1IngressClassList, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'pretty', + 'allow_watch_bookmarks', + '_continue', + 'field_selector', + 'label_selector', + 'limit', + 'resource_version', + 'resource_version_match', + 'send_initial_events', + 'timeout_seconds', + 'watch' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_ingress_class" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 + query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 + query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 + query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 + query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 + query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 + query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 + query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 + query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 + query_params.append(('watch', local_var_params['watch'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1IngressClassList", + 401: None, + } + + return self.api_client.call_api( + '/apis/networking.k8s.io/v1/ingressclasses', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def list_ingress_for_all_namespaces(self, **kwargs): # noqa: E501 + """list_ingress_for_all_namespaces # noqa: E501 + + list or watch objects of kind Ingress # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_ingress_for_all_namespaces(async_req=True) + >>> result = thread.get() + + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1IngressList + """ + kwargs['_return_http_data_only'] = True + return self.list_ingress_for_all_namespaces_with_http_info(**kwargs) # noqa: E501 + + def list_ingress_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501 + """list_ingress_for_all_namespaces # noqa: E501 + + list or watch objects of kind Ingress # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_ingress_for_all_namespaces_with_http_info(async_req=True) + >>> result = thread.get() + + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1IngressList, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'allow_watch_bookmarks', + '_continue', + 'field_selector', + 'label_selector', + 'limit', + 'pretty', + 'resource_version', + 'resource_version_match', + 'send_initial_events', + 'timeout_seconds', + 'watch' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_ingress_for_all_namespaces" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 + query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 + query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 + query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 + query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 + query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 + query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 + query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 + query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 + query_params.append(('watch', local_var_params['watch'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1IngressList", + 401: None, + } + + return self.api_client.call_api( + '/apis/networking.k8s.io/v1/ingresses', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def list_ip_address(self, **kwargs): # noqa: E501 + """list_ip_address # noqa: E501 + + list or watch objects of kind IPAddress # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_ip_address(async_req=True) + >>> result = thread.get() + + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1IPAddressList + """ + kwargs['_return_http_data_only'] = True + return self.list_ip_address_with_http_info(**kwargs) # noqa: E501 + + def list_ip_address_with_http_info(self, **kwargs): # noqa: E501 + """list_ip_address # noqa: E501 + + list or watch objects of kind IPAddress # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_ip_address_with_http_info(async_req=True) + >>> result = thread.get() + + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1IPAddressList, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'pretty', + 'allow_watch_bookmarks', + '_continue', + 'field_selector', + 'label_selector', + 'limit', + 'resource_version', + 'resource_version_match', + 'send_initial_events', + 'timeout_seconds', + 'watch' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_ip_address" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 + query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 + query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 + query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 + query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 + query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 + query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 + query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 + query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 + query_params.append(('watch', local_var_params['watch'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1IPAddressList", + 401: None, + } + + return self.api_client.call_api( + '/apis/networking.k8s.io/v1/ipaddresses', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def list_namespaced_ingress(self, namespace, **kwargs): # noqa: E501 + """list_namespaced_ingress # noqa: E501 + + list or watch objects of kind Ingress # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_namespaced_ingress(namespace, async_req=True) + >>> result = thread.get() + + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1IngressList + """ + kwargs['_return_http_data_only'] = True + return self.list_namespaced_ingress_with_http_info(namespace, **kwargs) # noqa: E501 + + def list_namespaced_ingress_with_http_info(self, namespace, **kwargs): # noqa: E501 + """list_namespaced_ingress # noqa: E501 + + list or watch objects of kind Ingress # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_namespaced_ingress_with_http_info(namespace, async_req=True) + >>> result = thread.get() + + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1IngressList, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'namespace', + 'pretty', + 'allow_watch_bookmarks', + '_continue', + 'field_selector', + 'label_selector', + 'limit', + 'resource_version', + 'resource_version_match', + 'send_initial_events', + 'timeout_seconds', + 'watch' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_namespaced_ingress" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_ingress`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 + query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 + query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 + query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 + query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 + query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 + query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 + query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 + query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 + query_params.append(('watch', local_var_params['watch'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1IngressList", + 401: None, + } + + return self.api_client.call_api( + '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def list_namespaced_network_policy(self, namespace, **kwargs): # noqa: E501 + """list_namespaced_network_policy # noqa: E501 + + list or watch objects of kind NetworkPolicy # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_namespaced_network_policy(namespace, async_req=True) + >>> result = thread.get() + + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1NetworkPolicyList + """ + kwargs['_return_http_data_only'] = True + return self.list_namespaced_network_policy_with_http_info(namespace, **kwargs) # noqa: E501 + + def list_namespaced_network_policy_with_http_info(self, namespace, **kwargs): # noqa: E501 + """list_namespaced_network_policy # noqa: E501 + + list or watch objects of kind NetworkPolicy # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_namespaced_network_policy_with_http_info(namespace, async_req=True) + >>> result = thread.get() + + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1NetworkPolicyList, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'namespace', + 'pretty', + 'allow_watch_bookmarks', + '_continue', + 'field_selector', + 'label_selector', + 'limit', + 'resource_version', + 'resource_version_match', + 'send_initial_events', + 'timeout_seconds', + 'watch' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_namespaced_network_policy" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_network_policy`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 + query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 + query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 + query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 + query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 + query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 + query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 + query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 + query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 + query_params.append(('watch', local_var_params['watch'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1NetworkPolicyList", + 401: None, + } + + return self.api_client.call_api( + '/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def list_network_policy_for_all_namespaces(self, **kwargs): # noqa: E501 + """list_network_policy_for_all_namespaces # noqa: E501 + + list or watch objects of kind NetworkPolicy # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_network_policy_for_all_namespaces(async_req=True) + >>> result = thread.get() + + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1NetworkPolicyList + """ + kwargs['_return_http_data_only'] = True + return self.list_network_policy_for_all_namespaces_with_http_info(**kwargs) # noqa: E501 + + def list_network_policy_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501 + """list_network_policy_for_all_namespaces # noqa: E501 + + list or watch objects of kind NetworkPolicy # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_network_policy_for_all_namespaces_with_http_info(async_req=True) + >>> result = thread.get() + + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1NetworkPolicyList, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'allow_watch_bookmarks', + '_continue', + 'field_selector', + 'label_selector', + 'limit', + 'pretty', + 'resource_version', + 'resource_version_match', + 'send_initial_events', + 'timeout_seconds', + 'watch' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_network_policy_for_all_namespaces" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 + query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 + query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 + query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 + query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 + query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 + query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 + query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 + query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 + query_params.append(('watch', local_var_params['watch'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1NetworkPolicyList", + 401: None, + } + + return self.api_client.call_api( + '/apis/networking.k8s.io/v1/networkpolicies', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def list_service_cidr(self, **kwargs): # noqa: E501 + """list_service_cidr # noqa: E501 + + list or watch objects of kind ServiceCIDR # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_service_cidr(async_req=True) + >>> result = thread.get() + + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1ServiceCIDRList + """ + kwargs['_return_http_data_only'] = True + return self.list_service_cidr_with_http_info(**kwargs) # noqa: E501 + + def list_service_cidr_with_http_info(self, **kwargs): # noqa: E501 + """list_service_cidr # noqa: E501 + + list or watch objects of kind ServiceCIDR # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_service_cidr_with_http_info(async_req=True) + >>> result = thread.get() + + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1ServiceCIDRList, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'pretty', + 'allow_watch_bookmarks', + '_continue', + 'field_selector', + 'label_selector', + 'limit', + 'resource_version', + 'resource_version_match', + 'send_initial_events', + 'timeout_seconds', + 'watch' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_service_cidr" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 + query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 + query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 + query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 + query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 + query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 + query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 + query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 + query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 + query_params.append(('watch', local_var_params['watch'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1ServiceCIDRList", + 401: None, + } + + return self.api_client.call_api( + '/apis/networking.k8s.io/v1/servicecidrs', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def patch_ingress_class(self, name, body, **kwargs): # noqa: E501 + """patch_ingress_class # noqa: E501 + + partially update the specified IngressClass # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_ingress_class(name, body, async_req=True) + >>> result = thread.get() + + :param name: name of the IngressClass (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1IngressClass + """ + kwargs['_return_http_data_only'] = True + return self.patch_ingress_class_with_http_info(name, body, **kwargs) # noqa: E501 + + def patch_ingress_class_with_http_info(self, name, body, **kwargs): # noqa: E501 + """patch_ingress_class # noqa: E501 + + partially update the specified IngressClass # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_ingress_class_with_http_info(name, body, async_req=True) + >>> result = thread.get() + + :param name: name of the IngressClass (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1IngressClass, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation', + 'force' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method patch_ingress_class" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `patch_ingress_class`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `patch_ingress_class`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 + query_params.append(('force', local_var_params['force'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # HTTP header `Content-Type` + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1IngressClass", + 201: "V1IngressClass", + 401: None, + } + + return self.api_client.call_api( + '/apis/networking.k8s.io/v1/ingressclasses/{name}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def patch_ip_address(self, name, body, **kwargs): # noqa: E501 + """patch_ip_address # noqa: E501 + + partially update the specified IPAddress # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_ip_address(name, body, async_req=True) + >>> result = thread.get() + + :param name: name of the IPAddress (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1IPAddress + """ + kwargs['_return_http_data_only'] = True + return self.patch_ip_address_with_http_info(name, body, **kwargs) # noqa: E501 + + def patch_ip_address_with_http_info(self, name, body, **kwargs): # noqa: E501 + """patch_ip_address # noqa: E501 + + partially update the specified IPAddress # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_ip_address_with_http_info(name, body, async_req=True) + >>> result = thread.get() + + :param name: name of the IPAddress (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1IPAddress, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation', + 'force' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method patch_ip_address" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `patch_ip_address`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `patch_ip_address`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 + query_params.append(('force', local_var_params['force'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # HTTP header `Content-Type` + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1IPAddress", + 201: "V1IPAddress", + 401: None, + } + + return self.api_client.call_api( + '/apis/networking.k8s.io/v1/ipaddresses/{name}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def patch_namespaced_ingress(self, name, namespace, body, **kwargs): # noqa: E501 + """patch_namespaced_ingress # noqa: E501 + + partially update the specified Ingress # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_namespaced_ingress(name, namespace, body, async_req=True) + >>> result = thread.get() + + :param name: name of the Ingress (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1Ingress + """ + kwargs['_return_http_data_only'] = True + return self.patch_namespaced_ingress_with_http_info(name, namespace, body, **kwargs) # noqa: E501 + + def patch_namespaced_ingress_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501 + """patch_namespaced_ingress # noqa: E501 + + partially update the specified Ingress # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_namespaced_ingress_with_http_info(name, namespace, body, async_req=True) + >>> result = thread.get() + + :param name: name of the Ingress (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1Ingress, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'namespace', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation', + 'force' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method patch_namespaced_ingress" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_ingress`") # noqa: E501 + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_ingress`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_ingress`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 + query_params.append(('force', local_var_params['force'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # HTTP header `Content-Type` + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1Ingress", + 201: "V1Ingress", + 401: None, + } + + return self.api_client.call_api( + '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def patch_namespaced_ingress_status(self, name, namespace, body, **kwargs): # noqa: E501 + """patch_namespaced_ingress_status # noqa: E501 + + partially update status of the specified Ingress # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_namespaced_ingress_status(name, namespace, body, async_req=True) + >>> result = thread.get() + + :param name: name of the Ingress (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1Ingress + """ + kwargs['_return_http_data_only'] = True + return self.patch_namespaced_ingress_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501 + + def patch_namespaced_ingress_status_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501 + """patch_namespaced_ingress_status # noqa: E501 + + partially update status of the specified Ingress # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_namespaced_ingress_status_with_http_info(name, namespace, body, async_req=True) + >>> result = thread.get() + + :param name: name of the Ingress (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1Ingress, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'namespace', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation', + 'force' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method patch_namespaced_ingress_status" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_ingress_status`") # noqa: E501 + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_ingress_status`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_ingress_status`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 + query_params.append(('force', local_var_params['force'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # HTTP header `Content-Type` + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1Ingress", + 201: "V1Ingress", + 401: None, + } + + return self.api_client.call_api( + '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}/status', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def patch_namespaced_network_policy(self, name, namespace, body, **kwargs): # noqa: E501 + """patch_namespaced_network_policy # noqa: E501 + + partially update the specified NetworkPolicy # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_namespaced_network_policy(name, namespace, body, async_req=True) + >>> result = thread.get() + + :param name: name of the NetworkPolicy (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1NetworkPolicy + """ + kwargs['_return_http_data_only'] = True + return self.patch_namespaced_network_policy_with_http_info(name, namespace, body, **kwargs) # noqa: E501 + + def patch_namespaced_network_policy_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501 + """patch_namespaced_network_policy # noqa: E501 + + partially update the specified NetworkPolicy # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_namespaced_network_policy_with_http_info(name, namespace, body, async_req=True) + >>> result = thread.get() + + :param name: name of the NetworkPolicy (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1NetworkPolicy, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'namespace', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation', + 'force' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method patch_namespaced_network_policy" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_network_policy`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_ingress`") # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_network_policy`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_network_policy`") # noqa: E501 collection_formats = {} path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 if 'namespace' in local_var_params: path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 - query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 - query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 - query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 - query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 - query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 - query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 - query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 - query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 - query_params.append(('watch', local_var_params['watch'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 + query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # HTTP header `Content-Type` + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1NetworkPolicy", + 201: "V1NetworkPolicy", + 401: None, + } + return self.api_client.call_api( - '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses', 'GET', + '/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1IngressList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) - def list_namespaced_network_policy(self, namespace, **kwargs): # noqa: E501 - """list_namespaced_network_policy # noqa: E501 + def patch_service_cidr(self, name, body, **kwargs): # noqa: E501 + """patch_service_cidr # noqa: E501 - list or watch objects of kind NetworkPolicy # noqa: E501 + partially update the specified ServiceCIDR # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_namespaced_network_policy(namespace, async_req=True) + + >>> thread = api.patch_service_cidr(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param name: name of the ServiceCIDR (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1NetworkPolicyList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ServiceCIDR """ kwargs['_return_http_data_only'] = True - return self.list_namespaced_network_policy_with_http_info(namespace, **kwargs) # noqa: E501 + return self.patch_service_cidr_with_http_info(name, body, **kwargs) # noqa: E501 + + def patch_service_cidr_with_http_info(self, name, body, **kwargs): # noqa: E501 + """patch_service_cidr # noqa: E501 + + partially update the specified ServiceCIDR # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_service_cidr_with_http_info(name, body, async_req=True) + >>> result = thread.get() + + :param name: name of the ServiceCIDR (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1ServiceCIDR, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation', + 'force' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method patch_service_cidr" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `patch_service_cidr`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `patch_service_cidr`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 + query_params.append(('force', local_var_params['force'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # HTTP header `Content-Type` + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1ServiceCIDR", + 201: "V1ServiceCIDR", + 401: None, + } + + return self.api_client.call_api( + '/apis/networking.k8s.io/v1/servicecidrs/{name}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def patch_service_cidr_status(self, name, body, **kwargs): # noqa: E501 + """patch_service_cidr_status # noqa: E501 + + partially update status of the specified ServiceCIDR # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_service_cidr_status(name, body, async_req=True) + >>> result = thread.get() + + :param name: name of the ServiceCIDR (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1ServiceCIDR + """ + kwargs['_return_http_data_only'] = True + return self.patch_service_cidr_status_with_http_info(name, body, **kwargs) # noqa: E501 + + def patch_service_cidr_status_with_http_info(self, name, body, **kwargs): # noqa: E501 + """patch_service_cidr_status # noqa: E501 + + partially update status of the specified ServiceCIDR # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_service_cidr_status_with_http_info(name, body, async_req=True) + >>> result = thread.get() + + :param name: name of the ServiceCIDR (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1ServiceCIDR, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation', + 'force' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method patch_service_cidr_status" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `patch_service_cidr_status`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `patch_service_cidr_status`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 + query_params.append(('force', local_var_params['force'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # HTTP header `Content-Type` + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1ServiceCIDR", + 201: "V1ServiceCIDR", + 401: None, + } + + return self.api_client.call_api( + '/apis/networking.k8s.io/v1/servicecidrs/{name}/status', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def read_ingress_class(self, name, **kwargs): # noqa: E501 + """read_ingress_class # noqa: E501 + + read the specified IngressClass # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.read_ingress_class(name, async_req=True) + >>> result = thread.get() + + :param name: name of the IngressClass (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1IngressClass + """ + kwargs['_return_http_data_only'] = True + return self.read_ingress_class_with_http_info(name, **kwargs) # noqa: E501 - def list_namespaced_network_policy_with_http_info(self, namespace, **kwargs): # noqa: E501 - """list_namespaced_network_policy # noqa: E501 + def read_ingress_class_with_http_info(self, name, **kwargs): # noqa: E501 + """read_ingress_class # noqa: E501 - list or watch objects of kind NetworkPolicy # noqa: E501 + read the specified IngressClass # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_namespaced_network_policy_with_http_info(namespace, async_req=True) + + >>> thread = api.read_ingress_class_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param name: name of the IngressClass (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1NetworkPolicyList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1IngressClass, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ - 'namespace', - 'pretty', - 'allow_watch_bookmarks', - '_continue', - 'field_selector', - 'label_selector', - 'limit', - 'resource_version', - 'resource_version_match', - 'send_initial_events', - 'timeout_seconds', - 'watch' + 'name', + 'pretty' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2144,46 +6090,25 @@ def list_namespaced_network_policy_with_http_info(self, namespace, **kwargs): # if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method list_namespaced_network_policy" % key + " to method read_ingress_class" % key ) local_var_params[key] = val del local_var_params['kwargs'] - # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_network_policy`") # noqa: E501 + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `read_ingress_class`") # noqa: E501 collection_formats = {} path_params = {} - if 'namespace' in local_var_params: - path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 - query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 - query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 - query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 - query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 - query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 - query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 - query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 - query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 - query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2191,118 +6116,118 @@ def list_namespaced_network_policy_with_http_info(self, namespace, **kwargs): # body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1IngressClass", + 401: None, + } + return self.api_client.call_api( - '/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies', 'GET', + '/apis/networking.k8s.io/v1/ingressclasses/{name}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1NetworkPolicyList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) - def list_network_policy_for_all_namespaces(self, **kwargs): # noqa: E501 - """list_network_policy_for_all_namespaces # noqa: E501 + def read_ip_address(self, name, **kwargs): # noqa: E501 + """read_ip_address # noqa: E501 - list or watch objects of kind NetworkPolicy # noqa: E501 + read the specified IPAddress # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_network_policy_for_all_namespaces(async_req=True) + + >>> thread = api.read_ip_address(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param name: name of the IPAddress (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1NetworkPolicyList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1IPAddress """ kwargs['_return_http_data_only'] = True - return self.list_network_policy_for_all_namespaces_with_http_info(**kwargs) # noqa: E501 + return self.read_ip_address_with_http_info(name, **kwargs) # noqa: E501 - def list_network_policy_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501 - """list_network_policy_for_all_namespaces # noqa: E501 + def read_ip_address_with_http_info(self, name, **kwargs): # noqa: E501 + """read_ip_address # noqa: E501 - list or watch objects of kind NetworkPolicy # noqa: E501 + read the specified IPAddress # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_network_policy_for_all_namespaces_with_http_info(async_req=True) + + >>> thread = api.read_ip_address_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param name: name of the IPAddress (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1NetworkPolicyList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1IPAddress, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ - 'allow_watch_bookmarks', - '_continue', - 'field_selector', - 'label_selector', - 'limit', - 'pretty', - 'resource_version', - 'resource_version_match', - 'send_initial_events', - 'timeout_seconds', - 'watch' + 'name', + 'pretty' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2310,40 +6235,25 @@ def list_network_policy_for_all_namespaces_with_http_info(self, **kwargs): # no if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method list_network_policy_for_all_namespaces" % key + " to method read_ip_address" % key ) local_var_params[key] = val del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `read_ip_address`") # noqa: E501 collection_formats = {} path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 - query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 - query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 - query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 - query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 - query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 - query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 - query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 - query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 - query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2351,106 +6261,123 @@ def list_network_policy_for_all_namespaces_with_http_info(self, **kwargs): # no body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1IPAddress", + 401: None, + } + return self.api_client.call_api( - '/apis/networking.k8s.io/v1/networkpolicies', 'GET', + '/apis/networking.k8s.io/v1/ipaddresses/{name}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1NetworkPolicyList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) - def patch_ingress_class(self, name, body, **kwargs): # noqa: E501 - """patch_ingress_class # noqa: E501 + def read_namespaced_ingress(self, name, namespace, **kwargs): # noqa: E501 + """read_namespaced_ingress # noqa: E501 - partially update the specified IngressClass # noqa: E501 + read the specified Ingress # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_ingress_class(name, body, async_req=True) + + >>> thread = api.read_namespaced_ingress(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the IngressClass (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the Ingress (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1IngressClass + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Ingress """ kwargs['_return_http_data_only'] = True - return self.patch_ingress_class_with_http_info(name, body, **kwargs) # noqa: E501 + return self.read_namespaced_ingress_with_http_info(name, namespace, **kwargs) # noqa: E501 - def patch_ingress_class_with_http_info(self, name, body, **kwargs): # noqa: E501 - """patch_ingress_class # noqa: E501 + def read_namespaced_ingress_with_http_info(self, name, namespace, **kwargs): # noqa: E501 + """read_namespaced_ingress # noqa: E501 - partially update the specified IngressClass # noqa: E501 + read the specified Ingress # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_ingress_class_with_http_info(name, body, async_req=True) + + >>> thread = api.read_namespaced_ingress_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the IngressClass (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the Ingress (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1IngressClass, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Ingress, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'name', - 'body', - 'pretty', - 'dry_run', - 'field_manager', - 'field_validation', - 'force' + 'namespace', + 'pretty' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2458,134 +6385,136 @@ def patch_ingress_class_with_http_info(self, name, body, **kwargs): # noqa: E50 if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method patch_ingress_class" % key + " to method read_namespaced_ingress" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `patch_ingress_class`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `patch_ingress_class`") # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_ingress`") # noqa: E501 + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_ingress`") # noqa: E501 collection_formats = {} path_params = {} if 'name' in local_var_params: path_params['name'] = local_var_params['name'] # noqa: E501 + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 - query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 - query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 - query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Ingress", + 401: None, + } + return self.api_client.call_api( - '/apis/networking.k8s.io/v1/ingressclasses/{name}', 'PATCH', + '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1IngressClass', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) - def patch_namespaced_ingress(self, name, namespace, body, **kwargs): # noqa: E501 - """patch_namespaced_ingress # noqa: E501 + def read_namespaced_ingress_status(self, name, namespace, **kwargs): # noqa: E501 + """read_namespaced_ingress_status # noqa: E501 - partially update the specified Ingress # noqa: E501 + read status of the specified Ingress # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_namespaced_ingress(name, namespace, body, async_req=True) + + >>> thread = api.read_namespaced_ingress_status(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Ingress (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the Ingress (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Ingress + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Ingress """ kwargs['_return_http_data_only'] = True - return self.patch_namespaced_ingress_with_http_info(name, namespace, body, **kwargs) # noqa: E501 + return self.read_namespaced_ingress_status_with_http_info(name, namespace, **kwargs) # noqa: E501 - def patch_namespaced_ingress_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501 - """patch_namespaced_ingress # noqa: E501 + def read_namespaced_ingress_status_with_http_info(self, name, namespace, **kwargs): # noqa: E501 + """read_namespaced_ingress_status # noqa: E501 - partially update the specified Ingress # noqa: E501 + read status of the specified Ingress # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_namespaced_ingress_with_http_info(name, namespace, body, async_req=True) + + >>> thread = api.read_namespaced_ingress_status_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Ingress (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the Ingress (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Ingress, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Ingress, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -2593,19 +6522,17 @@ def patch_namespaced_ingress_with_http_info(self, name, namespace, body, **kwarg all_params = [ 'name', 'namespace', - 'body', - 'pretty', - 'dry_run', - 'field_manager', - 'field_validation', - 'force' + 'pretty' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2613,22 +6540,16 @@ def patch_namespaced_ingress_with_http_info(self, name, namespace, body, **kwarg if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method patch_namespaced_ingress" % key + " to method read_namespaced_ingress_status" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_ingress`") # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_ingress_status`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_ingress`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_ingress`") # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_ingress_status`") # noqa: E501 collection_formats = {} @@ -2639,114 +6560,116 @@ def patch_namespaced_ingress_with_http_info(self, name, namespace, body, **kwarg path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 - query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 - query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 - query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Ingress", + 401: None, + } + return self.api_client.call_api( - '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}', 'PATCH', + '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}/status', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Ingress', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) - def patch_namespaced_ingress_status(self, name, namespace, body, **kwargs): # noqa: E501 - """patch_namespaced_ingress_status # noqa: E501 + def read_namespaced_network_policy(self, name, namespace, **kwargs): # noqa: E501 + """read_namespaced_network_policy # noqa: E501 - partially update status of the specified Ingress # noqa: E501 + read the specified NetworkPolicy # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_namespaced_ingress_status(name, namespace, body, async_req=True) + + >>> thread = api.read_namespaced_network_policy(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Ingress (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the NetworkPolicy (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Ingress + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1NetworkPolicy """ kwargs['_return_http_data_only'] = True - return self.patch_namespaced_ingress_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501 + return self.read_namespaced_network_policy_with_http_info(name, namespace, **kwargs) # noqa: E501 - def patch_namespaced_ingress_status_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501 - """patch_namespaced_ingress_status # noqa: E501 + def read_namespaced_network_policy_with_http_info(self, name, namespace, **kwargs): # noqa: E501 + """read_namespaced_network_policy # noqa: E501 - partially update status of the specified Ingress # noqa: E501 + read the specified NetworkPolicy # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_namespaced_ingress_status_with_http_info(name, namespace, body, async_req=True) + + >>> thread = api.read_namespaced_network_policy_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Ingress (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the NetworkPolicy (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Ingress, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1NetworkPolicy, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -2754,19 +6677,17 @@ def patch_namespaced_ingress_status_with_http_info(self, name, namespace, body, all_params = [ 'name', 'namespace', - 'body', - 'pretty', - 'dry_run', - 'field_manager', - 'field_validation', - 'force' + 'pretty' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2774,22 +6695,16 @@ def patch_namespaced_ingress_status_with_http_info(self, name, namespace, body, if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method patch_namespaced_ingress_status" % key + " to method read_namespaced_network_policy" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_ingress_status`") # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_network_policy`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_ingress_status`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_ingress_status`") # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_network_policy`") # noqa: E501 collection_formats = {} @@ -2800,134 +6715,129 @@ def patch_namespaced_ingress_status_with_http_info(self, name, namespace, body, path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 - query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 - query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 - query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1NetworkPolicy", + 401: None, + } + return self.api_client.call_api( - '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}/status', 'PATCH', + '/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Ingress', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) - def patch_namespaced_network_policy(self, name, namespace, body, **kwargs): # noqa: E501 - """patch_namespaced_network_policy # noqa: E501 + def read_service_cidr(self, name, **kwargs): # noqa: E501 + """read_service_cidr # noqa: E501 - partially update the specified NetworkPolicy # noqa: E501 + read the specified ServiceCIDR # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_namespaced_network_policy(name, namespace, body, async_req=True) + + >>> thread = api.read_service_cidr(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the NetworkPolicy (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the ServiceCIDR (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1NetworkPolicy + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ServiceCIDR """ kwargs['_return_http_data_only'] = True - return self.patch_namespaced_network_policy_with_http_info(name, namespace, body, **kwargs) # noqa: E501 + return self.read_service_cidr_with_http_info(name, **kwargs) # noqa: E501 - def patch_namespaced_network_policy_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501 - """patch_namespaced_network_policy # noqa: E501 + def read_service_cidr_with_http_info(self, name, **kwargs): # noqa: E501 + """read_service_cidr # noqa: E501 - partially update the specified NetworkPolicy # noqa: E501 + read the specified ServiceCIDR # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_namespaced_network_policy_with_http_info(name, namespace, body, async_req=True) + + >>> thread = api.read_service_cidr_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the NetworkPolicy (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the ServiceCIDR (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1NetworkPolicy, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ServiceCIDR, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'name', - 'namespace', - 'body', - 'pretty', - 'dry_run', - 'field_manager', - 'field_validation', - 'force' + 'pretty' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2935,128 +6845,127 @@ def patch_namespaced_network_policy_with_http_info(self, name, namespace, body, if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method patch_namespaced_network_policy" % key + " to method read_service_cidr" % key ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_network_policy`") # noqa: E501 - # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_network_policy`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_network_policy`") # noqa: E501 + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `read_service_cidr`") # noqa: E501 collection_formats = {} path_params = {} if 'name' in local_var_params: path_params['name'] = local_var_params['name'] # noqa: E501 - if 'namespace' in local_var_params: - path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 - query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 - query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 - query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ServiceCIDR", + 401: None, + } + return self.api_client.call_api( - '/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}', 'PATCH', + '/apis/networking.k8s.io/v1/servicecidrs/{name}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1NetworkPolicy', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) - def read_ingress_class(self, name, **kwargs): # noqa: E501 - """read_ingress_class # noqa: E501 + def read_service_cidr_status(self, name, **kwargs): # noqa: E501 + """read_service_cidr_status # noqa: E501 - read the specified IngressClass # noqa: E501 + read status of the specified ServiceCIDR # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.read_ingress_class(name, async_req=True) + + >>> thread = api.read_service_cidr_status(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the IngressClass (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the ServiceCIDR (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1IngressClass + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ServiceCIDR """ kwargs['_return_http_data_only'] = True - return self.read_ingress_class_with_http_info(name, **kwargs) # noqa: E501 + return self.read_service_cidr_status_with_http_info(name, **kwargs) # noqa: E501 - def read_ingress_class_with_http_info(self, name, **kwargs): # noqa: E501 - """read_ingress_class # noqa: E501 + def read_service_cidr_status_with_http_info(self, name, **kwargs): # noqa: E501 + """read_service_cidr_status # noqa: E501 - read the specified IngressClass # noqa: E501 + read status of the specified ServiceCIDR # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.read_ingress_class_with_http_info(name, async_req=True) + + >>> thread = api.read_service_cidr_status_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the IngressClass (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the ServiceCIDR (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1IngressClass, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ServiceCIDR, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -3070,7 +6979,10 @@ def read_ingress_class_with_http_info(self, name, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -3078,14 +6990,13 @@ def read_ingress_class_with_http_info(self, name, **kwargs): # noqa: E501 if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method read_ingress_class" % key + " to method read_service_cidr_status" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `read_ingress_class`") # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `read_service_cidr_status`") # noqa: E501 collection_formats = {} @@ -3094,10 +7005,10 @@ def read_ingress_class_with_http_info(self, name, **kwargs): # noqa: E501 path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -3105,94 +7016,138 @@ def read_ingress_class_with_http_info(self, name, **kwargs): # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ServiceCIDR", + 401: None, + } + return self.api_client.call_api( - '/apis/networking.k8s.io/v1/ingressclasses/{name}', 'GET', + '/apis/networking.k8s.io/v1/servicecidrs/{name}/status', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1IngressClass', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) - def read_namespaced_ingress(self, name, namespace, **kwargs): # noqa: E501 - """read_namespaced_ingress # noqa: E501 + def replace_ingress_class(self, name, body, **kwargs): # noqa: E501 + """replace_ingress_class # noqa: E501 - read the specified Ingress # noqa: E501 + replace the specified IngressClass # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.read_namespaced_ingress(name, namespace, async_req=True) + + >>> thread = api.replace_ingress_class(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Ingress (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the IngressClass (required) + :type name: str + :param body: (required) + :type body: V1IngressClass + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Ingress + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1IngressClass """ kwargs['_return_http_data_only'] = True - return self.read_namespaced_ingress_with_http_info(name, namespace, **kwargs) # noqa: E501 + return self.replace_ingress_class_with_http_info(name, body, **kwargs) # noqa: E501 - def read_namespaced_ingress_with_http_info(self, name, namespace, **kwargs): # noqa: E501 - """read_namespaced_ingress # noqa: E501 + def replace_ingress_class_with_http_info(self, name, body, **kwargs): # noqa: E501 + """replace_ingress_class # noqa: E501 - read the specified Ingress # noqa: E501 + replace the specified IngressClass # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.read_namespaced_ingress_with_http_info(name, namespace, async_req=True) + + >>> thread = api.replace_ingress_class_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Ingress (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the IngressClass (required) + :type name: str + :param body: (required) + :type body: V1IngressClass + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Ingress, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1IngressClass, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'name', - 'namespace', - 'pretty' + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -3200,127 +7155,176 @@ def read_namespaced_ingress_with_http_info(self, name, namespace, **kwargs): # if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method read_namespaced_ingress" % key + " to method replace_ingress_class" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_ingress`") # noqa: E501 - # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_ingress`") # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `replace_ingress_class`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `replace_ingress_class`") # noqa: E501 collection_formats = {} path_params = {} if 'name' in local_var_params: path_params['name'] = local_var_params['name'] # noqa: E501 - if 'namespace' in local_var_params: - path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1IngressClass", + 201: "V1IngressClass", + 401: None, + } + return self.api_client.call_api( - '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}', 'GET', + '/apis/networking.k8s.io/v1/ingressclasses/{name}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Ingress', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) - def read_namespaced_ingress_status(self, name, namespace, **kwargs): # noqa: E501 - """read_namespaced_ingress_status # noqa: E501 + def replace_ip_address(self, name, body, **kwargs): # noqa: E501 + """replace_ip_address # noqa: E501 - read status of the specified Ingress # noqa: E501 + replace the specified IPAddress # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.read_namespaced_ingress_status(name, namespace, async_req=True) + + >>> thread = api.replace_ip_address(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Ingress (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the IPAddress (required) + :type name: str + :param body: (required) + :type body: V1IPAddress + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Ingress + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1IPAddress """ kwargs['_return_http_data_only'] = True - return self.read_namespaced_ingress_status_with_http_info(name, namespace, **kwargs) # noqa: E501 + return self.replace_ip_address_with_http_info(name, body, **kwargs) # noqa: E501 - def read_namespaced_ingress_status_with_http_info(self, name, namespace, **kwargs): # noqa: E501 - """read_namespaced_ingress_status # noqa: E501 + def replace_ip_address_with_http_info(self, name, body, **kwargs): # noqa: E501 + """replace_ip_address # noqa: E501 - read status of the specified Ingress # noqa: E501 + replace the specified IPAddress # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.read_namespaced_ingress_status_with_http_info(name, namespace, async_req=True) + + >>> thread = api.replace_ip_address_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Ingress (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the IPAddress (required) + :type name: str + :param body: (required) + :type body: V1IPAddress + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Ingress, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1IPAddress, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'name', - 'namespace', - 'pretty' + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -3328,112 +7332,159 @@ def read_namespaced_ingress_status_with_http_info(self, name, namespace, **kwarg if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method read_namespaced_ingress_status" % key + " to method replace_ip_address" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_ingress_status`") # noqa: E501 - # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_ingress_status`") # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `replace_ip_address`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `replace_ip_address`") # noqa: E501 collection_formats = {} path_params = {} if 'name' in local_var_params: path_params['name'] = local_var_params['name'] # noqa: E501 - if 'namespace' in local_var_params: - path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1IPAddress", + 201: "V1IPAddress", + 401: None, + } + return self.api_client.call_api( - '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}/status', 'GET', + '/apis/networking.k8s.io/v1/ipaddresses/{name}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Ingress', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) - def read_namespaced_network_policy(self, name, namespace, **kwargs): # noqa: E501 - """read_namespaced_network_policy # noqa: E501 + def replace_namespaced_ingress(self, name, namespace, body, **kwargs): # noqa: E501 + """replace_namespaced_ingress # noqa: E501 - read the specified NetworkPolicy # noqa: E501 + replace the specified Ingress # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.read_namespaced_network_policy(name, namespace, async_req=True) + + >>> thread = api.replace_namespaced_ingress(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the NetworkPolicy (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the Ingress (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1Ingress + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1NetworkPolicy + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Ingress """ kwargs['_return_http_data_only'] = True - return self.read_namespaced_network_policy_with_http_info(name, namespace, **kwargs) # noqa: E501 + return self.replace_namespaced_ingress_with_http_info(name, namespace, body, **kwargs) # noqa: E501 - def read_namespaced_network_policy_with_http_info(self, name, namespace, **kwargs): # noqa: E501 - """read_namespaced_network_policy # noqa: E501 + def replace_namespaced_ingress_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501 + """replace_namespaced_ingress # noqa: E501 - read the specified NetworkPolicy # noqa: E501 + replace the specified Ingress # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.read_namespaced_network_policy_with_http_info(name, namespace, async_req=True) + + >>> thread = api.replace_namespaced_ingress_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the NetworkPolicy (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the Ingress (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1Ingress + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1NetworkPolicy, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Ingress, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -3441,14 +7492,21 @@ def read_namespaced_network_policy_with_http_info(self, name, namespace, **kwarg all_params = [ 'name', 'namespace', - 'pretty' + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -3456,18 +7514,19 @@ def read_namespaced_network_policy_with_http_info(self, name, namespace, **kwarg if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method read_namespaced_network_policy" % key + " to method replace_namespaced_ingress" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_network_policy`") # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_ingress`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_network_policy`") # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_ingress`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_ingress`") # noqa: E501 collection_formats = {} @@ -3478,102 +7537,148 @@ def read_namespaced_network_policy_with_http_info(self, name, namespace, **kwarg path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Ingress", + 201: "V1Ingress", + 401: None, + } + return self.api_client.call_api( - '/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}', 'GET', + '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1NetworkPolicy', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) - def replace_ingress_class(self, name, body, **kwargs): # noqa: E501 - """replace_ingress_class # noqa: E501 + def replace_namespaced_ingress_status(self, name, namespace, body, **kwargs): # noqa: E501 + """replace_namespaced_ingress_status # noqa: E501 - replace the specified IngressClass # noqa: E501 + replace status of the specified Ingress # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.replace_ingress_class(name, body, async_req=True) + + >>> thread = api.replace_namespaced_ingress_status(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the IngressClass (required) - :param V1IngressClass body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the Ingress (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1Ingress + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1IngressClass + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Ingress """ kwargs['_return_http_data_only'] = True - return self.replace_ingress_class_with_http_info(name, body, **kwargs) # noqa: E501 + return self.replace_namespaced_ingress_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501 - def replace_ingress_class_with_http_info(self, name, body, **kwargs): # noqa: E501 - """replace_ingress_class # noqa: E501 + def replace_namespaced_ingress_status_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501 + """replace_namespaced_ingress_status # noqa: E501 - replace the specified IngressClass # noqa: E501 + replace status of the specified Ingress # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.replace_ingress_class_with_http_info(name, body, async_req=True) + + >>> thread = api.replace_namespaced_ingress_status_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the IngressClass (required) - :param V1IngressClass body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the Ingress (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1Ingress + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1IngressClass, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Ingress, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'name', + 'namespace', 'body', 'pretty', 'dry_run', @@ -3585,7 +7690,10 @@ def replace_ingress_class_with_http_info(self, name, body, **kwargs): # noqa: E 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -3593,36 +7701,39 @@ def replace_ingress_class_with_http_info(self, name, body, **kwargs): # noqa: E if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method replace_ingress_class" % key + " to method replace_namespaced_ingress_status" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `replace_ingress_class`") # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_ingress_status`") # noqa: E501 + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_ingress_status`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `replace_ingress_class`") # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_ingress_status`") # noqa: E501 collection_formats = {} path_params = {} if 'name' in local_var_params: path_params['name'] = local_var_params['name'] # noqa: E501 + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -3632,87 +7743,122 @@ def replace_ingress_class_with_http_info(self, name, body, **kwargs): # noqa: E body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Ingress", + 201: "V1Ingress", + 401: None, + } + return self.api_client.call_api( - '/apis/networking.k8s.io/v1/ingressclasses/{name}', 'PUT', + '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}/status', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1IngressClass', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) - def replace_namespaced_ingress(self, name, namespace, body, **kwargs): # noqa: E501 - """replace_namespaced_ingress # noqa: E501 + def replace_namespaced_network_policy(self, name, namespace, body, **kwargs): # noqa: E501 + """replace_namespaced_network_policy # noqa: E501 - replace the specified Ingress # noqa: E501 + replace the specified NetworkPolicy # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.replace_namespaced_ingress(name, namespace, body, async_req=True) + + >>> thread = api.replace_namespaced_network_policy(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Ingress (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1Ingress body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the NetworkPolicy (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1NetworkPolicy + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Ingress + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1NetworkPolicy """ kwargs['_return_http_data_only'] = True - return self.replace_namespaced_ingress_with_http_info(name, namespace, body, **kwargs) # noqa: E501 + return self.replace_namespaced_network_policy_with_http_info(name, namespace, body, **kwargs) # noqa: E501 - def replace_namespaced_ingress_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501 - """replace_namespaced_ingress # noqa: E501 + def replace_namespaced_network_policy_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501 + """replace_namespaced_network_policy # noqa: E501 - replace the specified Ingress # noqa: E501 + replace the specified NetworkPolicy # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.replace_namespaced_ingress_with_http_info(name, namespace, body, async_req=True) + + >>> thread = api.replace_namespaced_network_policy_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Ingress (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1Ingress body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the NetworkPolicy (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1NetworkPolicy + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Ingress, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1NetworkPolicy, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -3731,7 +7877,10 @@ def replace_namespaced_ingress_with_http_info(self, name, namespace, body, **kwa 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -3739,22 +7888,19 @@ def replace_namespaced_ingress_with_http_info(self, name, namespace, body, **kwa if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method replace_namespaced_ingress" % key + " to method replace_namespaced_network_policy" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_ingress`") # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_network_policy`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_ingress`") # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_network_policy`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_ingress`") # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_network_policy`") # noqa: E501 collection_formats = {} @@ -3765,16 +7911,16 @@ def replace_namespaced_ingress_with_http_info(self, name, namespace, body, **kwa path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -3784,94 +7930,124 @@ def replace_namespaced_ingress_with_http_info(self, name, namespace, body, **kwa body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1NetworkPolicy", + 201: "V1NetworkPolicy", + 401: None, + } + return self.api_client.call_api( - '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}', 'PUT', + '/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Ingress', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) - def replace_namespaced_ingress_status(self, name, namespace, body, **kwargs): # noqa: E501 - """replace_namespaced_ingress_status # noqa: E501 + def replace_service_cidr(self, name, body, **kwargs): # noqa: E501 + """replace_service_cidr # noqa: E501 - replace status of the specified Ingress # noqa: E501 + replace the specified ServiceCIDR # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.replace_namespaced_ingress_status(name, namespace, body, async_req=True) + + >>> thread = api.replace_service_cidr(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Ingress (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1Ingress body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the ServiceCIDR (required) + :type name: str + :param body: (required) + :type body: V1ServiceCIDR + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Ingress + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ServiceCIDR """ kwargs['_return_http_data_only'] = True - return self.replace_namespaced_ingress_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501 + return self.replace_service_cidr_with_http_info(name, body, **kwargs) # noqa: E501 - def replace_namespaced_ingress_status_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501 - """replace_namespaced_ingress_status # noqa: E501 + def replace_service_cidr_with_http_info(self, name, body, **kwargs): # noqa: E501 + """replace_service_cidr # noqa: E501 - replace status of the specified Ingress # noqa: E501 + replace the specified ServiceCIDR # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.replace_namespaced_ingress_status_with_http_info(name, namespace, body, async_req=True) + + >>> thread = api.replace_service_cidr_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Ingress (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1Ingress body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the ServiceCIDR (required) + :type name: str + :param body: (required) + :type body: V1ServiceCIDR + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Ingress, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ServiceCIDR, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'name', - 'namespace', 'body', 'pretty', 'dry_run', @@ -3883,7 +8059,10 @@ def replace_namespaced_ingress_status_with_http_info(self, name, namespace, body 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -3891,42 +8070,34 @@ def replace_namespaced_ingress_status_with_http_info(self, name, namespace, body if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method replace_namespaced_ingress_status" % key + " to method replace_service_cidr" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_ingress_status`") # noqa: E501 - # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_ingress_status`") # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `replace_service_cidr`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_ingress_status`") # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `replace_service_cidr`") # noqa: E501 collection_formats = {} path_params = {} if 'name' in local_var_params: path_params['name'] = local_var_params['name'] # noqa: E501 - if 'namespace' in local_var_params: - path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -3936,94 +8107,124 @@ def replace_namespaced_ingress_status_with_http_info(self, name, namespace, body body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ServiceCIDR", + 201: "V1ServiceCIDR", + 401: None, + } + return self.api_client.call_api( - '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}/status', 'PUT', + '/apis/networking.k8s.io/v1/servicecidrs/{name}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Ingress', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) - def replace_namespaced_network_policy(self, name, namespace, body, **kwargs): # noqa: E501 - """replace_namespaced_network_policy # noqa: E501 + def replace_service_cidr_status(self, name, body, **kwargs): # noqa: E501 + """replace_service_cidr_status # noqa: E501 - replace the specified NetworkPolicy # noqa: E501 + replace status of the specified ServiceCIDR # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.replace_namespaced_network_policy(name, namespace, body, async_req=True) + + >>> thread = api.replace_service_cidr_status(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the NetworkPolicy (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1NetworkPolicy body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the ServiceCIDR (required) + :type name: str + :param body: (required) + :type body: V1ServiceCIDR + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1NetworkPolicy + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ServiceCIDR """ kwargs['_return_http_data_only'] = True - return self.replace_namespaced_network_policy_with_http_info(name, namespace, body, **kwargs) # noqa: E501 + return self.replace_service_cidr_status_with_http_info(name, body, **kwargs) # noqa: E501 - def replace_namespaced_network_policy_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501 - """replace_namespaced_network_policy # noqa: E501 + def replace_service_cidr_status_with_http_info(self, name, body, **kwargs): # noqa: E501 + """replace_service_cidr_status # noqa: E501 - replace the specified NetworkPolicy # noqa: E501 + replace status of the specified ServiceCIDR # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.replace_namespaced_network_policy_with_http_info(name, namespace, body, async_req=True) + + >>> thread = api.replace_service_cidr_status_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the NetworkPolicy (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1NetworkPolicy body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the ServiceCIDR (required) + :type name: str + :param body: (required) + :type body: V1ServiceCIDR + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1NetworkPolicy, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ServiceCIDR, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'name', - 'namespace', 'body', 'pretty', 'dry_run', @@ -4035,7 +8236,10 @@ def replace_namespaced_network_policy_with_http_info(self, name, namespace, body 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -4043,42 +8247,34 @@ def replace_namespaced_network_policy_with_http_info(self, name, namespace, body if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method replace_namespaced_network_policy" % key + " to method replace_service_cidr_status" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_network_policy`") # noqa: E501 - # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_network_policy`") # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `replace_service_cidr_status`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_network_policy`") # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `replace_service_cidr_status`") # noqa: E501 collection_formats = {} path_params = {} if 'name' in local_var_params: path_params['name'] = local_var_params['name'] # noqa: E501 - if 'namespace' in local_var_params: - path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -4088,23 +8284,30 @@ def replace_namespaced_network_policy_with_http_info(self, name, namespace, body body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ServiceCIDR", + 201: "V1ServiceCIDR", + 401: None, + } + return self.api_client.call_api( - '/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}', 'PUT', + '/apis/networking.k8s.io/v1/servicecidrs/{name}/status', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1NetworkPolicy', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) diff --git a/kubernetes/client/api/networking_v1alpha1_api.py b/kubernetes/client/api/networking_v1alpha1_api.py deleted file mode 100644 index be2ffd7840..0000000000 --- a/kubernetes/client/api/networking_v1alpha1_api.py +++ /dev/null @@ -1,2610 +0,0 @@ -# coding: utf-8 - -""" - Kubernetes - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - - The version of the OpenAPI document: release-1.30 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from kubernetes.client.api_client import ApiClient -from kubernetes.client.exceptions import ( # noqa: F401 - ApiTypeError, - ApiValueError -) - - -class NetworkingV1alpha1Api(object): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def create_ip_address(self, body, **kwargs): # noqa: E501 - """create_ip_address # noqa: E501 - - create an IPAddress # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_ip_address(body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param V1alpha1IPAddress body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha1IPAddress - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.create_ip_address_with_http_info(body, **kwargs) # noqa: E501 - - def create_ip_address_with_http_info(self, body, **kwargs): # noqa: E501 - """create_ip_address # noqa: E501 - - create an IPAddress # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_ip_address_with_http_info(body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param V1alpha1IPAddress body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha1IPAddress, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'body', - 'pretty', - 'dry_run', - 'field_manager', - 'field_validation' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method create_ip_address" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `create_ip_address`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 - query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 - query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/networking.k8s.io/v1alpha1/ipaddresses', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha1IPAddress', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def create_service_cidr(self, body, **kwargs): # noqa: E501 - """create_service_cidr # noqa: E501 - - create a ServiceCIDR # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_service_cidr(body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param V1alpha1ServiceCIDR body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha1ServiceCIDR - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.create_service_cidr_with_http_info(body, **kwargs) # noqa: E501 - - def create_service_cidr_with_http_info(self, body, **kwargs): # noqa: E501 - """create_service_cidr # noqa: E501 - - create a ServiceCIDR # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_service_cidr_with_http_info(body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param V1alpha1ServiceCIDR body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha1ServiceCIDR, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'body', - 'pretty', - 'dry_run', - 'field_manager', - 'field_validation' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method create_service_cidr" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `create_service_cidr`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 - query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 - query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/networking.k8s.io/v1alpha1/servicecidrs', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha1ServiceCIDR', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def delete_collection_ip_address(self, **kwargs): # noqa: E501 - """delete_collection_ip_address # noqa: E501 - - delete collection of IPAddress # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_collection_ip_address(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1Status - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.delete_collection_ip_address_with_http_info(**kwargs) # noqa: E501 - - def delete_collection_ip_address_with_http_info(self, **kwargs): # noqa: E501 - """delete_collection_ip_address # noqa: E501 - - delete collection of IPAddress # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_collection_ip_address_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'pretty', - '_continue', - 'dry_run', - 'field_selector', - 'grace_period_seconds', - 'label_selector', - 'limit', - 'orphan_dependents', - 'propagation_policy', - 'resource_version', - 'resource_version_match', - 'send_initial_events', - 'timeout_seconds', - 'body' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method delete_collection_ip_address" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 - query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 - query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 - query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 - query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 - query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 - query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 - query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 - query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 - query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 - query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/networking.k8s.io/v1alpha1/ipaddresses', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1Status', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def delete_collection_service_cidr(self, **kwargs): # noqa: E501 - """delete_collection_service_cidr # noqa: E501 - - delete collection of ServiceCIDR # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_collection_service_cidr(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1Status - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.delete_collection_service_cidr_with_http_info(**kwargs) # noqa: E501 - - def delete_collection_service_cidr_with_http_info(self, **kwargs): # noqa: E501 - """delete_collection_service_cidr # noqa: E501 - - delete collection of ServiceCIDR # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_collection_service_cidr_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'pretty', - '_continue', - 'dry_run', - 'field_selector', - 'grace_period_seconds', - 'label_selector', - 'limit', - 'orphan_dependents', - 'propagation_policy', - 'resource_version', - 'resource_version_match', - 'send_initial_events', - 'timeout_seconds', - 'body' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method delete_collection_service_cidr" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 - query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 - query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 - query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 - query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 - query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 - query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 - query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 - query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 - query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 - query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/networking.k8s.io/v1alpha1/servicecidrs', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1Status', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def delete_ip_address(self, name, **kwargs): # noqa: E501 - """delete_ip_address # noqa: E501 - - delete an IPAddress # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_ip_address(name, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the IPAddress (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1Status - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.delete_ip_address_with_http_info(name, **kwargs) # noqa: E501 - - def delete_ip_address_with_http_info(self, name, **kwargs): # noqa: E501 - """delete_ip_address # noqa: E501 - - delete an IPAddress # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_ip_address_with_http_info(name, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the IPAddress (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'pretty', - 'dry_run', - 'grace_period_seconds', - 'orphan_dependents', - 'propagation_policy', - 'body' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method delete_ip_address" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `delete_ip_address`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 - query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 - query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 - query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/networking.k8s.io/v1alpha1/ipaddresses/{name}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1Status', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def delete_service_cidr(self, name, **kwargs): # noqa: E501 - """delete_service_cidr # noqa: E501 - - delete a ServiceCIDR # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_service_cidr(name, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ServiceCIDR (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1Status - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.delete_service_cidr_with_http_info(name, **kwargs) # noqa: E501 - - def delete_service_cidr_with_http_info(self, name, **kwargs): # noqa: E501 - """delete_service_cidr # noqa: E501 - - delete a ServiceCIDR # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_service_cidr_with_http_info(name, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ServiceCIDR (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'pretty', - 'dry_run', - 'grace_period_seconds', - 'orphan_dependents', - 'propagation_policy', - 'body' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method delete_service_cidr" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `delete_service_cidr`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 - query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 - query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 - query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/networking.k8s.io/v1alpha1/servicecidrs/{name}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1Status', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_api_resources(self, **kwargs): # noqa: E501 - """get_api_resources # noqa: E501 - - get available resources # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_api_resources(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1APIResourceList - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_api_resources_with_http_info(**kwargs) # noqa: E501 - - def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 - """get_api_resources # noqa: E501 - - get available resources # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_api_resources_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_api_resources" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/networking.k8s.io/v1alpha1/', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1APIResourceList', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_ip_address(self, **kwargs): # noqa: E501 - """list_ip_address # noqa: E501 - - list or watch objects of kind IPAddress # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_ip_address(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha1IPAddressList - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_ip_address_with_http_info(**kwargs) # noqa: E501 - - def list_ip_address_with_http_info(self, **kwargs): # noqa: E501 - """list_ip_address # noqa: E501 - - list or watch objects of kind IPAddress # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_ip_address_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha1IPAddressList, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'pretty', - 'allow_watch_bookmarks', - '_continue', - 'field_selector', - 'label_selector', - 'limit', - 'resource_version', - 'resource_version_match', - 'send_initial_events', - 'timeout_seconds', - 'watch' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_ip_address" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 - query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 - query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 - query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 - query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 - query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 - query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 - query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 - query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 - query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/networking.k8s.io/v1alpha1/ipaddresses', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha1IPAddressList', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_service_cidr(self, **kwargs): # noqa: E501 - """list_service_cidr # noqa: E501 - - list or watch objects of kind ServiceCIDR # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_service_cidr(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha1ServiceCIDRList - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_service_cidr_with_http_info(**kwargs) # noqa: E501 - - def list_service_cidr_with_http_info(self, **kwargs): # noqa: E501 - """list_service_cidr # noqa: E501 - - list or watch objects of kind ServiceCIDR # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_service_cidr_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha1ServiceCIDRList, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'pretty', - 'allow_watch_bookmarks', - '_continue', - 'field_selector', - 'label_selector', - 'limit', - 'resource_version', - 'resource_version_match', - 'send_initial_events', - 'timeout_seconds', - 'watch' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_service_cidr" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 - query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 - query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 - query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 - query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 - query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 - query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 - query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 - query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 - query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/networking.k8s.io/v1alpha1/servicecidrs', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha1ServiceCIDRList', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def patch_ip_address(self, name, body, **kwargs): # noqa: E501 - """patch_ip_address # noqa: E501 - - partially update the specified IPAddress # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_ip_address(name, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the IPAddress (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha1IPAddress - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.patch_ip_address_with_http_info(name, body, **kwargs) # noqa: E501 - - def patch_ip_address_with_http_info(self, name, body, **kwargs): # noqa: E501 - """patch_ip_address # noqa: E501 - - partially update the specified IPAddress # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_ip_address_with_http_info(name, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the IPAddress (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha1IPAddress, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'body', - 'pretty', - 'dry_run', - 'field_manager', - 'field_validation', - 'force' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method patch_ip_address" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `patch_ip_address`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `patch_ip_address`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 - query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 - query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 - query_params.append(('force', local_var_params['force'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/networking.k8s.io/v1alpha1/ipaddresses/{name}', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha1IPAddress', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def patch_service_cidr(self, name, body, **kwargs): # noqa: E501 - """patch_service_cidr # noqa: E501 - - partially update the specified ServiceCIDR # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_service_cidr(name, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ServiceCIDR (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha1ServiceCIDR - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.patch_service_cidr_with_http_info(name, body, **kwargs) # noqa: E501 - - def patch_service_cidr_with_http_info(self, name, body, **kwargs): # noqa: E501 - """patch_service_cidr # noqa: E501 - - partially update the specified ServiceCIDR # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_service_cidr_with_http_info(name, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ServiceCIDR (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha1ServiceCIDR, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'body', - 'pretty', - 'dry_run', - 'field_manager', - 'field_validation', - 'force' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method patch_service_cidr" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `patch_service_cidr`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `patch_service_cidr`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 - query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 - query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 - query_params.append(('force', local_var_params['force'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/networking.k8s.io/v1alpha1/servicecidrs/{name}', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha1ServiceCIDR', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def patch_service_cidr_status(self, name, body, **kwargs): # noqa: E501 - """patch_service_cidr_status # noqa: E501 - - partially update status of the specified ServiceCIDR # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_service_cidr_status(name, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ServiceCIDR (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha1ServiceCIDR - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.patch_service_cidr_status_with_http_info(name, body, **kwargs) # noqa: E501 - - def patch_service_cidr_status_with_http_info(self, name, body, **kwargs): # noqa: E501 - """patch_service_cidr_status # noqa: E501 - - partially update status of the specified ServiceCIDR # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_service_cidr_status_with_http_info(name, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ServiceCIDR (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha1ServiceCIDR, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'body', - 'pretty', - 'dry_run', - 'field_manager', - 'field_validation', - 'force' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method patch_service_cidr_status" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `patch_service_cidr_status`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `patch_service_cidr_status`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 - query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 - query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 - query_params.append(('force', local_var_params['force'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/networking.k8s.io/v1alpha1/servicecidrs/{name}/status', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha1ServiceCIDR', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def read_ip_address(self, name, **kwargs): # noqa: E501 - """read_ip_address # noqa: E501 - - read the specified IPAddress # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.read_ip_address(name, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the IPAddress (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha1IPAddress - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.read_ip_address_with_http_info(name, **kwargs) # noqa: E501 - - def read_ip_address_with_http_info(self, name, **kwargs): # noqa: E501 - """read_ip_address # noqa: E501 - - read the specified IPAddress # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.read_ip_address_with_http_info(name, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the IPAddress (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha1IPAddress, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'pretty' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method read_ip_address" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `read_ip_address`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/networking.k8s.io/v1alpha1/ipaddresses/{name}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha1IPAddress', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def read_service_cidr(self, name, **kwargs): # noqa: E501 - """read_service_cidr # noqa: E501 - - read the specified ServiceCIDR # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.read_service_cidr(name, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ServiceCIDR (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha1ServiceCIDR - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.read_service_cidr_with_http_info(name, **kwargs) # noqa: E501 - - def read_service_cidr_with_http_info(self, name, **kwargs): # noqa: E501 - """read_service_cidr # noqa: E501 - - read the specified ServiceCIDR # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.read_service_cidr_with_http_info(name, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ServiceCIDR (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha1ServiceCIDR, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'pretty' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method read_service_cidr" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `read_service_cidr`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/networking.k8s.io/v1alpha1/servicecidrs/{name}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha1ServiceCIDR', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def read_service_cidr_status(self, name, **kwargs): # noqa: E501 - """read_service_cidr_status # noqa: E501 - - read status of the specified ServiceCIDR # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.read_service_cidr_status(name, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ServiceCIDR (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha1ServiceCIDR - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.read_service_cidr_status_with_http_info(name, **kwargs) # noqa: E501 - - def read_service_cidr_status_with_http_info(self, name, **kwargs): # noqa: E501 - """read_service_cidr_status # noqa: E501 - - read status of the specified ServiceCIDR # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.read_service_cidr_status_with_http_info(name, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ServiceCIDR (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha1ServiceCIDR, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'pretty' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method read_service_cidr_status" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `read_service_cidr_status`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/networking.k8s.io/v1alpha1/servicecidrs/{name}/status', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha1ServiceCIDR', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def replace_ip_address(self, name, body, **kwargs): # noqa: E501 - """replace_ip_address # noqa: E501 - - replace the specified IPAddress # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.replace_ip_address(name, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the IPAddress (required) - :param V1alpha1IPAddress body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha1IPAddress - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.replace_ip_address_with_http_info(name, body, **kwargs) # noqa: E501 - - def replace_ip_address_with_http_info(self, name, body, **kwargs): # noqa: E501 - """replace_ip_address # noqa: E501 - - replace the specified IPAddress # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.replace_ip_address_with_http_info(name, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the IPAddress (required) - :param V1alpha1IPAddress body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha1IPAddress, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'body', - 'pretty', - 'dry_run', - 'field_manager', - 'field_validation' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method replace_ip_address" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `replace_ip_address`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `replace_ip_address`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 - query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 - query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/networking.k8s.io/v1alpha1/ipaddresses/{name}', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha1IPAddress', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def replace_service_cidr(self, name, body, **kwargs): # noqa: E501 - """replace_service_cidr # noqa: E501 - - replace the specified ServiceCIDR # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.replace_service_cidr(name, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ServiceCIDR (required) - :param V1alpha1ServiceCIDR body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha1ServiceCIDR - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.replace_service_cidr_with_http_info(name, body, **kwargs) # noqa: E501 - - def replace_service_cidr_with_http_info(self, name, body, **kwargs): # noqa: E501 - """replace_service_cidr # noqa: E501 - - replace the specified ServiceCIDR # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.replace_service_cidr_with_http_info(name, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ServiceCIDR (required) - :param V1alpha1ServiceCIDR body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha1ServiceCIDR, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'body', - 'pretty', - 'dry_run', - 'field_manager', - 'field_validation' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method replace_service_cidr" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `replace_service_cidr`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `replace_service_cidr`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 - query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 - query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/networking.k8s.io/v1alpha1/servicecidrs/{name}', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha1ServiceCIDR', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def replace_service_cidr_status(self, name, body, **kwargs): # noqa: E501 - """replace_service_cidr_status # noqa: E501 - - replace status of the specified ServiceCIDR # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.replace_service_cidr_status(name, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ServiceCIDR (required) - :param V1alpha1ServiceCIDR body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha1ServiceCIDR - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.replace_service_cidr_status_with_http_info(name, body, **kwargs) # noqa: E501 - - def replace_service_cidr_status_with_http_info(self, name, body, **kwargs): # noqa: E501 - """replace_service_cidr_status # noqa: E501 - - replace status of the specified ServiceCIDR # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.replace_service_cidr_status_with_http_info(name, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ServiceCIDR (required) - :param V1alpha1ServiceCIDR body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha1ServiceCIDR, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'body', - 'pretty', - 'dry_run', - 'field_manager', - 'field_validation' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method replace_service_cidr_status" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `replace_service_cidr_status`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `replace_service_cidr_status`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 - query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 - query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/networking.k8s.io/v1alpha1/servicecidrs/{name}/status', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha1ServiceCIDR', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) diff --git a/kubernetes/client/api/networking_v1beta1_api.py b/kubernetes/client/api/networking_v1beta1_api.py new file mode 100644 index 0000000000..b7b7b63f1d --- /dev/null +++ b/kubernetes/client/api/networking_v1beta1_api.py @@ -0,0 +1,3295 @@ +# coding: utf-8 + +""" + Kubernetes + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: release-1.35 + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from kubernetes.client.api_client import ApiClient +from kubernetes.client.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class NetworkingV1beta1Api(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def create_ip_address(self, body, **kwargs): # noqa: E501 + """create_ip_address # noqa: E501 + + create an IPAddress # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_ip_address(body, async_req=True) + >>> result = thread.get() + + :param body: (required) + :type body: V1beta1IPAddress + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1IPAddress + """ + kwargs['_return_http_data_only'] = True + return self.create_ip_address_with_http_info(body, **kwargs) # noqa: E501 + + def create_ip_address_with_http_info(self, body, **kwargs): # noqa: E501 + """create_ip_address # noqa: E501 + + create an IPAddress # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_ip_address_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param body: (required) + :type body: V1beta1IPAddress + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1IPAddress, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_ip_address" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `create_ip_address`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1IPAddress", + 201: "V1beta1IPAddress", + 202: "V1beta1IPAddress", + 401: None, + } + + return self.api_client.call_api( + '/apis/networking.k8s.io/v1beta1/ipaddresses', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def create_service_cidr(self, body, **kwargs): # noqa: E501 + """create_service_cidr # noqa: E501 + + create a ServiceCIDR # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_service_cidr(body, async_req=True) + >>> result = thread.get() + + :param body: (required) + :type body: V1beta1ServiceCIDR + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1ServiceCIDR + """ + kwargs['_return_http_data_only'] = True + return self.create_service_cidr_with_http_info(body, **kwargs) # noqa: E501 + + def create_service_cidr_with_http_info(self, body, **kwargs): # noqa: E501 + """create_service_cidr # noqa: E501 + + create a ServiceCIDR # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_service_cidr_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param body: (required) + :type body: V1beta1ServiceCIDR + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1ServiceCIDR, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_service_cidr" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `create_service_cidr`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1ServiceCIDR", + 201: "V1beta1ServiceCIDR", + 202: "V1beta1ServiceCIDR", + 401: None, + } + + return self.api_client.call_api( + '/apis/networking.k8s.io/v1beta1/servicecidrs', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_collection_ip_address(self, **kwargs): # noqa: E501 + """delete_collection_ip_address # noqa: E501 + + delete collection of IPAddress # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_collection_ip_address(async_req=True) + >>> result = thread.get() + + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1Status + """ + kwargs['_return_http_data_only'] = True + return self.delete_collection_ip_address_with_http_info(**kwargs) # noqa: E501 + + def delete_collection_ip_address_with_http_info(self, **kwargs): # noqa: E501 + """delete_collection_ip_address # noqa: E501 + + delete collection of IPAddress # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_collection_ip_address_with_http_info(async_req=True) + >>> result = thread.get() + + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'pretty', + '_continue', + 'dry_run', + 'field_selector', + 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', + 'label_selector', + 'limit', + 'orphan_dependents', + 'propagation_policy', + 'resource_version', + 'resource_version_match', + 'send_initial_events', + 'timeout_seconds', + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_collection_ip_address" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 + query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 + query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 + query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 + query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 + query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 + query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 + query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 + query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 + query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 + query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1Status", + 401: None, + } + + return self.api_client.call_api( + '/apis/networking.k8s.io/v1beta1/ipaddresses', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_collection_service_cidr(self, **kwargs): # noqa: E501 + """delete_collection_service_cidr # noqa: E501 + + delete collection of ServiceCIDR # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_collection_service_cidr(async_req=True) + >>> result = thread.get() + + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1Status + """ + kwargs['_return_http_data_only'] = True + return self.delete_collection_service_cidr_with_http_info(**kwargs) # noqa: E501 + + def delete_collection_service_cidr_with_http_info(self, **kwargs): # noqa: E501 + """delete_collection_service_cidr # noqa: E501 + + delete collection of ServiceCIDR # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_collection_service_cidr_with_http_info(async_req=True) + >>> result = thread.get() + + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'pretty', + '_continue', + 'dry_run', + 'field_selector', + 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', + 'label_selector', + 'limit', + 'orphan_dependents', + 'propagation_policy', + 'resource_version', + 'resource_version_match', + 'send_initial_events', + 'timeout_seconds', + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_collection_service_cidr" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 + query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 + query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 + query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 + query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 + query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 + query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 + query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 + query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 + query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 + query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1Status", + 401: None, + } + + return self.api_client.call_api( + '/apis/networking.k8s.io/v1beta1/servicecidrs', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_ip_address(self, name, **kwargs): # noqa: E501 + """delete_ip_address # noqa: E501 + + delete an IPAddress # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_ip_address(name, async_req=True) + >>> result = thread.get() + + :param name: name of the IPAddress (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1Status + """ + kwargs['_return_http_data_only'] = True + return self.delete_ip_address_with_http_info(name, **kwargs) # noqa: E501 + + def delete_ip_address_with_http_info(self, name, **kwargs): # noqa: E501 + """delete_ip_address # noqa: E501 + + delete an IPAddress # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_ip_address_with_http_info(name, async_req=True) + >>> result = thread.get() + + :param name: name of the IPAddress (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'pretty', + 'dry_run', + 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', + 'orphan_dependents', + 'propagation_policy', + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_ip_address" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `delete_ip_address`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 + query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 + query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 + query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1Status", + 202: "V1Status", + 401: None, + } + + return self.api_client.call_api( + '/apis/networking.k8s.io/v1beta1/ipaddresses/{name}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_service_cidr(self, name, **kwargs): # noqa: E501 + """delete_service_cidr # noqa: E501 + + delete a ServiceCIDR # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_service_cidr(name, async_req=True) + >>> result = thread.get() + + :param name: name of the ServiceCIDR (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1Status + """ + kwargs['_return_http_data_only'] = True + return self.delete_service_cidr_with_http_info(name, **kwargs) # noqa: E501 + + def delete_service_cidr_with_http_info(self, name, **kwargs): # noqa: E501 + """delete_service_cidr # noqa: E501 + + delete a ServiceCIDR # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_service_cidr_with_http_info(name, async_req=True) + >>> result = thread.get() + + :param name: name of the ServiceCIDR (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'pretty', + 'dry_run', + 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', + 'orphan_dependents', + 'propagation_policy', + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_service_cidr" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `delete_service_cidr`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 + query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 + query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 + query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1Status", + 202: "V1Status", + 401: None, + } + + return self.api_client.call_api( + '/apis/networking.k8s.io/v1beta1/servicecidrs/{name}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_api_resources(self, **kwargs): # noqa: E501 + """get_api_resources # noqa: E501 + + get available resources # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_api_resources(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1APIResourceList + """ + kwargs['_return_http_data_only'] = True + return self.get_api_resources_with_http_info(**kwargs) # noqa: E501 + + def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 + """get_api_resources # noqa: E501 + + get available resources # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_api_resources_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_api_resources" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1APIResourceList", + 401: None, + } + + return self.api_client.call_api( + '/apis/networking.k8s.io/v1beta1/', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def list_ip_address(self, **kwargs): # noqa: E501 + """list_ip_address # noqa: E501 + + list or watch objects of kind IPAddress # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_ip_address(async_req=True) + >>> result = thread.get() + + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1IPAddressList + """ + kwargs['_return_http_data_only'] = True + return self.list_ip_address_with_http_info(**kwargs) # noqa: E501 + + def list_ip_address_with_http_info(self, **kwargs): # noqa: E501 + """list_ip_address # noqa: E501 + + list or watch objects of kind IPAddress # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_ip_address_with_http_info(async_req=True) + >>> result = thread.get() + + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1IPAddressList, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'pretty', + 'allow_watch_bookmarks', + '_continue', + 'field_selector', + 'label_selector', + 'limit', + 'resource_version', + 'resource_version_match', + 'send_initial_events', + 'timeout_seconds', + 'watch' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_ip_address" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 + query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 + query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 + query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 + query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 + query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 + query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 + query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 + query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 + query_params.append(('watch', local_var_params['watch'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1IPAddressList", + 401: None, + } + + return self.api_client.call_api( + '/apis/networking.k8s.io/v1beta1/ipaddresses', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def list_service_cidr(self, **kwargs): # noqa: E501 + """list_service_cidr # noqa: E501 + + list or watch objects of kind ServiceCIDR # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_service_cidr(async_req=True) + >>> result = thread.get() + + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1ServiceCIDRList + """ + kwargs['_return_http_data_only'] = True + return self.list_service_cidr_with_http_info(**kwargs) # noqa: E501 + + def list_service_cidr_with_http_info(self, **kwargs): # noqa: E501 + """list_service_cidr # noqa: E501 + + list or watch objects of kind ServiceCIDR # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_service_cidr_with_http_info(async_req=True) + >>> result = thread.get() + + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1ServiceCIDRList, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'pretty', + 'allow_watch_bookmarks', + '_continue', + 'field_selector', + 'label_selector', + 'limit', + 'resource_version', + 'resource_version_match', + 'send_initial_events', + 'timeout_seconds', + 'watch' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_service_cidr" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 + query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 + query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 + query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 + query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 + query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 + query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 + query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 + query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 + query_params.append(('watch', local_var_params['watch'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1ServiceCIDRList", + 401: None, + } + + return self.api_client.call_api( + '/apis/networking.k8s.io/v1beta1/servicecidrs', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def patch_ip_address(self, name, body, **kwargs): # noqa: E501 + """patch_ip_address # noqa: E501 + + partially update the specified IPAddress # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_ip_address(name, body, async_req=True) + >>> result = thread.get() + + :param name: name of the IPAddress (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1IPAddress + """ + kwargs['_return_http_data_only'] = True + return self.patch_ip_address_with_http_info(name, body, **kwargs) # noqa: E501 + + def patch_ip_address_with_http_info(self, name, body, **kwargs): # noqa: E501 + """patch_ip_address # noqa: E501 + + partially update the specified IPAddress # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_ip_address_with_http_info(name, body, async_req=True) + >>> result = thread.get() + + :param name: name of the IPAddress (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1IPAddress, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation', + 'force' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method patch_ip_address" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `patch_ip_address`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `patch_ip_address`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 + query_params.append(('force', local_var_params['force'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # HTTP header `Content-Type` + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1IPAddress", + 201: "V1beta1IPAddress", + 401: None, + } + + return self.api_client.call_api( + '/apis/networking.k8s.io/v1beta1/ipaddresses/{name}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def patch_service_cidr(self, name, body, **kwargs): # noqa: E501 + """patch_service_cidr # noqa: E501 + + partially update the specified ServiceCIDR # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_service_cidr(name, body, async_req=True) + >>> result = thread.get() + + :param name: name of the ServiceCIDR (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1ServiceCIDR + """ + kwargs['_return_http_data_only'] = True + return self.patch_service_cidr_with_http_info(name, body, **kwargs) # noqa: E501 + + def patch_service_cidr_with_http_info(self, name, body, **kwargs): # noqa: E501 + """patch_service_cidr # noqa: E501 + + partially update the specified ServiceCIDR # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_service_cidr_with_http_info(name, body, async_req=True) + >>> result = thread.get() + + :param name: name of the ServiceCIDR (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1ServiceCIDR, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation', + 'force' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method patch_service_cidr" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `patch_service_cidr`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `patch_service_cidr`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 + query_params.append(('force', local_var_params['force'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # HTTP header `Content-Type` + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1ServiceCIDR", + 201: "V1beta1ServiceCIDR", + 401: None, + } + + return self.api_client.call_api( + '/apis/networking.k8s.io/v1beta1/servicecidrs/{name}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def patch_service_cidr_status(self, name, body, **kwargs): # noqa: E501 + """patch_service_cidr_status # noqa: E501 + + partially update status of the specified ServiceCIDR # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_service_cidr_status(name, body, async_req=True) + >>> result = thread.get() + + :param name: name of the ServiceCIDR (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1ServiceCIDR + """ + kwargs['_return_http_data_only'] = True + return self.patch_service_cidr_status_with_http_info(name, body, **kwargs) # noqa: E501 + + def patch_service_cidr_status_with_http_info(self, name, body, **kwargs): # noqa: E501 + """patch_service_cidr_status # noqa: E501 + + partially update status of the specified ServiceCIDR # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_service_cidr_status_with_http_info(name, body, async_req=True) + >>> result = thread.get() + + :param name: name of the ServiceCIDR (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1ServiceCIDR, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation', + 'force' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method patch_service_cidr_status" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `patch_service_cidr_status`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `patch_service_cidr_status`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 + query_params.append(('force', local_var_params['force'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # HTTP header `Content-Type` + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1ServiceCIDR", + 201: "V1beta1ServiceCIDR", + 401: None, + } + + return self.api_client.call_api( + '/apis/networking.k8s.io/v1beta1/servicecidrs/{name}/status', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def read_ip_address(self, name, **kwargs): # noqa: E501 + """read_ip_address # noqa: E501 + + read the specified IPAddress # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.read_ip_address(name, async_req=True) + >>> result = thread.get() + + :param name: name of the IPAddress (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1IPAddress + """ + kwargs['_return_http_data_only'] = True + return self.read_ip_address_with_http_info(name, **kwargs) # noqa: E501 + + def read_ip_address_with_http_info(self, name, **kwargs): # noqa: E501 + """read_ip_address # noqa: E501 + + read the specified IPAddress # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.read_ip_address_with_http_info(name, async_req=True) + >>> result = thread.get() + + :param name: name of the IPAddress (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1IPAddress, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'pretty' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method read_ip_address" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `read_ip_address`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1IPAddress", + 401: None, + } + + return self.api_client.call_api( + '/apis/networking.k8s.io/v1beta1/ipaddresses/{name}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def read_service_cidr(self, name, **kwargs): # noqa: E501 + """read_service_cidr # noqa: E501 + + read the specified ServiceCIDR # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.read_service_cidr(name, async_req=True) + >>> result = thread.get() + + :param name: name of the ServiceCIDR (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1ServiceCIDR + """ + kwargs['_return_http_data_only'] = True + return self.read_service_cidr_with_http_info(name, **kwargs) # noqa: E501 + + def read_service_cidr_with_http_info(self, name, **kwargs): # noqa: E501 + """read_service_cidr # noqa: E501 + + read the specified ServiceCIDR # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.read_service_cidr_with_http_info(name, async_req=True) + >>> result = thread.get() + + :param name: name of the ServiceCIDR (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1ServiceCIDR, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'pretty' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method read_service_cidr" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `read_service_cidr`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1ServiceCIDR", + 401: None, + } + + return self.api_client.call_api( + '/apis/networking.k8s.io/v1beta1/servicecidrs/{name}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def read_service_cidr_status(self, name, **kwargs): # noqa: E501 + """read_service_cidr_status # noqa: E501 + + read status of the specified ServiceCIDR # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.read_service_cidr_status(name, async_req=True) + >>> result = thread.get() + + :param name: name of the ServiceCIDR (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1ServiceCIDR + """ + kwargs['_return_http_data_only'] = True + return self.read_service_cidr_status_with_http_info(name, **kwargs) # noqa: E501 + + def read_service_cidr_status_with_http_info(self, name, **kwargs): # noqa: E501 + """read_service_cidr_status # noqa: E501 + + read status of the specified ServiceCIDR # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.read_service_cidr_status_with_http_info(name, async_req=True) + >>> result = thread.get() + + :param name: name of the ServiceCIDR (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1ServiceCIDR, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'pretty' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method read_service_cidr_status" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `read_service_cidr_status`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1ServiceCIDR", + 401: None, + } + + return self.api_client.call_api( + '/apis/networking.k8s.io/v1beta1/servicecidrs/{name}/status', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def replace_ip_address(self, name, body, **kwargs): # noqa: E501 + """replace_ip_address # noqa: E501 + + replace the specified IPAddress # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.replace_ip_address(name, body, async_req=True) + >>> result = thread.get() + + :param name: name of the IPAddress (required) + :type name: str + :param body: (required) + :type body: V1beta1IPAddress + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1IPAddress + """ + kwargs['_return_http_data_only'] = True + return self.replace_ip_address_with_http_info(name, body, **kwargs) # noqa: E501 + + def replace_ip_address_with_http_info(self, name, body, **kwargs): # noqa: E501 + """replace_ip_address # noqa: E501 + + replace the specified IPAddress # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.replace_ip_address_with_http_info(name, body, async_req=True) + >>> result = thread.get() + + :param name: name of the IPAddress (required) + :type name: str + :param body: (required) + :type body: V1beta1IPAddress + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1IPAddress, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method replace_ip_address" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `replace_ip_address`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `replace_ip_address`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1IPAddress", + 201: "V1beta1IPAddress", + 401: None, + } + + return self.api_client.call_api( + '/apis/networking.k8s.io/v1beta1/ipaddresses/{name}', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def replace_service_cidr(self, name, body, **kwargs): # noqa: E501 + """replace_service_cidr # noqa: E501 + + replace the specified ServiceCIDR # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.replace_service_cidr(name, body, async_req=True) + >>> result = thread.get() + + :param name: name of the ServiceCIDR (required) + :type name: str + :param body: (required) + :type body: V1beta1ServiceCIDR + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1ServiceCIDR + """ + kwargs['_return_http_data_only'] = True + return self.replace_service_cidr_with_http_info(name, body, **kwargs) # noqa: E501 + + def replace_service_cidr_with_http_info(self, name, body, **kwargs): # noqa: E501 + """replace_service_cidr # noqa: E501 + + replace the specified ServiceCIDR # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.replace_service_cidr_with_http_info(name, body, async_req=True) + >>> result = thread.get() + + :param name: name of the ServiceCIDR (required) + :type name: str + :param body: (required) + :type body: V1beta1ServiceCIDR + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1ServiceCIDR, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method replace_service_cidr" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `replace_service_cidr`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `replace_service_cidr`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1ServiceCIDR", + 201: "V1beta1ServiceCIDR", + 401: None, + } + + return self.api_client.call_api( + '/apis/networking.k8s.io/v1beta1/servicecidrs/{name}', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def replace_service_cidr_status(self, name, body, **kwargs): # noqa: E501 + """replace_service_cidr_status # noqa: E501 + + replace status of the specified ServiceCIDR # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.replace_service_cidr_status(name, body, async_req=True) + >>> result = thread.get() + + :param name: name of the ServiceCIDR (required) + :type name: str + :param body: (required) + :type body: V1beta1ServiceCIDR + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1ServiceCIDR + """ + kwargs['_return_http_data_only'] = True + return self.replace_service_cidr_status_with_http_info(name, body, **kwargs) # noqa: E501 + + def replace_service_cidr_status_with_http_info(self, name, body, **kwargs): # noqa: E501 + """replace_service_cidr_status # noqa: E501 + + replace status of the specified ServiceCIDR # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.replace_service_cidr_status_with_http_info(name, body, async_req=True) + >>> result = thread.get() + + :param name: name of the ServiceCIDR (required) + :type name: str + :param body: (required) + :type body: V1beta1ServiceCIDR + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1ServiceCIDR, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method replace_service_cidr_status" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `replace_service_cidr_status`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `replace_service_cidr_status`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1ServiceCIDR", + 201: "V1beta1ServiceCIDR", + 401: None, + } + + return self.api_client.call_api( + '/apis/networking.k8s.io/v1beta1/servicecidrs/{name}/status', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) diff --git a/kubernetes/client/api/node_api.py b/kubernetes/client/api/node_api.py index 152e8f94e7..53da94d1ed 100644 --- a/kubernetes/client/api/node_api.py +++ b/kubernetes/client/api/node_api.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ @@ -42,20 +42,24 @@ def get_api_group(self, **kwargs): # noqa: E501 get information of a group # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_group(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1APIGroup + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1APIGroup """ kwargs['_return_http_data_only'] = True return self.get_api_group_with_http_info(**kwargs) # noqa: E501 @@ -66,22 +70,32 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 get information of a group # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_group_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1APIGroup, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1APIGroup, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -93,7 +107,10 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -112,7 +129,7 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -125,6 +142,11 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1APIGroup", + 401: None, + } + return self.api_client.call_api( '/apis/node.k8s.io/', 'GET', path_params, @@ -133,10 +155,11 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1APIGroup', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) diff --git a/kubernetes/client/api/node_v1_api.py b/kubernetes/client/api/node_v1_api.py index 8c24cb48b5..751dacc378 100644 --- a/kubernetes/client/api/node_v1_api.py +++ b/kubernetes/client/api/node_v1_api.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ @@ -42,25 +42,34 @@ def create_runtime_class(self, body, **kwargs): # noqa: E501 create a RuntimeClass # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_runtime_class(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param V1RuntimeClass body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param body: (required) + :type body: V1RuntimeClass + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1RuntimeClass + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1RuntimeClass """ kwargs['_return_http_data_only'] = True return self.create_runtime_class_with_http_info(body, **kwargs) # noqa: E501 @@ -71,27 +80,42 @@ def create_runtime_class_with_http_info(self, body, **kwargs): # noqa: E501 create a RuntimeClass # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_runtime_class_with_http_info(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param V1RuntimeClass body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param body: (required) + :type body: V1RuntimeClass + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1RuntimeClass, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1RuntimeClass, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -108,7 +132,10 @@ def create_runtime_class_with_http_info(self, body, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -121,8 +148,7 @@ def create_runtime_class_with_http_info(self, body, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_runtime_class`") # noqa: E501 collection_formats = {} @@ -130,16 +156,16 @@ def create_runtime_class_with_http_info(self, body, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -149,11 +175,18 @@ def create_runtime_class_with_http_info(self, body, **kwargs): # noqa: E501 body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1RuntimeClass", + 201: "V1RuntimeClass", + 202: "V1RuntimeClass", + 401: None, + } + return self.api_client.call_api( '/apis/node.k8s.io/v1/runtimeclasses', 'POST', path_params, @@ -162,13 +195,14 @@ def create_runtime_class_with_http_info(self, body, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1RuntimeClass', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_collection_runtime_class(self, **kwargs): # noqa: E501 """delete_collection_runtime_class # noqa: E501 @@ -176,34 +210,54 @@ def delete_collection_runtime_class(self, **kwargs): # noqa: E501 delete collection of RuntimeClass # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_runtime_class(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_collection_runtime_class_with_http_info(**kwargs) # noqa: E501 @@ -214,36 +268,62 @@ def delete_collection_runtime_class_with_http_info(self, **kwargs): # noqa: E50 delete collection of RuntimeClass # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_runtime_class_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -254,6 +334,7 @@ def delete_collection_runtime_class_with_http_info(self, **kwargs): # noqa: E50 'dry_run', 'field_selector', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'label_selector', 'limit', 'orphan_dependents', @@ -269,7 +350,10 @@ def delete_collection_runtime_class_with_http_info(self, **kwargs): # noqa: E50 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -287,34 +371,36 @@ def delete_collection_runtime_class_with_http_info(self, **kwargs): # noqa: E50 path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -324,11 +410,16 @@ def delete_collection_runtime_class_with_http_info(self, **kwargs): # noqa: E50 body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 401: None, + } + return self.api_client.call_api( '/apis/node.k8s.io/v1/runtimeclasses', 'DELETE', path_params, @@ -337,13 +428,14 @@ def delete_collection_runtime_class_with_http_info(self, **kwargs): # noqa: E50 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_runtime_class(self, name, **kwargs): # noqa: E501 """delete_runtime_class # noqa: E501 @@ -351,27 +443,40 @@ def delete_runtime_class(self, name, **kwargs): # noqa: E501 delete a RuntimeClass # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_runtime_class(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the RuntimeClass (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the RuntimeClass (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_runtime_class_with_http_info(name, **kwargs) # noqa: E501 @@ -382,29 +487,48 @@ def delete_runtime_class_with_http_info(self, name, **kwargs): # noqa: E501 delete a RuntimeClass # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_runtime_class_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the RuntimeClass (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the RuntimeClass (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -414,6 +538,7 @@ def delete_runtime_class_with_http_info(self, name, **kwargs): # noqa: E501 'pretty', 'dry_run', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'orphan_dependents', 'propagation_policy', 'body' @@ -423,7 +548,10 @@ def delete_runtime_class_with_http_info(self, name, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -436,8 +564,7 @@ def delete_runtime_class_with_http_info(self, name, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `delete_runtime_class`") # noqa: E501 collection_formats = {} @@ -447,18 +574,20 @@ def delete_runtime_class_with_http_info(self, name, **kwargs): # noqa: E501 path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -468,11 +597,17 @@ def delete_runtime_class_with_http_info(self, name, **kwargs): # noqa: E501 body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 202: "V1Status", + 401: None, + } + return self.api_client.call_api( '/apis/node.k8s.io/v1/runtimeclasses/{name}', 'DELETE', path_params, @@ -481,13 +616,14 @@ def delete_runtime_class_with_http_info(self, name, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def get_api_resources(self, **kwargs): # noqa: E501 """get_api_resources # noqa: E501 @@ -495,20 +631,24 @@ def get_api_resources(self, **kwargs): # noqa: E501 get available resources # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_resources(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1APIResourceList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1APIResourceList """ kwargs['_return_http_data_only'] = True return self.get_api_resources_with_http_info(**kwargs) # noqa: E501 @@ -519,22 +659,32 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 get available resources # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_resources_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -546,7 +696,10 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -565,7 +718,7 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -573,11 +726,16 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1APIResourceList", + 401: None, + } + return self.api_client.call_api( '/apis/node.k8s.io/v1/', 'GET', path_params, @@ -586,13 +744,14 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1APIResourceList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_runtime_class(self, **kwargs): # noqa: E501 """list_runtime_class # noqa: E501 @@ -600,31 +759,46 @@ def list_runtime_class(self, **kwargs): # noqa: E501 list or watch objects of kind RuntimeClass # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_runtime_class(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1RuntimeClassList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1RuntimeClassList """ kwargs['_return_http_data_only'] = True return self.list_runtime_class_with_http_info(**kwargs) # noqa: E501 @@ -635,33 +809,54 @@ def list_runtime_class_with_http_info(self, **kwargs): # noqa: E501 list or watch objects of kind RuntimeClass # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_runtime_class_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1RuntimeClassList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1RuntimeClassList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -684,7 +879,10 @@ def list_runtime_class_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -702,30 +900,30 @@ def list_runtime_class_with_http_info(self, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -733,11 +931,16 @@ def list_runtime_class_with_http_info(self, **kwargs): # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1RuntimeClassList", + 401: None, + } + return self.api_client.call_api( '/apis/node.k8s.io/v1/runtimeclasses', 'GET', path_params, @@ -746,13 +949,14 @@ def list_runtime_class_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1RuntimeClassList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_runtime_class(self, name, body, **kwargs): # noqa: E501 """patch_runtime_class # noqa: E501 @@ -760,27 +964,38 @@ def patch_runtime_class(self, name, body, **kwargs): # noqa: E501 partially update the specified RuntimeClass # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_runtime_class(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the RuntimeClass (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the RuntimeClass (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1RuntimeClass + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1RuntimeClass """ kwargs['_return_http_data_only'] = True return self.patch_runtime_class_with_http_info(name, body, **kwargs) # noqa: E501 @@ -791,29 +1006,46 @@ def patch_runtime_class_with_http_info(self, name, body, **kwargs): # noqa: E50 partially update the specified RuntimeClass # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_runtime_class_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the RuntimeClass (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the RuntimeClass (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1RuntimeClass, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1RuntimeClass, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -832,7 +1064,10 @@ def patch_runtime_class_with_http_info(self, name, body, **kwargs): # noqa: E50 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -845,12 +1080,10 @@ def patch_runtime_class_with_http_info(self, name, body, **kwargs): # noqa: E50 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_runtime_class`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_runtime_class`") # noqa: E501 collection_formats = {} @@ -860,18 +1093,18 @@ def patch_runtime_class_with_http_info(self, name, body, **kwargs): # noqa: E50 path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -881,15 +1114,25 @@ def patch_runtime_class_with_http_info(self, name, body, **kwargs): # noqa: E50 body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1RuntimeClass", + 201: "V1RuntimeClass", + 401: None, + } + return self.api_client.call_api( '/apis/node.k8s.io/v1/runtimeclasses/{name}', 'PATCH', path_params, @@ -898,13 +1141,14 @@ def patch_runtime_class_with_http_info(self, name, body, **kwargs): # noqa: E50 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1RuntimeClass', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_runtime_class(self, name, **kwargs): # noqa: E501 """read_runtime_class # noqa: E501 @@ -912,22 +1156,28 @@ def read_runtime_class(self, name, **kwargs): # noqa: E501 read the specified RuntimeClass # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_runtime_class(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the RuntimeClass (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the RuntimeClass (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1RuntimeClass + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1RuntimeClass """ kwargs['_return_http_data_only'] = True return self.read_runtime_class_with_http_info(name, **kwargs) # noqa: E501 @@ -938,24 +1188,36 @@ def read_runtime_class_with_http_info(self, name, **kwargs): # noqa: E501 read the specified RuntimeClass # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_runtime_class_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the RuntimeClass (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the RuntimeClass (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1RuntimeClass, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1RuntimeClass, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -969,7 +1231,10 @@ def read_runtime_class_with_http_info(self, name, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -982,8 +1247,7 @@ def read_runtime_class_with_http_info(self, name, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_runtime_class`") # noqa: E501 collection_formats = {} @@ -993,10 +1257,10 @@ def read_runtime_class_with_http_info(self, name, **kwargs): # noqa: E501 path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1004,11 +1268,16 @@ def read_runtime_class_with_http_info(self, name, **kwargs): # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1RuntimeClass", + 401: None, + } + return self.api_client.call_api( '/apis/node.k8s.io/v1/runtimeclasses/{name}', 'GET', path_params, @@ -1017,13 +1286,14 @@ def read_runtime_class_with_http_info(self, name, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1RuntimeClass', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_runtime_class(self, name, body, **kwargs): # noqa: E501 """replace_runtime_class # noqa: E501 @@ -1031,26 +1301,36 @@ def replace_runtime_class(self, name, body, **kwargs): # noqa: E501 replace the specified RuntimeClass # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_runtime_class(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the RuntimeClass (required) - :param V1RuntimeClass body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the RuntimeClass (required) + :type name: str + :param body: (required) + :type body: V1RuntimeClass + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1RuntimeClass + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1RuntimeClass """ kwargs['_return_http_data_only'] = True return self.replace_runtime_class_with_http_info(name, body, **kwargs) # noqa: E501 @@ -1061,28 +1341,44 @@ def replace_runtime_class_with_http_info(self, name, body, **kwargs): # noqa: E replace the specified RuntimeClass # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_runtime_class_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the RuntimeClass (required) - :param V1RuntimeClass body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the RuntimeClass (required) + :type name: str + :param body: (required) + :type body: V1RuntimeClass + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1RuntimeClass, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1RuntimeClass, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1100,7 +1396,10 @@ def replace_runtime_class_with_http_info(self, name, body, **kwargs): # noqa: E 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1113,12 +1412,10 @@ def replace_runtime_class_with_http_info(self, name, body, **kwargs): # noqa: E local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_runtime_class`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_runtime_class`") # noqa: E501 collection_formats = {} @@ -1128,16 +1425,16 @@ def replace_runtime_class_with_http_info(self, name, body, **kwargs): # noqa: E path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1147,11 +1444,17 @@ def replace_runtime_class_with_http_info(self, name, body, **kwargs): # noqa: E body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1RuntimeClass", + 201: "V1RuntimeClass", + 401: None, + } + return self.api_client.call_api( '/apis/node.k8s.io/v1/runtimeclasses/{name}', 'PUT', path_params, @@ -1160,10 +1463,11 @@ def replace_runtime_class_with_http_info(self, name, body, **kwargs): # noqa: E body=body_params, post_params=form_params, files=local_var_files, - response_type='V1RuntimeClass', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) diff --git a/kubernetes/client/api/openid_api.py b/kubernetes/client/api/openid_api.py index 6ffc34cd69..ac7dadd9c5 100644 --- a/kubernetes/client/api/openid_api.py +++ b/kubernetes/client/api/openid_api.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ @@ -42,20 +42,24 @@ def get_service_account_issuer_open_id_keyset(self, **kwargs): # noqa: E501 get service account issuer OpenID JSON Web Key Set (contains public token verification keys) # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_service_account_issuer_open_id_keyset(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: str + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: str """ kwargs['_return_http_data_only'] = True return self.get_service_account_issuer_open_id_keyset_with_http_info(**kwargs) # noqa: E501 @@ -66,22 +70,32 @@ def get_service_account_issuer_open_id_keyset_with_http_info(self, **kwargs): # get service account issuer OpenID JSON Web Key Set (contains public token verification keys) # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_service_account_issuer_open_id_keyset_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -93,7 +107,10 @@ def get_service_account_issuer_open_id_keyset_with_http_info(self, **kwargs): # 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -112,7 +129,7 @@ def get_service_account_issuer_open_id_keyset_with_http_info(self, **kwargs): # query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -125,6 +142,11 @@ def get_service_account_issuer_open_id_keyset_with_http_info(self, **kwargs): # # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "str", + 401: None, + } + return self.api_client.call_api( '/openid/v1/jwks', 'GET', path_params, @@ -133,10 +155,11 @@ def get_service_account_issuer_open_id_keyset_with_http_info(self, **kwargs): # body=body_params, post_params=form_params, files=local_var_files, - response_type='str', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) diff --git a/kubernetes/client/api/policy_api.py b/kubernetes/client/api/policy_api.py index 3a39b3a4ef..ea6f249c58 100644 --- a/kubernetes/client/api/policy_api.py +++ b/kubernetes/client/api/policy_api.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ @@ -42,20 +42,24 @@ def get_api_group(self, **kwargs): # noqa: E501 get information of a group # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_group(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1APIGroup + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1APIGroup """ kwargs['_return_http_data_only'] = True return self.get_api_group_with_http_info(**kwargs) # noqa: E501 @@ -66,22 +70,32 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 get information of a group # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_group_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1APIGroup, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1APIGroup, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -93,7 +107,10 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -112,7 +129,7 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -125,6 +142,11 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1APIGroup", + 401: None, + } + return self.api_client.call_api( '/apis/policy/', 'GET', path_params, @@ -133,10 +155,11 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1APIGroup', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) diff --git a/kubernetes/client/api/policy_v1_api.py b/kubernetes/client/api/policy_v1_api.py index a6c633ffa4..134f21e56c 100644 --- a/kubernetes/client/api/policy_v1_api.py +++ b/kubernetes/client/api/policy_v1_api.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ @@ -42,26 +42,36 @@ def create_namespaced_pod_disruption_budget(self, namespace, body, **kwargs): # create a PodDisruptionBudget # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_namespaced_pod_disruption_budget(namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1PodDisruptionBudget body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1PodDisruptionBudget + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1PodDisruptionBudget + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1PodDisruptionBudget """ kwargs['_return_http_data_only'] = True return self.create_namespaced_pod_disruption_budget_with_http_info(namespace, body, **kwargs) # noqa: E501 @@ -72,28 +82,44 @@ def create_namespaced_pod_disruption_budget_with_http_info(self, namespace, body create a PodDisruptionBudget # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_namespaced_pod_disruption_budget_with_http_info(namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1PodDisruptionBudget body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1PodDisruptionBudget + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1PodDisruptionBudget, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1PodDisruptionBudget, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -111,7 +137,10 @@ def create_namespaced_pod_disruption_budget_with_http_info(self, namespace, body 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -124,12 +153,10 @@ def create_namespaced_pod_disruption_budget_with_http_info(self, namespace, body local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_pod_disruption_budget`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_pod_disruption_budget`") # noqa: E501 collection_formats = {} @@ -139,16 +166,16 @@ def create_namespaced_pod_disruption_budget_with_http_info(self, namespace, body path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -158,11 +185,18 @@ def create_namespaced_pod_disruption_budget_with_http_info(self, namespace, body body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1PodDisruptionBudget", + 201: "V1PodDisruptionBudget", + 202: "V1PodDisruptionBudget", + 401: None, + } + return self.api_client.call_api( '/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets', 'POST', path_params, @@ -171,13 +205,14 @@ def create_namespaced_pod_disruption_budget_with_http_info(self, namespace, body body=body_params, post_params=form_params, files=local_var_files, - response_type='V1PodDisruptionBudget', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_collection_namespaced_pod_disruption_budget(self, namespace, **kwargs): # noqa: E501 """delete_collection_namespaced_pod_disruption_budget # noqa: E501 @@ -185,35 +220,56 @@ def delete_collection_namespaced_pod_disruption_budget(self, namespace, **kwargs delete collection of PodDisruptionBudget # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_namespaced_pod_disruption_budget(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_collection_namespaced_pod_disruption_budget_with_http_info(namespace, **kwargs) # noqa: E501 @@ -224,37 +280,64 @@ def delete_collection_namespaced_pod_disruption_budget_with_http_info(self, name delete collection of PodDisruptionBudget # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_namespaced_pod_disruption_budget_with_http_info(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -266,6 +349,7 @@ def delete_collection_namespaced_pod_disruption_budget_with_http_info(self, name 'dry_run', 'field_selector', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'label_selector', 'limit', 'orphan_dependents', @@ -281,7 +365,10 @@ def delete_collection_namespaced_pod_disruption_budget_with_http_info(self, name 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -294,8 +381,7 @@ def delete_collection_namespaced_pod_disruption_budget_with_http_info(self, name local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_pod_disruption_budget`") # noqa: E501 collection_formats = {} @@ -305,34 +391,36 @@ def delete_collection_namespaced_pod_disruption_budget_with_http_info(self, name path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -342,11 +430,16 @@ def delete_collection_namespaced_pod_disruption_budget_with_http_info(self, name body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 401: None, + } + return self.api_client.call_api( '/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets', 'DELETE', path_params, @@ -355,13 +448,14 @@ def delete_collection_namespaced_pod_disruption_budget_with_http_info(self, name body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_namespaced_pod_disruption_budget(self, name, namespace, **kwargs): # noqa: E501 """delete_namespaced_pod_disruption_budget # noqa: E501 @@ -369,28 +463,42 @@ def delete_namespaced_pod_disruption_budget(self, name, namespace, **kwargs): # delete a PodDisruptionBudget # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_namespaced_pod_disruption_budget(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PodDisruptionBudget (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the PodDisruptionBudget (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_namespaced_pod_disruption_budget_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -401,30 +509,50 @@ def delete_namespaced_pod_disruption_budget_with_http_info(self, name, namespace delete a PodDisruptionBudget # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_namespaced_pod_disruption_budget_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PodDisruptionBudget (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the PodDisruptionBudget (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -435,6 +563,7 @@ def delete_namespaced_pod_disruption_budget_with_http_info(self, name, namespace 'pretty', 'dry_run', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'orphan_dependents', 'propagation_policy', 'body' @@ -444,7 +573,10 @@ def delete_namespaced_pod_disruption_budget_with_http_info(self, name, namespace 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -457,12 +589,10 @@ def delete_namespaced_pod_disruption_budget_with_http_info(self, name, namespace local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_pod_disruption_budget`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_pod_disruption_budget`") # noqa: E501 collection_formats = {} @@ -474,18 +604,20 @@ def delete_namespaced_pod_disruption_budget_with_http_info(self, name, namespace path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -495,11 +627,17 @@ def delete_namespaced_pod_disruption_budget_with_http_info(self, name, namespace body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 202: "V1Status", + 401: None, + } + return self.api_client.call_api( '/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}', 'DELETE', path_params, @@ -508,13 +646,14 @@ def delete_namespaced_pod_disruption_budget_with_http_info(self, name, namespace body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def get_api_resources(self, **kwargs): # noqa: E501 """get_api_resources # noqa: E501 @@ -522,20 +661,24 @@ def get_api_resources(self, **kwargs): # noqa: E501 get available resources # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_resources(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1APIResourceList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1APIResourceList """ kwargs['_return_http_data_only'] = True return self.get_api_resources_with_http_info(**kwargs) # noqa: E501 @@ -546,22 +689,32 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 get available resources # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_resources_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -573,7 +726,10 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -592,7 +748,7 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -600,11 +756,16 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1APIResourceList", + 401: None, + } + return self.api_client.call_api( '/apis/policy/v1/', 'GET', path_params, @@ -613,13 +774,14 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1APIResourceList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_namespaced_pod_disruption_budget(self, namespace, **kwargs): # noqa: E501 """list_namespaced_pod_disruption_budget # noqa: E501 @@ -627,32 +789,48 @@ def list_namespaced_pod_disruption_budget(self, namespace, **kwargs): # noqa: E list or watch objects of kind PodDisruptionBudget # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_namespaced_pod_disruption_budget(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1PodDisruptionBudgetList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1PodDisruptionBudgetList """ kwargs['_return_http_data_only'] = True return self.list_namespaced_pod_disruption_budget_with_http_info(namespace, **kwargs) # noqa: E501 @@ -663,34 +841,56 @@ def list_namespaced_pod_disruption_budget_with_http_info(self, namespace, **kwar list or watch objects of kind PodDisruptionBudget # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_namespaced_pod_disruption_budget_with_http_info(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1PodDisruptionBudgetList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1PodDisruptionBudgetList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -714,7 +914,10 @@ def list_namespaced_pod_disruption_budget_with_http_info(self, namespace, **kwar 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -727,8 +930,7 @@ def list_namespaced_pod_disruption_budget_with_http_info(self, namespace, **kwar local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_pod_disruption_budget`") # noqa: E501 collection_formats = {} @@ -738,30 +940,30 @@ def list_namespaced_pod_disruption_budget_with_http_info(self, namespace, **kwar path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -769,11 +971,16 @@ def list_namespaced_pod_disruption_budget_with_http_info(self, namespace, **kwar body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1PodDisruptionBudgetList", + 401: None, + } + return self.api_client.call_api( '/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets', 'GET', path_params, @@ -782,13 +989,14 @@ def list_namespaced_pod_disruption_budget_with_http_info(self, namespace, **kwar body=body_params, post_params=form_params, files=local_var_files, - response_type='V1PodDisruptionBudgetList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_pod_disruption_budget_for_all_namespaces(self, **kwargs): # noqa: E501 """list_pod_disruption_budget_for_all_namespaces # noqa: E501 @@ -796,31 +1004,46 @@ def list_pod_disruption_budget_for_all_namespaces(self, **kwargs): # noqa: E501 list or watch objects of kind PodDisruptionBudget # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_pod_disruption_budget_for_all_namespaces(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1PodDisruptionBudgetList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1PodDisruptionBudgetList """ kwargs['_return_http_data_only'] = True return self.list_pod_disruption_budget_for_all_namespaces_with_http_info(**kwargs) # noqa: E501 @@ -831,33 +1054,54 @@ def list_pod_disruption_budget_for_all_namespaces_with_http_info(self, **kwargs) list or watch objects of kind PodDisruptionBudget # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_pod_disruption_budget_for_all_namespaces_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1PodDisruptionBudgetList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1PodDisruptionBudgetList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -880,7 +1124,10 @@ def list_pod_disruption_budget_for_all_namespaces_with_http_info(self, **kwargs) 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -898,30 +1145,30 @@ def list_pod_disruption_budget_for_all_namespaces_with_http_info(self, **kwargs) path_params = {} query_params = [] - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -929,11 +1176,16 @@ def list_pod_disruption_budget_for_all_namespaces_with_http_info(self, **kwargs) body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1PodDisruptionBudgetList", + 401: None, + } + return self.api_client.call_api( '/apis/policy/v1/poddisruptionbudgets', 'GET', path_params, @@ -942,13 +1194,14 @@ def list_pod_disruption_budget_for_all_namespaces_with_http_info(self, **kwargs) body=body_params, post_params=form_params, files=local_var_files, - response_type='V1PodDisruptionBudgetList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_namespaced_pod_disruption_budget(self, name, namespace, body, **kwargs): # noqa: E501 """patch_namespaced_pod_disruption_budget # noqa: E501 @@ -956,28 +1209,40 @@ def patch_namespaced_pod_disruption_budget(self, name, namespace, body, **kwargs partially update the specified PodDisruptionBudget # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_pod_disruption_budget(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PodDisruptionBudget (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the PodDisruptionBudget (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1PodDisruptionBudget + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1PodDisruptionBudget """ kwargs['_return_http_data_only'] = True return self.patch_namespaced_pod_disruption_budget_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -988,30 +1253,48 @@ def patch_namespaced_pod_disruption_budget_with_http_info(self, name, namespace, partially update the specified PodDisruptionBudget # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_pod_disruption_budget_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PodDisruptionBudget (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the PodDisruptionBudget (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1PodDisruptionBudget, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1PodDisruptionBudget, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1031,7 +1314,10 @@ def patch_namespaced_pod_disruption_budget_with_http_info(self, name, namespace, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1044,16 +1330,13 @@ def patch_namespaced_pod_disruption_budget_with_http_info(self, name, namespace, local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_pod_disruption_budget`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_pod_disruption_budget`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_pod_disruption_budget`") # noqa: E501 collection_formats = {} @@ -1065,18 +1348,18 @@ def patch_namespaced_pod_disruption_budget_with_http_info(self, name, namespace, path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1086,15 +1369,25 @@ def patch_namespaced_pod_disruption_budget_with_http_info(self, name, namespace, body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1PodDisruptionBudget", + 201: "V1PodDisruptionBudget", + 401: None, + } + return self.api_client.call_api( '/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}', 'PATCH', path_params, @@ -1103,13 +1396,14 @@ def patch_namespaced_pod_disruption_budget_with_http_info(self, name, namespace, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1PodDisruptionBudget', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_namespaced_pod_disruption_budget_status(self, name, namespace, body, **kwargs): # noqa: E501 """patch_namespaced_pod_disruption_budget_status # noqa: E501 @@ -1117,28 +1411,40 @@ def patch_namespaced_pod_disruption_budget_status(self, name, namespace, body, * partially update status of the specified PodDisruptionBudget # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_pod_disruption_budget_status(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PodDisruptionBudget (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the PodDisruptionBudget (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1PodDisruptionBudget + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1PodDisruptionBudget """ kwargs['_return_http_data_only'] = True return self.patch_namespaced_pod_disruption_budget_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -1149,30 +1455,48 @@ def patch_namespaced_pod_disruption_budget_status_with_http_info(self, name, nam partially update status of the specified PodDisruptionBudget # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_pod_disruption_budget_status_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PodDisruptionBudget (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the PodDisruptionBudget (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1PodDisruptionBudget, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1PodDisruptionBudget, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1192,7 +1516,10 @@ def patch_namespaced_pod_disruption_budget_status_with_http_info(self, name, nam 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1205,16 +1532,13 @@ def patch_namespaced_pod_disruption_budget_status_with_http_info(self, name, nam local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_pod_disruption_budget_status`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_pod_disruption_budget_status`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_pod_disruption_budget_status`") # noqa: E501 collection_formats = {} @@ -1226,18 +1550,18 @@ def patch_namespaced_pod_disruption_budget_status_with_http_info(self, name, nam path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1247,15 +1571,25 @@ def patch_namespaced_pod_disruption_budget_status_with_http_info(self, name, nam body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1PodDisruptionBudget", + 201: "V1PodDisruptionBudget", + 401: None, + } + return self.api_client.call_api( '/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}/status', 'PATCH', path_params, @@ -1264,13 +1598,14 @@ def patch_namespaced_pod_disruption_budget_status_with_http_info(self, name, nam body=body_params, post_params=form_params, files=local_var_files, - response_type='V1PodDisruptionBudget', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_namespaced_pod_disruption_budget(self, name, namespace, **kwargs): # noqa: E501 """read_namespaced_pod_disruption_budget # noqa: E501 @@ -1278,23 +1613,30 @@ def read_namespaced_pod_disruption_budget(self, name, namespace, **kwargs): # n read the specified PodDisruptionBudget # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_pod_disruption_budget(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PodDisruptionBudget (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the PodDisruptionBudget (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1PodDisruptionBudget + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1PodDisruptionBudget """ kwargs['_return_http_data_only'] = True return self.read_namespaced_pod_disruption_budget_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -1305,25 +1647,38 @@ def read_namespaced_pod_disruption_budget_with_http_info(self, name, namespace, read the specified PodDisruptionBudget # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_pod_disruption_budget_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PodDisruptionBudget (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the PodDisruptionBudget (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1PodDisruptionBudget, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1PodDisruptionBudget, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1338,7 +1693,10 @@ def read_namespaced_pod_disruption_budget_with_http_info(self, name, namespace, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1351,12 +1709,10 @@ def read_namespaced_pod_disruption_budget_with_http_info(self, name, namespace, local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_pod_disruption_budget`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_pod_disruption_budget`") # noqa: E501 collection_formats = {} @@ -1368,10 +1724,10 @@ def read_namespaced_pod_disruption_budget_with_http_info(self, name, namespace, path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1379,11 +1735,16 @@ def read_namespaced_pod_disruption_budget_with_http_info(self, name, namespace, body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1PodDisruptionBudget", + 401: None, + } + return self.api_client.call_api( '/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}', 'GET', path_params, @@ -1392,13 +1753,14 @@ def read_namespaced_pod_disruption_budget_with_http_info(self, name, namespace, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1PodDisruptionBudget', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_namespaced_pod_disruption_budget_status(self, name, namespace, **kwargs): # noqa: E501 """read_namespaced_pod_disruption_budget_status # noqa: E501 @@ -1406,23 +1768,30 @@ def read_namespaced_pod_disruption_budget_status(self, name, namespace, **kwargs read status of the specified PodDisruptionBudget # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_pod_disruption_budget_status(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PodDisruptionBudget (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the PodDisruptionBudget (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1PodDisruptionBudget + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1PodDisruptionBudget """ kwargs['_return_http_data_only'] = True return self.read_namespaced_pod_disruption_budget_status_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -1433,25 +1802,38 @@ def read_namespaced_pod_disruption_budget_status_with_http_info(self, name, name read status of the specified PodDisruptionBudget # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_pod_disruption_budget_status_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PodDisruptionBudget (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the PodDisruptionBudget (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1PodDisruptionBudget, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1PodDisruptionBudget, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1466,7 +1848,10 @@ def read_namespaced_pod_disruption_budget_status_with_http_info(self, name, name 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1479,12 +1864,10 @@ def read_namespaced_pod_disruption_budget_status_with_http_info(self, name, name local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_pod_disruption_budget_status`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_pod_disruption_budget_status`") # noqa: E501 collection_formats = {} @@ -1496,10 +1879,10 @@ def read_namespaced_pod_disruption_budget_status_with_http_info(self, name, name path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1507,11 +1890,16 @@ def read_namespaced_pod_disruption_budget_status_with_http_info(self, name, name body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1PodDisruptionBudget", + 401: None, + } + return self.api_client.call_api( '/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}/status', 'GET', path_params, @@ -1520,13 +1908,14 @@ def read_namespaced_pod_disruption_budget_status_with_http_info(self, name, name body=body_params, post_params=form_params, files=local_var_files, - response_type='V1PodDisruptionBudget', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_namespaced_pod_disruption_budget(self, name, namespace, body, **kwargs): # noqa: E501 """replace_namespaced_pod_disruption_budget # noqa: E501 @@ -1534,27 +1923,38 @@ def replace_namespaced_pod_disruption_budget(self, name, namespace, body, **kwar replace the specified PodDisruptionBudget # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_pod_disruption_budget(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PodDisruptionBudget (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1PodDisruptionBudget body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the PodDisruptionBudget (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1PodDisruptionBudget + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1PodDisruptionBudget + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1PodDisruptionBudget """ kwargs['_return_http_data_only'] = True return self.replace_namespaced_pod_disruption_budget_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -1565,29 +1965,46 @@ def replace_namespaced_pod_disruption_budget_with_http_info(self, name, namespac replace the specified PodDisruptionBudget # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_pod_disruption_budget_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PodDisruptionBudget (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1PodDisruptionBudget body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the PodDisruptionBudget (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1PodDisruptionBudget + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1PodDisruptionBudget, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1PodDisruptionBudget, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1606,7 +2023,10 @@ def replace_namespaced_pod_disruption_budget_with_http_info(self, name, namespac 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1619,16 +2039,13 @@ def replace_namespaced_pod_disruption_budget_with_http_info(self, name, namespac local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_pod_disruption_budget`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_pod_disruption_budget`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_pod_disruption_budget`") # noqa: E501 collection_formats = {} @@ -1640,16 +2057,16 @@ def replace_namespaced_pod_disruption_budget_with_http_info(self, name, namespac path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1659,11 +2076,17 @@ def replace_namespaced_pod_disruption_budget_with_http_info(self, name, namespac body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1PodDisruptionBudget", + 201: "V1PodDisruptionBudget", + 401: None, + } + return self.api_client.call_api( '/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}', 'PUT', path_params, @@ -1672,13 +2095,14 @@ def replace_namespaced_pod_disruption_budget_with_http_info(self, name, namespac body=body_params, post_params=form_params, files=local_var_files, - response_type='V1PodDisruptionBudget', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_namespaced_pod_disruption_budget_status(self, name, namespace, body, **kwargs): # noqa: E501 """replace_namespaced_pod_disruption_budget_status # noqa: E501 @@ -1686,27 +2110,38 @@ def replace_namespaced_pod_disruption_budget_status(self, name, namespace, body, replace status of the specified PodDisruptionBudget # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_pod_disruption_budget_status(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PodDisruptionBudget (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1PodDisruptionBudget body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the PodDisruptionBudget (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1PodDisruptionBudget + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1PodDisruptionBudget + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1PodDisruptionBudget """ kwargs['_return_http_data_only'] = True return self.replace_namespaced_pod_disruption_budget_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -1717,29 +2152,46 @@ def replace_namespaced_pod_disruption_budget_status_with_http_info(self, name, n replace status of the specified PodDisruptionBudget # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_pod_disruption_budget_status_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PodDisruptionBudget (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1PodDisruptionBudget body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the PodDisruptionBudget (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1PodDisruptionBudget + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1PodDisruptionBudget, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1PodDisruptionBudget, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1758,7 +2210,10 @@ def replace_namespaced_pod_disruption_budget_status_with_http_info(self, name, n 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1771,16 +2226,13 @@ def replace_namespaced_pod_disruption_budget_status_with_http_info(self, name, n local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_pod_disruption_budget_status`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_pod_disruption_budget_status`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_pod_disruption_budget_status`") # noqa: E501 collection_formats = {} @@ -1792,16 +2244,16 @@ def replace_namespaced_pod_disruption_budget_status_with_http_info(self, name, n path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1811,11 +2263,17 @@ def replace_namespaced_pod_disruption_budget_status_with_http_info(self, name, n body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1PodDisruptionBudget", + 201: "V1PodDisruptionBudget", + 401: None, + } + return self.api_client.call_api( '/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}/status', 'PUT', path_params, @@ -1824,10 +2282,11 @@ def replace_namespaced_pod_disruption_budget_status_with_http_info(self, name, n body=body_params, post_params=form_params, files=local_var_files, - response_type='V1PodDisruptionBudget', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) diff --git a/kubernetes/client/api/rbac_authorization_api.py b/kubernetes/client/api/rbac_authorization_api.py index 31c9d06f3e..ed13d6c938 100644 --- a/kubernetes/client/api/rbac_authorization_api.py +++ b/kubernetes/client/api/rbac_authorization_api.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ @@ -42,20 +42,24 @@ def get_api_group(self, **kwargs): # noqa: E501 get information of a group # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_group(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1APIGroup + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1APIGroup """ kwargs['_return_http_data_only'] = True return self.get_api_group_with_http_info(**kwargs) # noqa: E501 @@ -66,22 +70,32 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 get information of a group # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_group_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1APIGroup, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1APIGroup, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -93,7 +107,10 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -112,7 +129,7 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -125,6 +142,11 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1APIGroup", + 401: None, + } + return self.api_client.call_api( '/apis/rbac.authorization.k8s.io/', 'GET', path_params, @@ -133,10 +155,11 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1APIGroup', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) diff --git a/kubernetes/client/api/rbac_authorization_v1_api.py b/kubernetes/client/api/rbac_authorization_v1_api.py index ab40b4accb..74dfb4b711 100644 --- a/kubernetes/client/api/rbac_authorization_v1_api.py +++ b/kubernetes/client/api/rbac_authorization_v1_api.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ @@ -42,25 +42,34 @@ def create_cluster_role(self, body, **kwargs): # noqa: E501 create a ClusterRole # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_cluster_role(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param V1ClusterRole body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param body: (required) + :type body: V1ClusterRole + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ClusterRole + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ClusterRole """ kwargs['_return_http_data_only'] = True return self.create_cluster_role_with_http_info(body, **kwargs) # noqa: E501 @@ -71,27 +80,42 @@ def create_cluster_role_with_http_info(self, body, **kwargs): # noqa: E501 create a ClusterRole # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_cluster_role_with_http_info(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param V1ClusterRole body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param body: (required) + :type body: V1ClusterRole + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ClusterRole, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ClusterRole, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -108,7 +132,10 @@ def create_cluster_role_with_http_info(self, body, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -121,8 +148,7 @@ def create_cluster_role_with_http_info(self, body, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_cluster_role`") # noqa: E501 collection_formats = {} @@ -130,16 +156,16 @@ def create_cluster_role_with_http_info(self, body, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -149,11 +175,18 @@ def create_cluster_role_with_http_info(self, body, **kwargs): # noqa: E501 body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ClusterRole", + 201: "V1ClusterRole", + 202: "V1ClusterRole", + 401: None, + } + return self.api_client.call_api( '/apis/rbac.authorization.k8s.io/v1/clusterroles', 'POST', path_params, @@ -162,13 +195,14 @@ def create_cluster_role_with_http_info(self, body, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ClusterRole', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def create_cluster_role_binding(self, body, **kwargs): # noqa: E501 """create_cluster_role_binding # noqa: E501 @@ -176,25 +210,34 @@ def create_cluster_role_binding(self, body, **kwargs): # noqa: E501 create a ClusterRoleBinding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_cluster_role_binding(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param V1ClusterRoleBinding body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param body: (required) + :type body: V1ClusterRoleBinding + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ClusterRoleBinding + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ClusterRoleBinding """ kwargs['_return_http_data_only'] = True return self.create_cluster_role_binding_with_http_info(body, **kwargs) # noqa: E501 @@ -205,27 +248,42 @@ def create_cluster_role_binding_with_http_info(self, body, **kwargs): # noqa: E create a ClusterRoleBinding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_cluster_role_binding_with_http_info(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param V1ClusterRoleBinding body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param body: (required) + :type body: V1ClusterRoleBinding + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ClusterRoleBinding, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ClusterRoleBinding, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -242,7 +300,10 @@ def create_cluster_role_binding_with_http_info(self, body, **kwargs): # noqa: E 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -255,8 +316,7 @@ def create_cluster_role_binding_with_http_info(self, body, **kwargs): # noqa: E local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_cluster_role_binding`") # noqa: E501 collection_formats = {} @@ -264,16 +324,16 @@ def create_cluster_role_binding_with_http_info(self, body, **kwargs): # noqa: E path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -283,11 +343,18 @@ def create_cluster_role_binding_with_http_info(self, body, **kwargs): # noqa: E body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ClusterRoleBinding", + 201: "V1ClusterRoleBinding", + 202: "V1ClusterRoleBinding", + 401: None, + } + return self.api_client.call_api( '/apis/rbac.authorization.k8s.io/v1/clusterrolebindings', 'POST', path_params, @@ -296,13 +363,14 @@ def create_cluster_role_binding_with_http_info(self, body, **kwargs): # noqa: E body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ClusterRoleBinding', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def create_namespaced_role(self, namespace, body, **kwargs): # noqa: E501 """create_namespaced_role # noqa: E501 @@ -310,26 +378,36 @@ def create_namespaced_role(self, namespace, body, **kwargs): # noqa: E501 create a Role # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_namespaced_role(namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1Role body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1Role + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Role + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Role """ kwargs['_return_http_data_only'] = True return self.create_namespaced_role_with_http_info(namespace, body, **kwargs) # noqa: E501 @@ -340,28 +418,44 @@ def create_namespaced_role_with_http_info(self, namespace, body, **kwargs): # n create a Role # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_namespaced_role_with_http_info(namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1Role body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1Role + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Role, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Role, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -379,7 +473,10 @@ def create_namespaced_role_with_http_info(self, namespace, body, **kwargs): # n 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -392,12 +489,10 @@ def create_namespaced_role_with_http_info(self, namespace, body, **kwargs): # n local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_role`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_role`") # noqa: E501 collection_formats = {} @@ -407,16 +502,16 @@ def create_namespaced_role_with_http_info(self, namespace, body, **kwargs): # n path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -426,11 +521,18 @@ def create_namespaced_role_with_http_info(self, namespace, body, **kwargs): # n body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Role", + 201: "V1Role", + 202: "V1Role", + 401: None, + } + return self.api_client.call_api( '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles', 'POST', path_params, @@ -439,13 +541,14 @@ def create_namespaced_role_with_http_info(self, namespace, body, **kwargs): # n body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Role', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def create_namespaced_role_binding(self, namespace, body, **kwargs): # noqa: E501 """create_namespaced_role_binding # noqa: E501 @@ -453,26 +556,36 @@ def create_namespaced_role_binding(self, namespace, body, **kwargs): # noqa: E5 create a RoleBinding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_namespaced_role_binding(namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1RoleBinding body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1RoleBinding + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1RoleBinding + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1RoleBinding """ kwargs['_return_http_data_only'] = True return self.create_namespaced_role_binding_with_http_info(namespace, body, **kwargs) # noqa: E501 @@ -483,28 +596,44 @@ def create_namespaced_role_binding_with_http_info(self, namespace, body, **kwarg create a RoleBinding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_namespaced_role_binding_with_http_info(namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1RoleBinding body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1RoleBinding + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1RoleBinding, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1RoleBinding, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -522,7 +651,10 @@ def create_namespaced_role_binding_with_http_info(self, namespace, body, **kwarg 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -535,12 +667,10 @@ def create_namespaced_role_binding_with_http_info(self, namespace, body, **kwarg local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_role_binding`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_role_binding`") # noqa: E501 collection_formats = {} @@ -550,16 +680,16 @@ def create_namespaced_role_binding_with_http_info(self, namespace, body, **kwarg path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -569,11 +699,18 @@ def create_namespaced_role_binding_with_http_info(self, namespace, body, **kwarg body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1RoleBinding", + 201: "V1RoleBinding", + 202: "V1RoleBinding", + 401: None, + } + return self.api_client.call_api( '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings', 'POST', path_params, @@ -582,13 +719,14 @@ def create_namespaced_role_binding_with_http_info(self, namespace, body, **kwarg body=body_params, post_params=form_params, files=local_var_files, - response_type='V1RoleBinding', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_cluster_role(self, name, **kwargs): # noqa: E501 """delete_cluster_role # noqa: E501 @@ -596,27 +734,40 @@ def delete_cluster_role(self, name, **kwargs): # noqa: E501 delete a ClusterRole # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_cluster_role(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ClusterRole (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the ClusterRole (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_cluster_role_with_http_info(name, **kwargs) # noqa: E501 @@ -627,29 +778,48 @@ def delete_cluster_role_with_http_info(self, name, **kwargs): # noqa: E501 delete a ClusterRole # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_cluster_role_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ClusterRole (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the ClusterRole (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -659,6 +829,7 @@ def delete_cluster_role_with_http_info(self, name, **kwargs): # noqa: E501 'pretty', 'dry_run', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'orphan_dependents', 'propagation_policy', 'body' @@ -668,7 +839,10 @@ def delete_cluster_role_with_http_info(self, name, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -681,8 +855,7 @@ def delete_cluster_role_with_http_info(self, name, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `delete_cluster_role`") # noqa: E501 collection_formats = {} @@ -692,18 +865,20 @@ def delete_cluster_role_with_http_info(self, name, **kwargs): # noqa: E501 path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -713,11 +888,17 @@ def delete_cluster_role_with_http_info(self, name, **kwargs): # noqa: E501 body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 202: "V1Status", + 401: None, + } + return self.api_client.call_api( '/apis/rbac.authorization.k8s.io/v1/clusterroles/{name}', 'DELETE', path_params, @@ -726,13 +907,14 @@ def delete_cluster_role_with_http_info(self, name, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_cluster_role_binding(self, name, **kwargs): # noqa: E501 """delete_cluster_role_binding # noqa: E501 @@ -740,27 +922,40 @@ def delete_cluster_role_binding(self, name, **kwargs): # noqa: E501 delete a ClusterRoleBinding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_cluster_role_binding(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ClusterRoleBinding (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the ClusterRoleBinding (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_cluster_role_binding_with_http_info(name, **kwargs) # noqa: E501 @@ -771,29 +966,48 @@ def delete_cluster_role_binding_with_http_info(self, name, **kwargs): # noqa: E delete a ClusterRoleBinding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_cluster_role_binding_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ClusterRoleBinding (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the ClusterRoleBinding (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -803,6 +1017,7 @@ def delete_cluster_role_binding_with_http_info(self, name, **kwargs): # noqa: E 'pretty', 'dry_run', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'orphan_dependents', 'propagation_policy', 'body' @@ -812,7 +1027,10 @@ def delete_cluster_role_binding_with_http_info(self, name, **kwargs): # noqa: E 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -825,8 +1043,7 @@ def delete_cluster_role_binding_with_http_info(self, name, **kwargs): # noqa: E local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `delete_cluster_role_binding`") # noqa: E501 collection_formats = {} @@ -836,18 +1053,20 @@ def delete_cluster_role_binding_with_http_info(self, name, **kwargs): # noqa: E path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -857,11 +1076,17 @@ def delete_cluster_role_binding_with_http_info(self, name, **kwargs): # noqa: E body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 202: "V1Status", + 401: None, + } + return self.api_client.call_api( '/apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}', 'DELETE', path_params, @@ -870,13 +1095,14 @@ def delete_cluster_role_binding_with_http_info(self, name, **kwargs): # noqa: E body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_collection_cluster_role(self, **kwargs): # noqa: E501 """delete_collection_cluster_role # noqa: E501 @@ -884,34 +1110,54 @@ def delete_collection_cluster_role(self, **kwargs): # noqa: E501 delete collection of ClusterRole # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_cluster_role(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_collection_cluster_role_with_http_info(**kwargs) # noqa: E501 @@ -922,36 +1168,62 @@ def delete_collection_cluster_role_with_http_info(self, **kwargs): # noqa: E501 delete collection of ClusterRole # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_cluster_role_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -962,6 +1234,7 @@ def delete_collection_cluster_role_with_http_info(self, **kwargs): # noqa: E501 'dry_run', 'field_selector', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'label_selector', 'limit', 'orphan_dependents', @@ -977,7 +1250,10 @@ def delete_collection_cluster_role_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -995,34 +1271,36 @@ def delete_collection_cluster_role_with_http_info(self, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1032,11 +1310,16 @@ def delete_collection_cluster_role_with_http_info(self, **kwargs): # noqa: E501 body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 401: None, + } + return self.api_client.call_api( '/apis/rbac.authorization.k8s.io/v1/clusterroles', 'DELETE', path_params, @@ -1045,13 +1328,14 @@ def delete_collection_cluster_role_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_collection_cluster_role_binding(self, **kwargs): # noqa: E501 """delete_collection_cluster_role_binding # noqa: E501 @@ -1059,34 +1343,54 @@ def delete_collection_cluster_role_binding(self, **kwargs): # noqa: E501 delete collection of ClusterRoleBinding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_cluster_role_binding(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_collection_cluster_role_binding_with_http_info(**kwargs) # noqa: E501 @@ -1097,36 +1401,62 @@ def delete_collection_cluster_role_binding_with_http_info(self, **kwargs): # no delete collection of ClusterRoleBinding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_cluster_role_binding_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1137,6 +1467,7 @@ def delete_collection_cluster_role_binding_with_http_info(self, **kwargs): # no 'dry_run', 'field_selector', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'label_selector', 'limit', 'orphan_dependents', @@ -1152,7 +1483,10 @@ def delete_collection_cluster_role_binding_with_http_info(self, **kwargs): # no 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1170,34 +1504,36 @@ def delete_collection_cluster_role_binding_with_http_info(self, **kwargs): # no path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1207,11 +1543,16 @@ def delete_collection_cluster_role_binding_with_http_info(self, **kwargs): # no body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 401: None, + } + return self.api_client.call_api( '/apis/rbac.authorization.k8s.io/v1/clusterrolebindings', 'DELETE', path_params, @@ -1220,13 +1561,14 @@ def delete_collection_cluster_role_binding_with_http_info(self, **kwargs): # no body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_collection_namespaced_role(self, namespace, **kwargs): # noqa: E501 """delete_collection_namespaced_role # noqa: E501 @@ -1234,35 +1576,56 @@ def delete_collection_namespaced_role(self, namespace, **kwargs): # noqa: E501 delete collection of Role # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_namespaced_role(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_collection_namespaced_role_with_http_info(namespace, **kwargs) # noqa: E501 @@ -1273,37 +1636,64 @@ def delete_collection_namespaced_role_with_http_info(self, namespace, **kwargs): delete collection of Role # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_namespaced_role_with_http_info(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1315,6 +1705,7 @@ def delete_collection_namespaced_role_with_http_info(self, namespace, **kwargs): 'dry_run', 'field_selector', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'label_selector', 'limit', 'orphan_dependents', @@ -1330,7 +1721,10 @@ def delete_collection_namespaced_role_with_http_info(self, namespace, **kwargs): 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1343,8 +1737,7 @@ def delete_collection_namespaced_role_with_http_info(self, namespace, **kwargs): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_role`") # noqa: E501 collection_formats = {} @@ -1354,34 +1747,36 @@ def delete_collection_namespaced_role_with_http_info(self, namespace, **kwargs): path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1391,11 +1786,16 @@ def delete_collection_namespaced_role_with_http_info(self, namespace, **kwargs): body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 401: None, + } + return self.api_client.call_api( '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles', 'DELETE', path_params, @@ -1404,13 +1804,14 @@ def delete_collection_namespaced_role_with_http_info(self, namespace, **kwargs): body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_collection_namespaced_role_binding(self, namespace, **kwargs): # noqa: E501 """delete_collection_namespaced_role_binding # noqa: E501 @@ -1418,35 +1819,56 @@ def delete_collection_namespaced_role_binding(self, namespace, **kwargs): # noq delete collection of RoleBinding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_namespaced_role_binding(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_collection_namespaced_role_binding_with_http_info(namespace, **kwargs) # noqa: E501 @@ -1457,37 +1879,64 @@ def delete_collection_namespaced_role_binding_with_http_info(self, namespace, ** delete collection of RoleBinding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_namespaced_role_binding_with_http_info(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1499,6 +1948,7 @@ def delete_collection_namespaced_role_binding_with_http_info(self, namespace, ** 'dry_run', 'field_selector', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'label_selector', 'limit', 'orphan_dependents', @@ -1514,7 +1964,10 @@ def delete_collection_namespaced_role_binding_with_http_info(self, namespace, ** 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1527,8 +1980,7 @@ def delete_collection_namespaced_role_binding_with_http_info(self, namespace, ** local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_role_binding`") # noqa: E501 collection_formats = {} @@ -1538,34 +1990,36 @@ def delete_collection_namespaced_role_binding_with_http_info(self, namespace, ** path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1575,11 +2029,16 @@ def delete_collection_namespaced_role_binding_with_http_info(self, namespace, ** body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 401: None, + } + return self.api_client.call_api( '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings', 'DELETE', path_params, @@ -1588,13 +2047,14 @@ def delete_collection_namespaced_role_binding_with_http_info(self, namespace, ** body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_namespaced_role(self, name, namespace, **kwargs): # noqa: E501 """delete_namespaced_role # noqa: E501 @@ -1602,28 +2062,42 @@ def delete_namespaced_role(self, name, namespace, **kwargs): # noqa: E501 delete a Role # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_namespaced_role(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Role (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the Role (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_namespaced_role_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -1634,30 +2108,50 @@ def delete_namespaced_role_with_http_info(self, name, namespace, **kwargs): # n delete a Role # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_namespaced_role_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Role (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the Role (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1668,6 +2162,7 @@ def delete_namespaced_role_with_http_info(self, name, namespace, **kwargs): # n 'pretty', 'dry_run', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'orphan_dependents', 'propagation_policy', 'body' @@ -1677,7 +2172,10 @@ def delete_namespaced_role_with_http_info(self, name, namespace, **kwargs): # n 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1690,12 +2188,10 @@ def delete_namespaced_role_with_http_info(self, name, namespace, **kwargs): # n local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_role`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_role`") # noqa: E501 collection_formats = {} @@ -1707,18 +2203,20 @@ def delete_namespaced_role_with_http_info(self, name, namespace, **kwargs): # n path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1728,11 +2226,17 @@ def delete_namespaced_role_with_http_info(self, name, namespace, **kwargs): # n body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 202: "V1Status", + 401: None, + } + return self.api_client.call_api( '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}', 'DELETE', path_params, @@ -1741,13 +2245,14 @@ def delete_namespaced_role_with_http_info(self, name, namespace, **kwargs): # n body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_namespaced_role_binding(self, name, namespace, **kwargs): # noqa: E501 """delete_namespaced_role_binding # noqa: E501 @@ -1755,28 +2260,42 @@ def delete_namespaced_role_binding(self, name, namespace, **kwargs): # noqa: E5 delete a RoleBinding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_namespaced_role_binding(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the RoleBinding (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the RoleBinding (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_namespaced_role_binding_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -1787,30 +2306,50 @@ def delete_namespaced_role_binding_with_http_info(self, name, namespace, **kwarg delete a RoleBinding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_namespaced_role_binding_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the RoleBinding (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the RoleBinding (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1821,6 +2360,7 @@ def delete_namespaced_role_binding_with_http_info(self, name, namespace, **kwarg 'pretty', 'dry_run', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'orphan_dependents', 'propagation_policy', 'body' @@ -1830,7 +2370,10 @@ def delete_namespaced_role_binding_with_http_info(self, name, namespace, **kwarg 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1843,12 +2386,10 @@ def delete_namespaced_role_binding_with_http_info(self, name, namespace, **kwarg local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_role_binding`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_role_binding`") # noqa: E501 collection_formats = {} @@ -1860,18 +2401,20 @@ def delete_namespaced_role_binding_with_http_info(self, name, namespace, **kwarg path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1881,11 +2424,17 @@ def delete_namespaced_role_binding_with_http_info(self, name, namespace, **kwarg body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 202: "V1Status", + 401: None, + } + return self.api_client.call_api( '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}', 'DELETE', path_params, @@ -1894,13 +2443,14 @@ def delete_namespaced_role_binding_with_http_info(self, name, namespace, **kwarg body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def get_api_resources(self, **kwargs): # noqa: E501 """get_api_resources # noqa: E501 @@ -1908,20 +2458,24 @@ def get_api_resources(self, **kwargs): # noqa: E501 get available resources # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_resources(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1APIResourceList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1APIResourceList """ kwargs['_return_http_data_only'] = True return self.get_api_resources_with_http_info(**kwargs) # noqa: E501 @@ -1932,22 +2486,32 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 get available resources # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_resources_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1959,7 +2523,10 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1978,7 +2545,7 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1986,11 +2553,16 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1APIResourceList", + 401: None, + } + return self.api_client.call_api( '/apis/rbac.authorization.k8s.io/v1/', 'GET', path_params, @@ -1999,13 +2571,14 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1APIResourceList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_cluster_role(self, **kwargs): # noqa: E501 """list_cluster_role # noqa: E501 @@ -2013,31 +2586,46 @@ def list_cluster_role(self, **kwargs): # noqa: E501 list or watch objects of kind ClusterRole # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_cluster_role(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ClusterRoleList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ClusterRoleList """ kwargs['_return_http_data_only'] = True return self.list_cluster_role_with_http_info(**kwargs) # noqa: E501 @@ -2048,33 +2636,54 @@ def list_cluster_role_with_http_info(self, **kwargs): # noqa: E501 list or watch objects of kind ClusterRole # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_cluster_role_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ClusterRoleList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ClusterRoleList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -2097,7 +2706,10 @@ def list_cluster_role_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2115,30 +2727,30 @@ def list_cluster_role_with_http_info(self, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2146,11 +2758,16 @@ def list_cluster_role_with_http_info(self, **kwargs): # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ClusterRoleList", + 401: None, + } + return self.api_client.call_api( '/apis/rbac.authorization.k8s.io/v1/clusterroles', 'GET', path_params, @@ -2159,13 +2776,14 @@ def list_cluster_role_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ClusterRoleList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_cluster_role_binding(self, **kwargs): # noqa: E501 """list_cluster_role_binding # noqa: E501 @@ -2173,31 +2791,46 @@ def list_cluster_role_binding(self, **kwargs): # noqa: E501 list or watch objects of kind ClusterRoleBinding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_cluster_role_binding(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ClusterRoleBindingList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ClusterRoleBindingList """ kwargs['_return_http_data_only'] = True return self.list_cluster_role_binding_with_http_info(**kwargs) # noqa: E501 @@ -2208,33 +2841,54 @@ def list_cluster_role_binding_with_http_info(self, **kwargs): # noqa: E501 list or watch objects of kind ClusterRoleBinding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_cluster_role_binding_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ClusterRoleBindingList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ClusterRoleBindingList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -2257,7 +2911,10 @@ def list_cluster_role_binding_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2275,30 +2932,30 @@ def list_cluster_role_binding_with_http_info(self, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2306,11 +2963,16 @@ def list_cluster_role_binding_with_http_info(self, **kwargs): # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ClusterRoleBindingList", + 401: None, + } + return self.api_client.call_api( '/apis/rbac.authorization.k8s.io/v1/clusterrolebindings', 'GET', path_params, @@ -2319,13 +2981,14 @@ def list_cluster_role_binding_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ClusterRoleBindingList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_namespaced_role(self, namespace, **kwargs): # noqa: E501 """list_namespaced_role # noqa: E501 @@ -2333,32 +2996,48 @@ def list_namespaced_role(self, namespace, **kwargs): # noqa: E501 list or watch objects of kind Role # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_namespaced_role(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1RoleList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1RoleList """ kwargs['_return_http_data_only'] = True return self.list_namespaced_role_with_http_info(namespace, **kwargs) # noqa: E501 @@ -2369,34 +3048,56 @@ def list_namespaced_role_with_http_info(self, namespace, **kwargs): # noqa: E50 list or watch objects of kind Role # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_namespaced_role_with_http_info(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1RoleList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1RoleList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -2420,7 +3121,10 @@ def list_namespaced_role_with_http_info(self, namespace, **kwargs): # noqa: E50 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2433,8 +3137,7 @@ def list_namespaced_role_with_http_info(self, namespace, **kwargs): # noqa: E50 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_role`") # noqa: E501 collection_formats = {} @@ -2444,30 +3147,30 @@ def list_namespaced_role_with_http_info(self, namespace, **kwargs): # noqa: E50 path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2475,11 +3178,16 @@ def list_namespaced_role_with_http_info(self, namespace, **kwargs): # noqa: E50 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1RoleList", + 401: None, + } + return self.api_client.call_api( '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles', 'GET', path_params, @@ -2488,13 +3196,14 @@ def list_namespaced_role_with_http_info(self, namespace, **kwargs): # noqa: E50 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1RoleList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_namespaced_role_binding(self, namespace, **kwargs): # noqa: E501 """list_namespaced_role_binding # noqa: E501 @@ -2502,32 +3211,48 @@ def list_namespaced_role_binding(self, namespace, **kwargs): # noqa: E501 list or watch objects of kind RoleBinding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_namespaced_role_binding(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1RoleBindingList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1RoleBindingList """ kwargs['_return_http_data_only'] = True return self.list_namespaced_role_binding_with_http_info(namespace, **kwargs) # noqa: E501 @@ -2538,34 +3263,56 @@ def list_namespaced_role_binding_with_http_info(self, namespace, **kwargs): # n list or watch objects of kind RoleBinding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_namespaced_role_binding_with_http_info(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1RoleBindingList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1RoleBindingList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -2589,7 +3336,10 @@ def list_namespaced_role_binding_with_http_info(self, namespace, **kwargs): # n 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2602,8 +3352,7 @@ def list_namespaced_role_binding_with_http_info(self, namespace, **kwargs): # n local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_role_binding`") # noqa: E501 collection_formats = {} @@ -2613,30 +3362,30 @@ def list_namespaced_role_binding_with_http_info(self, namespace, **kwargs): # n path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2644,11 +3393,16 @@ def list_namespaced_role_binding_with_http_info(self, namespace, **kwargs): # n body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1RoleBindingList", + 401: None, + } + return self.api_client.call_api( '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings', 'GET', path_params, @@ -2657,13 +3411,14 @@ def list_namespaced_role_binding_with_http_info(self, namespace, **kwargs): # n body=body_params, post_params=form_params, files=local_var_files, - response_type='V1RoleBindingList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_role_binding_for_all_namespaces(self, **kwargs): # noqa: E501 """list_role_binding_for_all_namespaces # noqa: E501 @@ -2671,31 +3426,46 @@ def list_role_binding_for_all_namespaces(self, **kwargs): # noqa: E501 list or watch objects of kind RoleBinding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_role_binding_for_all_namespaces(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1RoleBindingList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1RoleBindingList """ kwargs['_return_http_data_only'] = True return self.list_role_binding_for_all_namespaces_with_http_info(**kwargs) # noqa: E501 @@ -2706,33 +3476,54 @@ def list_role_binding_for_all_namespaces_with_http_info(self, **kwargs): # noqa list or watch objects of kind RoleBinding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_role_binding_for_all_namespaces_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1RoleBindingList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1RoleBindingList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -2755,7 +3546,10 @@ def list_role_binding_for_all_namespaces_with_http_info(self, **kwargs): # noqa 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2773,30 +3567,30 @@ def list_role_binding_for_all_namespaces_with_http_info(self, **kwargs): # noqa path_params = {} query_params = [] - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2804,11 +3598,16 @@ def list_role_binding_for_all_namespaces_with_http_info(self, **kwargs): # noqa body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1RoleBindingList", + 401: None, + } + return self.api_client.call_api( '/apis/rbac.authorization.k8s.io/v1/rolebindings', 'GET', path_params, @@ -2817,13 +3616,14 @@ def list_role_binding_for_all_namespaces_with_http_info(self, **kwargs): # noqa body=body_params, post_params=form_params, files=local_var_files, - response_type='V1RoleBindingList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_role_for_all_namespaces(self, **kwargs): # noqa: E501 """list_role_for_all_namespaces # noqa: E501 @@ -2831,31 +3631,46 @@ def list_role_for_all_namespaces(self, **kwargs): # noqa: E501 list or watch objects of kind Role # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_role_for_all_namespaces(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1RoleList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1RoleList """ kwargs['_return_http_data_only'] = True return self.list_role_for_all_namespaces_with_http_info(**kwargs) # noqa: E501 @@ -2866,33 +3681,54 @@ def list_role_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501 list or watch objects of kind Role # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_role_for_all_namespaces_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1RoleList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1RoleList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -2915,7 +3751,10 @@ def list_role_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2933,30 +3772,30 @@ def list_role_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2964,11 +3803,16 @@ def list_role_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1RoleList", + 401: None, + } + return self.api_client.call_api( '/apis/rbac.authorization.k8s.io/v1/roles', 'GET', path_params, @@ -2977,13 +3821,14 @@ def list_role_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1RoleList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_cluster_role(self, name, body, **kwargs): # noqa: E501 """patch_cluster_role # noqa: E501 @@ -2991,27 +3836,38 @@ def patch_cluster_role(self, name, body, **kwargs): # noqa: E501 partially update the specified ClusterRole # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_cluster_role(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ClusterRole (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the ClusterRole (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ClusterRole + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ClusterRole """ kwargs['_return_http_data_only'] = True return self.patch_cluster_role_with_http_info(name, body, **kwargs) # noqa: E501 @@ -3022,29 +3878,46 @@ def patch_cluster_role_with_http_info(self, name, body, **kwargs): # noqa: E501 partially update the specified ClusterRole # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_cluster_role_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ClusterRole (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the ClusterRole (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ClusterRole, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ClusterRole, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -3063,7 +3936,10 @@ def patch_cluster_role_with_http_info(self, name, body, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -3076,12 +3952,10 @@ def patch_cluster_role_with_http_info(self, name, body, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_cluster_role`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_cluster_role`") # noqa: E501 collection_formats = {} @@ -3091,18 +3965,18 @@ def patch_cluster_role_with_http_info(self, name, body, **kwargs): # noqa: E501 path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -3112,15 +3986,25 @@ def patch_cluster_role_with_http_info(self, name, body, **kwargs): # noqa: E501 body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ClusterRole", + 201: "V1ClusterRole", + 401: None, + } + return self.api_client.call_api( '/apis/rbac.authorization.k8s.io/v1/clusterroles/{name}', 'PATCH', path_params, @@ -3129,13 +4013,14 @@ def patch_cluster_role_with_http_info(self, name, body, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ClusterRole', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_cluster_role_binding(self, name, body, **kwargs): # noqa: E501 """patch_cluster_role_binding # noqa: E501 @@ -3143,27 +4028,38 @@ def patch_cluster_role_binding(self, name, body, **kwargs): # noqa: E501 partially update the specified ClusterRoleBinding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_cluster_role_binding(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ClusterRoleBinding (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the ClusterRoleBinding (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ClusterRoleBinding + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ClusterRoleBinding """ kwargs['_return_http_data_only'] = True return self.patch_cluster_role_binding_with_http_info(name, body, **kwargs) # noqa: E501 @@ -3174,29 +4070,46 @@ def patch_cluster_role_binding_with_http_info(self, name, body, **kwargs): # no partially update the specified ClusterRoleBinding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_cluster_role_binding_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ClusterRoleBinding (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the ClusterRoleBinding (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ClusterRoleBinding, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ClusterRoleBinding, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -3215,7 +4128,10 @@ def patch_cluster_role_binding_with_http_info(self, name, body, **kwargs): # no 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -3228,12 +4144,10 @@ def patch_cluster_role_binding_with_http_info(self, name, body, **kwargs): # no local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_cluster_role_binding`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_cluster_role_binding`") # noqa: E501 collection_formats = {} @@ -3243,18 +4157,18 @@ def patch_cluster_role_binding_with_http_info(self, name, body, **kwargs): # no path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -3264,15 +4178,25 @@ def patch_cluster_role_binding_with_http_info(self, name, body, **kwargs): # no body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ClusterRoleBinding", + 201: "V1ClusterRoleBinding", + 401: None, + } + return self.api_client.call_api( '/apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}', 'PATCH', path_params, @@ -3281,13 +4205,14 @@ def patch_cluster_role_binding_with_http_info(self, name, body, **kwargs): # no body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ClusterRoleBinding', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_namespaced_role(self, name, namespace, body, **kwargs): # noqa: E501 """patch_namespaced_role # noqa: E501 @@ -3295,28 +4220,40 @@ def patch_namespaced_role(self, name, namespace, body, **kwargs): # noqa: E501 partially update the specified Role # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_role(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Role (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the Role (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Role + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Role """ kwargs['_return_http_data_only'] = True return self.patch_namespaced_role_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -3327,30 +4264,48 @@ def patch_namespaced_role_with_http_info(self, name, namespace, body, **kwargs): partially update the specified Role # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_role_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Role (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the Role (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Role, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Role, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -3370,7 +4325,10 @@ def patch_namespaced_role_with_http_info(self, name, namespace, body, **kwargs): 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -3383,16 +4341,13 @@ def patch_namespaced_role_with_http_info(self, name, namespace, body, **kwargs): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_role`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_role`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_role`") # noqa: E501 collection_formats = {} @@ -3404,18 +4359,18 @@ def patch_namespaced_role_with_http_info(self, name, namespace, body, **kwargs): path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -3425,15 +4380,25 @@ def patch_namespaced_role_with_http_info(self, name, namespace, body, **kwargs): body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Role", + 201: "V1Role", + 401: None, + } + return self.api_client.call_api( '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}', 'PATCH', path_params, @@ -3442,13 +4407,14 @@ def patch_namespaced_role_with_http_info(self, name, namespace, body, **kwargs): body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Role', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_namespaced_role_binding(self, name, namespace, body, **kwargs): # noqa: E501 """patch_namespaced_role_binding # noqa: E501 @@ -3456,28 +4422,40 @@ def patch_namespaced_role_binding(self, name, namespace, body, **kwargs): # noq partially update the specified RoleBinding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_role_binding(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the RoleBinding (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the RoleBinding (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1RoleBinding + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1RoleBinding """ kwargs['_return_http_data_only'] = True return self.patch_namespaced_role_binding_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -3488,30 +4466,48 @@ def patch_namespaced_role_binding_with_http_info(self, name, namespace, body, ** partially update the specified RoleBinding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_role_binding_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the RoleBinding (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the RoleBinding (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1RoleBinding, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1RoleBinding, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -3531,7 +4527,10 @@ def patch_namespaced_role_binding_with_http_info(self, name, namespace, body, ** 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -3544,16 +4543,13 @@ def patch_namespaced_role_binding_with_http_info(self, name, namespace, body, ** local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_role_binding`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_role_binding`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_role_binding`") # noqa: E501 collection_formats = {} @@ -3565,18 +4561,18 @@ def patch_namespaced_role_binding_with_http_info(self, name, namespace, body, ** path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -3586,15 +4582,25 @@ def patch_namespaced_role_binding_with_http_info(self, name, namespace, body, ** body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1RoleBinding", + 201: "V1RoleBinding", + 401: None, + } + return self.api_client.call_api( '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}', 'PATCH', path_params, @@ -3603,13 +4609,14 @@ def patch_namespaced_role_binding_with_http_info(self, name, namespace, body, ** body=body_params, post_params=form_params, files=local_var_files, - response_type='V1RoleBinding', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_cluster_role(self, name, **kwargs): # noqa: E501 """read_cluster_role # noqa: E501 @@ -3617,22 +4624,28 @@ def read_cluster_role(self, name, **kwargs): # noqa: E501 read the specified ClusterRole # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_cluster_role(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ClusterRole (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the ClusterRole (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ClusterRole + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ClusterRole """ kwargs['_return_http_data_only'] = True return self.read_cluster_role_with_http_info(name, **kwargs) # noqa: E501 @@ -3643,24 +4656,36 @@ def read_cluster_role_with_http_info(self, name, **kwargs): # noqa: E501 read the specified ClusterRole # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_cluster_role_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ClusterRole (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the ClusterRole (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ClusterRole, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ClusterRole, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -3674,7 +4699,10 @@ def read_cluster_role_with_http_info(self, name, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -3687,8 +4715,7 @@ def read_cluster_role_with_http_info(self, name, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_cluster_role`") # noqa: E501 collection_formats = {} @@ -3698,10 +4725,10 @@ def read_cluster_role_with_http_info(self, name, **kwargs): # noqa: E501 path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -3709,11 +4736,16 @@ def read_cluster_role_with_http_info(self, name, **kwargs): # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ClusterRole", + 401: None, + } + return self.api_client.call_api( '/apis/rbac.authorization.k8s.io/v1/clusterroles/{name}', 'GET', path_params, @@ -3722,13 +4754,14 @@ def read_cluster_role_with_http_info(self, name, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ClusterRole', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_cluster_role_binding(self, name, **kwargs): # noqa: E501 """read_cluster_role_binding # noqa: E501 @@ -3736,22 +4769,28 @@ def read_cluster_role_binding(self, name, **kwargs): # noqa: E501 read the specified ClusterRoleBinding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_cluster_role_binding(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ClusterRoleBinding (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the ClusterRoleBinding (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ClusterRoleBinding + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ClusterRoleBinding """ kwargs['_return_http_data_only'] = True return self.read_cluster_role_binding_with_http_info(name, **kwargs) # noqa: E501 @@ -3762,24 +4801,36 @@ def read_cluster_role_binding_with_http_info(self, name, **kwargs): # noqa: E50 read the specified ClusterRoleBinding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_cluster_role_binding_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ClusterRoleBinding (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the ClusterRoleBinding (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ClusterRoleBinding, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ClusterRoleBinding, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -3793,7 +4844,10 @@ def read_cluster_role_binding_with_http_info(self, name, **kwargs): # noqa: E50 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -3806,8 +4860,7 @@ def read_cluster_role_binding_with_http_info(self, name, **kwargs): # noqa: E50 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_cluster_role_binding`") # noqa: E501 collection_formats = {} @@ -3817,10 +4870,10 @@ def read_cluster_role_binding_with_http_info(self, name, **kwargs): # noqa: E50 path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -3828,11 +4881,16 @@ def read_cluster_role_binding_with_http_info(self, name, **kwargs): # noqa: E50 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ClusterRoleBinding", + 401: None, + } + return self.api_client.call_api( '/apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}', 'GET', path_params, @@ -3841,13 +4899,14 @@ def read_cluster_role_binding_with_http_info(self, name, **kwargs): # noqa: E50 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ClusterRoleBinding', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_namespaced_role(self, name, namespace, **kwargs): # noqa: E501 """read_namespaced_role # noqa: E501 @@ -3855,23 +4914,30 @@ def read_namespaced_role(self, name, namespace, **kwargs): # noqa: E501 read the specified Role # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_role(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Role (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the Role (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Role + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Role """ kwargs['_return_http_data_only'] = True return self.read_namespaced_role_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -3882,25 +4948,38 @@ def read_namespaced_role_with_http_info(self, name, namespace, **kwargs): # noq read the specified Role # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_role_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Role (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the Role (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Role, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Role, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -3915,7 +4994,10 @@ def read_namespaced_role_with_http_info(self, name, namespace, **kwargs): # noq 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -3928,12 +5010,10 @@ def read_namespaced_role_with_http_info(self, name, namespace, **kwargs): # noq local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_role`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_role`") # noqa: E501 collection_formats = {} @@ -3945,10 +5025,10 @@ def read_namespaced_role_with_http_info(self, name, namespace, **kwargs): # noq path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -3956,11 +5036,16 @@ def read_namespaced_role_with_http_info(self, name, namespace, **kwargs): # noq body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Role", + 401: None, + } + return self.api_client.call_api( '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}', 'GET', path_params, @@ -3969,13 +5054,14 @@ def read_namespaced_role_with_http_info(self, name, namespace, **kwargs): # noq body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Role', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_namespaced_role_binding(self, name, namespace, **kwargs): # noqa: E501 """read_namespaced_role_binding # noqa: E501 @@ -3983,23 +5069,30 @@ def read_namespaced_role_binding(self, name, namespace, **kwargs): # noqa: E501 read the specified RoleBinding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_role_binding(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the RoleBinding (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the RoleBinding (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1RoleBinding + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1RoleBinding """ kwargs['_return_http_data_only'] = True return self.read_namespaced_role_binding_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -4010,25 +5103,38 @@ def read_namespaced_role_binding_with_http_info(self, name, namespace, **kwargs) read the specified RoleBinding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_role_binding_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the RoleBinding (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the RoleBinding (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1RoleBinding, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1RoleBinding, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -4043,7 +5149,10 @@ def read_namespaced_role_binding_with_http_info(self, name, namespace, **kwargs) 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -4056,12 +5165,10 @@ def read_namespaced_role_binding_with_http_info(self, name, namespace, **kwargs) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_role_binding`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_role_binding`") # noqa: E501 collection_formats = {} @@ -4073,10 +5180,10 @@ def read_namespaced_role_binding_with_http_info(self, name, namespace, **kwargs) path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -4084,11 +5191,16 @@ def read_namespaced_role_binding_with_http_info(self, name, namespace, **kwargs) body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1RoleBinding", + 401: None, + } + return self.api_client.call_api( '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}', 'GET', path_params, @@ -4097,13 +5209,14 @@ def read_namespaced_role_binding_with_http_info(self, name, namespace, **kwargs) body=body_params, post_params=form_params, files=local_var_files, - response_type='V1RoleBinding', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_cluster_role(self, name, body, **kwargs): # noqa: E501 """replace_cluster_role # noqa: E501 @@ -4111,26 +5224,36 @@ def replace_cluster_role(self, name, body, **kwargs): # noqa: E501 replace the specified ClusterRole # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_cluster_role(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ClusterRole (required) - :param V1ClusterRole body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the ClusterRole (required) + :type name: str + :param body: (required) + :type body: V1ClusterRole + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ClusterRole + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ClusterRole """ kwargs['_return_http_data_only'] = True return self.replace_cluster_role_with_http_info(name, body, **kwargs) # noqa: E501 @@ -4141,28 +5264,44 @@ def replace_cluster_role_with_http_info(self, name, body, **kwargs): # noqa: E5 replace the specified ClusterRole # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_cluster_role_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ClusterRole (required) - :param V1ClusterRole body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the ClusterRole (required) + :type name: str + :param body: (required) + :type body: V1ClusterRole + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ClusterRole, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ClusterRole, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -4180,7 +5319,10 @@ def replace_cluster_role_with_http_info(self, name, body, **kwargs): # noqa: E5 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -4193,12 +5335,10 @@ def replace_cluster_role_with_http_info(self, name, body, **kwargs): # noqa: E5 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_cluster_role`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_cluster_role`") # noqa: E501 collection_formats = {} @@ -4208,16 +5348,16 @@ def replace_cluster_role_with_http_info(self, name, body, **kwargs): # noqa: E5 path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -4227,11 +5367,17 @@ def replace_cluster_role_with_http_info(self, name, body, **kwargs): # noqa: E5 body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ClusterRole", + 201: "V1ClusterRole", + 401: None, + } + return self.api_client.call_api( '/apis/rbac.authorization.k8s.io/v1/clusterroles/{name}', 'PUT', path_params, @@ -4240,13 +5386,14 @@ def replace_cluster_role_with_http_info(self, name, body, **kwargs): # noqa: E5 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ClusterRole', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_cluster_role_binding(self, name, body, **kwargs): # noqa: E501 """replace_cluster_role_binding # noqa: E501 @@ -4254,26 +5401,36 @@ def replace_cluster_role_binding(self, name, body, **kwargs): # noqa: E501 replace the specified ClusterRoleBinding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_cluster_role_binding(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ClusterRoleBinding (required) - :param V1ClusterRoleBinding body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the ClusterRoleBinding (required) + :type name: str + :param body: (required) + :type body: V1ClusterRoleBinding + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1ClusterRoleBinding + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1ClusterRoleBinding """ kwargs['_return_http_data_only'] = True return self.replace_cluster_role_binding_with_http_info(name, body, **kwargs) # noqa: E501 @@ -4284,28 +5441,44 @@ def replace_cluster_role_binding_with_http_info(self, name, body, **kwargs): # replace the specified ClusterRoleBinding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_cluster_role_binding_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ClusterRoleBinding (required) - :param V1ClusterRoleBinding body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the ClusterRoleBinding (required) + :type name: str + :param body: (required) + :type body: V1ClusterRoleBinding + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1ClusterRoleBinding, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1ClusterRoleBinding, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -4323,7 +5496,10 @@ def replace_cluster_role_binding_with_http_info(self, name, body, **kwargs): # 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -4336,12 +5512,10 @@ def replace_cluster_role_binding_with_http_info(self, name, body, **kwargs): # local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_cluster_role_binding`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_cluster_role_binding`") # noqa: E501 collection_formats = {} @@ -4351,16 +5525,16 @@ def replace_cluster_role_binding_with_http_info(self, name, body, **kwargs): # path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -4370,11 +5544,17 @@ def replace_cluster_role_binding_with_http_info(self, name, body, **kwargs): # body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1ClusterRoleBinding", + 201: "V1ClusterRoleBinding", + 401: None, + } + return self.api_client.call_api( '/apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}', 'PUT', path_params, @@ -4383,13 +5563,14 @@ def replace_cluster_role_binding_with_http_info(self, name, body, **kwargs): # body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ClusterRoleBinding', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_namespaced_role(self, name, namespace, body, **kwargs): # noqa: E501 """replace_namespaced_role # noqa: E501 @@ -4397,27 +5578,38 @@ def replace_namespaced_role(self, name, namespace, body, **kwargs): # noqa: E50 replace the specified Role # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_role(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Role (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1Role body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the Role (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1Role + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Role + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Role """ kwargs['_return_http_data_only'] = True return self.replace_namespaced_role_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -4428,29 +5620,46 @@ def replace_namespaced_role_with_http_info(self, name, namespace, body, **kwargs replace the specified Role # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_role_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the Role (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1Role body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the Role (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1Role + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Role, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Role, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -4469,7 +5678,10 @@ def replace_namespaced_role_with_http_info(self, name, namespace, body, **kwargs 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -4482,16 +5694,13 @@ def replace_namespaced_role_with_http_info(self, name, namespace, body, **kwargs local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_role`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_role`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_role`") # noqa: E501 collection_formats = {} @@ -4503,16 +5712,16 @@ def replace_namespaced_role_with_http_info(self, name, namespace, body, **kwargs path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -4522,11 +5731,17 @@ def replace_namespaced_role_with_http_info(self, name, namespace, body, **kwargs body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Role", + 201: "V1Role", + 401: None, + } + return self.api_client.call_api( '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}', 'PUT', path_params, @@ -4535,13 +5750,14 @@ def replace_namespaced_role_with_http_info(self, name, namespace, body, **kwargs body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Role', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_namespaced_role_binding(self, name, namespace, body, **kwargs): # noqa: E501 """replace_namespaced_role_binding # noqa: E501 @@ -4549,27 +5765,38 @@ def replace_namespaced_role_binding(self, name, namespace, body, **kwargs): # n replace the specified RoleBinding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_role_binding(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the RoleBinding (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1RoleBinding body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the RoleBinding (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1RoleBinding + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1RoleBinding + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1RoleBinding """ kwargs['_return_http_data_only'] = True return self.replace_namespaced_role_binding_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -4580,29 +5807,46 @@ def replace_namespaced_role_binding_with_http_info(self, name, namespace, body, replace the specified RoleBinding # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_role_binding_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the RoleBinding (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1RoleBinding body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the RoleBinding (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1RoleBinding + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1RoleBinding, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1RoleBinding, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -4621,7 +5865,10 @@ def replace_namespaced_role_binding_with_http_info(self, name, namespace, body, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -4634,16 +5881,13 @@ def replace_namespaced_role_binding_with_http_info(self, name, namespace, body, local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_role_binding`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_role_binding`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_role_binding`") # noqa: E501 collection_formats = {} @@ -4655,16 +5899,16 @@ def replace_namespaced_role_binding_with_http_info(self, name, namespace, body, path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -4674,11 +5918,17 @@ def replace_namespaced_role_binding_with_http_info(self, name, namespace, body, body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1RoleBinding", + 201: "V1RoleBinding", + 401: None, + } + return self.api_client.call_api( '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}', 'PUT', path_params, @@ -4687,10 +5937,11 @@ def replace_namespaced_role_binding_with_http_info(self, name, namespace, body, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1RoleBinding', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) diff --git a/kubernetes/client/api/resource_api.py b/kubernetes/client/api/resource_api.py index 2d63a7074a..ad5e44ec38 100644 --- a/kubernetes/client/api/resource_api.py +++ b/kubernetes/client/api/resource_api.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ @@ -42,20 +42,24 @@ def get_api_group(self, **kwargs): # noqa: E501 get information of a group # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_group(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1APIGroup + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1APIGroup """ kwargs['_return_http_data_only'] = True return self.get_api_group_with_http_info(**kwargs) # noqa: E501 @@ -66,22 +70,32 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 get information of a group # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_group_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1APIGroup, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1APIGroup, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -93,7 +107,10 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -112,7 +129,7 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -125,6 +142,11 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1APIGroup", + 401: None, + } + return self.api_client.call_api( '/apis/resource.k8s.io/', 'GET', path_params, @@ -133,10 +155,11 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1APIGroup', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) diff --git a/kubernetes/client/api/resource_v1_api.py b/kubernetes/client/api/resource_v1_api.py new file mode 100644 index 0000000000..638572ce18 --- /dev/null +++ b/kubernetes/client/api/resource_v1_api.py @@ -0,0 +1,6491 @@ +# coding: utf-8 + +""" + Kubernetes + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: release-1.35 + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from kubernetes.client.api_client import ApiClient +from kubernetes.client.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class ResourceV1Api(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def create_device_class(self, body, **kwargs): # noqa: E501 + """create_device_class # noqa: E501 + + create a DeviceClass # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_device_class(body, async_req=True) + >>> result = thread.get() + + :param body: (required) + :type body: V1DeviceClass + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1DeviceClass + """ + kwargs['_return_http_data_only'] = True + return self.create_device_class_with_http_info(body, **kwargs) # noqa: E501 + + def create_device_class_with_http_info(self, body, **kwargs): # noqa: E501 + """create_device_class # noqa: E501 + + create a DeviceClass # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_device_class_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param body: (required) + :type body: V1DeviceClass + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1DeviceClass, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_device_class" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `create_device_class`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1DeviceClass", + 201: "V1DeviceClass", + 202: "V1DeviceClass", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1/deviceclasses', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def create_namespaced_resource_claim(self, namespace, body, **kwargs): # noqa: E501 + """create_namespaced_resource_claim # noqa: E501 + + create a ResourceClaim # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_namespaced_resource_claim(namespace, body, async_req=True) + >>> result = thread.get() + + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: ResourceV1ResourceClaim + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: ResourceV1ResourceClaim + """ + kwargs['_return_http_data_only'] = True + return self.create_namespaced_resource_claim_with_http_info(namespace, body, **kwargs) # noqa: E501 + + def create_namespaced_resource_claim_with_http_info(self, namespace, body, **kwargs): # noqa: E501 + """create_namespaced_resource_claim # noqa: E501 + + create a ResourceClaim # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_namespaced_resource_claim_with_http_info(namespace, body, async_req=True) + >>> result = thread.get() + + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: ResourceV1ResourceClaim + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(ResourceV1ResourceClaim, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'namespace', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_namespaced_resource_claim" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_resource_claim`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_resource_claim`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "ResourceV1ResourceClaim", + 201: "ResourceV1ResourceClaim", + 202: "ResourceV1ResourceClaim", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaims', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def create_namespaced_resource_claim_template(self, namespace, body, **kwargs): # noqa: E501 + """create_namespaced_resource_claim_template # noqa: E501 + + create a ResourceClaimTemplate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_namespaced_resource_claim_template(namespace, body, async_req=True) + >>> result = thread.get() + + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1ResourceClaimTemplate + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1ResourceClaimTemplate + """ + kwargs['_return_http_data_only'] = True + return self.create_namespaced_resource_claim_template_with_http_info(namespace, body, **kwargs) # noqa: E501 + + def create_namespaced_resource_claim_template_with_http_info(self, namespace, body, **kwargs): # noqa: E501 + """create_namespaced_resource_claim_template # noqa: E501 + + create a ResourceClaimTemplate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_namespaced_resource_claim_template_with_http_info(namespace, body, async_req=True) + >>> result = thread.get() + + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1ResourceClaimTemplate + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1ResourceClaimTemplate, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'namespace', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_namespaced_resource_claim_template" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_resource_claim_template`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_resource_claim_template`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1ResourceClaimTemplate", + 201: "V1ResourceClaimTemplate", + 202: "V1ResourceClaimTemplate", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaimtemplates', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def create_resource_slice(self, body, **kwargs): # noqa: E501 + """create_resource_slice # noqa: E501 + + create a ResourceSlice # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_resource_slice(body, async_req=True) + >>> result = thread.get() + + :param body: (required) + :type body: V1ResourceSlice + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1ResourceSlice + """ + kwargs['_return_http_data_only'] = True + return self.create_resource_slice_with_http_info(body, **kwargs) # noqa: E501 + + def create_resource_slice_with_http_info(self, body, **kwargs): # noqa: E501 + """create_resource_slice # noqa: E501 + + create a ResourceSlice # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_resource_slice_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param body: (required) + :type body: V1ResourceSlice + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1ResourceSlice, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_resource_slice" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `create_resource_slice`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1ResourceSlice", + 201: "V1ResourceSlice", + 202: "V1ResourceSlice", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1/resourceslices', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_collection_device_class(self, **kwargs): # noqa: E501 + """delete_collection_device_class # noqa: E501 + + delete collection of DeviceClass # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_collection_device_class(async_req=True) + >>> result = thread.get() + + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1Status + """ + kwargs['_return_http_data_only'] = True + return self.delete_collection_device_class_with_http_info(**kwargs) # noqa: E501 + + def delete_collection_device_class_with_http_info(self, **kwargs): # noqa: E501 + """delete_collection_device_class # noqa: E501 + + delete collection of DeviceClass # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_collection_device_class_with_http_info(async_req=True) + >>> result = thread.get() + + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'pretty', + '_continue', + 'dry_run', + 'field_selector', + 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', + 'label_selector', + 'limit', + 'orphan_dependents', + 'propagation_policy', + 'resource_version', + 'resource_version_match', + 'send_initial_events', + 'timeout_seconds', + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_collection_device_class" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 + query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 + query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 + query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 + query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 + query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 + query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 + query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 + query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 + query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 + query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1Status", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1/deviceclasses', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_collection_namespaced_resource_claim(self, namespace, **kwargs): # noqa: E501 + """delete_collection_namespaced_resource_claim # noqa: E501 + + delete collection of ResourceClaim # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_collection_namespaced_resource_claim(namespace, async_req=True) + >>> result = thread.get() + + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1Status + """ + kwargs['_return_http_data_only'] = True + return self.delete_collection_namespaced_resource_claim_with_http_info(namespace, **kwargs) # noqa: E501 + + def delete_collection_namespaced_resource_claim_with_http_info(self, namespace, **kwargs): # noqa: E501 + """delete_collection_namespaced_resource_claim # noqa: E501 + + delete collection of ResourceClaim # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_collection_namespaced_resource_claim_with_http_info(namespace, async_req=True) + >>> result = thread.get() + + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'namespace', + 'pretty', + '_continue', + 'dry_run', + 'field_selector', + 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', + 'label_selector', + 'limit', + 'orphan_dependents', + 'propagation_policy', + 'resource_version', + 'resource_version_match', + 'send_initial_events', + 'timeout_seconds', + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_collection_namespaced_resource_claim" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_resource_claim`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 + query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 + query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 + query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 + query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 + query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 + query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 + query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 + query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 + query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 + query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1Status", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaims', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_collection_namespaced_resource_claim_template(self, namespace, **kwargs): # noqa: E501 + """delete_collection_namespaced_resource_claim_template # noqa: E501 + + delete collection of ResourceClaimTemplate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_collection_namespaced_resource_claim_template(namespace, async_req=True) + >>> result = thread.get() + + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1Status + """ + kwargs['_return_http_data_only'] = True + return self.delete_collection_namespaced_resource_claim_template_with_http_info(namespace, **kwargs) # noqa: E501 + + def delete_collection_namespaced_resource_claim_template_with_http_info(self, namespace, **kwargs): # noqa: E501 + """delete_collection_namespaced_resource_claim_template # noqa: E501 + + delete collection of ResourceClaimTemplate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_collection_namespaced_resource_claim_template_with_http_info(namespace, async_req=True) + >>> result = thread.get() + + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'namespace', + 'pretty', + '_continue', + 'dry_run', + 'field_selector', + 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', + 'label_selector', + 'limit', + 'orphan_dependents', + 'propagation_policy', + 'resource_version', + 'resource_version_match', + 'send_initial_events', + 'timeout_seconds', + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_collection_namespaced_resource_claim_template" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_resource_claim_template`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 + query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 + query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 + query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 + query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 + query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 + query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 + query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 + query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 + query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 + query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1Status", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaimtemplates', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_collection_resource_slice(self, **kwargs): # noqa: E501 + """delete_collection_resource_slice # noqa: E501 + + delete collection of ResourceSlice # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_collection_resource_slice(async_req=True) + >>> result = thread.get() + + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1Status + """ + kwargs['_return_http_data_only'] = True + return self.delete_collection_resource_slice_with_http_info(**kwargs) # noqa: E501 + + def delete_collection_resource_slice_with_http_info(self, **kwargs): # noqa: E501 + """delete_collection_resource_slice # noqa: E501 + + delete collection of ResourceSlice # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_collection_resource_slice_with_http_info(async_req=True) + >>> result = thread.get() + + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'pretty', + '_continue', + 'dry_run', + 'field_selector', + 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', + 'label_selector', + 'limit', + 'orphan_dependents', + 'propagation_policy', + 'resource_version', + 'resource_version_match', + 'send_initial_events', + 'timeout_seconds', + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_collection_resource_slice" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 + query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 + query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 + query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 + query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 + query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 + query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 + query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 + query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 + query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 + query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1Status", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1/resourceslices', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_device_class(self, name, **kwargs): # noqa: E501 + """delete_device_class # noqa: E501 + + delete a DeviceClass # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_device_class(name, async_req=True) + >>> result = thread.get() + + :param name: name of the DeviceClass (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1DeviceClass + """ + kwargs['_return_http_data_only'] = True + return self.delete_device_class_with_http_info(name, **kwargs) # noqa: E501 + + def delete_device_class_with_http_info(self, name, **kwargs): # noqa: E501 + """delete_device_class # noqa: E501 + + delete a DeviceClass # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_device_class_with_http_info(name, async_req=True) + >>> result = thread.get() + + :param name: name of the DeviceClass (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1DeviceClass, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'pretty', + 'dry_run', + 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', + 'orphan_dependents', + 'propagation_policy', + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_device_class" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `delete_device_class`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 + query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 + query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 + query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1DeviceClass", + 202: "V1DeviceClass", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1/deviceclasses/{name}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_namespaced_resource_claim(self, name, namespace, **kwargs): # noqa: E501 + """delete_namespaced_resource_claim # noqa: E501 + + delete a ResourceClaim # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_namespaced_resource_claim(name, namespace, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceClaim (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: ResourceV1ResourceClaim + """ + kwargs['_return_http_data_only'] = True + return self.delete_namespaced_resource_claim_with_http_info(name, namespace, **kwargs) # noqa: E501 + + def delete_namespaced_resource_claim_with_http_info(self, name, namespace, **kwargs): # noqa: E501 + """delete_namespaced_resource_claim # noqa: E501 + + delete a ResourceClaim # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_namespaced_resource_claim_with_http_info(name, namespace, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceClaim (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(ResourceV1ResourceClaim, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'namespace', + 'pretty', + 'dry_run', + 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', + 'orphan_dependents', + 'propagation_policy', + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_namespaced_resource_claim" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_resource_claim`") # noqa: E501 + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_resource_claim`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 + query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 + query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 + query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "ResourceV1ResourceClaim", + 202: "ResourceV1ResourceClaim", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaims/{name}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_namespaced_resource_claim_template(self, name, namespace, **kwargs): # noqa: E501 + """delete_namespaced_resource_claim_template # noqa: E501 + + delete a ResourceClaimTemplate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_namespaced_resource_claim_template(name, namespace, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceClaimTemplate (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1ResourceClaimTemplate + """ + kwargs['_return_http_data_only'] = True + return self.delete_namespaced_resource_claim_template_with_http_info(name, namespace, **kwargs) # noqa: E501 + + def delete_namespaced_resource_claim_template_with_http_info(self, name, namespace, **kwargs): # noqa: E501 + """delete_namespaced_resource_claim_template # noqa: E501 + + delete a ResourceClaimTemplate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_namespaced_resource_claim_template_with_http_info(name, namespace, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceClaimTemplate (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1ResourceClaimTemplate, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'namespace', + 'pretty', + 'dry_run', + 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', + 'orphan_dependents', + 'propagation_policy', + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_namespaced_resource_claim_template" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_resource_claim_template`") # noqa: E501 + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_resource_claim_template`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 + query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 + query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 + query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1ResourceClaimTemplate", + 202: "V1ResourceClaimTemplate", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaimtemplates/{name}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_resource_slice(self, name, **kwargs): # noqa: E501 + """delete_resource_slice # noqa: E501 + + delete a ResourceSlice # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_resource_slice(name, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceSlice (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1ResourceSlice + """ + kwargs['_return_http_data_only'] = True + return self.delete_resource_slice_with_http_info(name, **kwargs) # noqa: E501 + + def delete_resource_slice_with_http_info(self, name, **kwargs): # noqa: E501 + """delete_resource_slice # noqa: E501 + + delete a ResourceSlice # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_resource_slice_with_http_info(name, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceSlice (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1ResourceSlice, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'pretty', + 'dry_run', + 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', + 'orphan_dependents', + 'propagation_policy', + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_resource_slice" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `delete_resource_slice`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 + query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 + query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 + query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1ResourceSlice", + 202: "V1ResourceSlice", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1/resourceslices/{name}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_api_resources(self, **kwargs): # noqa: E501 + """get_api_resources # noqa: E501 + + get available resources # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_api_resources(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1APIResourceList + """ + kwargs['_return_http_data_only'] = True + return self.get_api_resources_with_http_info(**kwargs) # noqa: E501 + + def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 + """get_api_resources # noqa: E501 + + get available resources # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_api_resources_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_api_resources" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1APIResourceList", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1/', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def list_device_class(self, **kwargs): # noqa: E501 + """list_device_class # noqa: E501 + + list or watch objects of kind DeviceClass # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_device_class(async_req=True) + >>> result = thread.get() + + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1DeviceClassList + """ + kwargs['_return_http_data_only'] = True + return self.list_device_class_with_http_info(**kwargs) # noqa: E501 + + def list_device_class_with_http_info(self, **kwargs): # noqa: E501 + """list_device_class # noqa: E501 + + list or watch objects of kind DeviceClass # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_device_class_with_http_info(async_req=True) + >>> result = thread.get() + + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1DeviceClassList, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'pretty', + 'allow_watch_bookmarks', + '_continue', + 'field_selector', + 'label_selector', + 'limit', + 'resource_version', + 'resource_version_match', + 'send_initial_events', + 'timeout_seconds', + 'watch' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_device_class" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 + query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 + query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 + query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 + query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 + query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 + query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 + query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 + query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 + query_params.append(('watch', local_var_params['watch'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1DeviceClassList", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1/deviceclasses', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def list_namespaced_resource_claim(self, namespace, **kwargs): # noqa: E501 + """list_namespaced_resource_claim # noqa: E501 + + list or watch objects of kind ResourceClaim # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_namespaced_resource_claim(namespace, async_req=True) + >>> result = thread.get() + + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1ResourceClaimList + """ + kwargs['_return_http_data_only'] = True + return self.list_namespaced_resource_claim_with_http_info(namespace, **kwargs) # noqa: E501 + + def list_namespaced_resource_claim_with_http_info(self, namespace, **kwargs): # noqa: E501 + """list_namespaced_resource_claim # noqa: E501 + + list or watch objects of kind ResourceClaim # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_namespaced_resource_claim_with_http_info(namespace, async_req=True) + >>> result = thread.get() + + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1ResourceClaimList, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'namespace', + 'pretty', + 'allow_watch_bookmarks', + '_continue', + 'field_selector', + 'label_selector', + 'limit', + 'resource_version', + 'resource_version_match', + 'send_initial_events', + 'timeout_seconds', + 'watch' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_namespaced_resource_claim" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_resource_claim`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 + query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 + query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 + query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 + query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 + query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 + query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 + query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 + query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 + query_params.append(('watch', local_var_params['watch'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1ResourceClaimList", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaims', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def list_namespaced_resource_claim_template(self, namespace, **kwargs): # noqa: E501 + """list_namespaced_resource_claim_template # noqa: E501 + + list or watch objects of kind ResourceClaimTemplate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_namespaced_resource_claim_template(namespace, async_req=True) + >>> result = thread.get() + + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1ResourceClaimTemplateList + """ + kwargs['_return_http_data_only'] = True + return self.list_namespaced_resource_claim_template_with_http_info(namespace, **kwargs) # noqa: E501 + + def list_namespaced_resource_claim_template_with_http_info(self, namespace, **kwargs): # noqa: E501 + """list_namespaced_resource_claim_template # noqa: E501 + + list or watch objects of kind ResourceClaimTemplate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_namespaced_resource_claim_template_with_http_info(namespace, async_req=True) + >>> result = thread.get() + + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1ResourceClaimTemplateList, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'namespace', + 'pretty', + 'allow_watch_bookmarks', + '_continue', + 'field_selector', + 'label_selector', + 'limit', + 'resource_version', + 'resource_version_match', + 'send_initial_events', + 'timeout_seconds', + 'watch' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_namespaced_resource_claim_template" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_resource_claim_template`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 + query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 + query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 + query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 + query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 + query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 + query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 + query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 + query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 + query_params.append(('watch', local_var_params['watch'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1ResourceClaimTemplateList", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaimtemplates', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def list_resource_claim_for_all_namespaces(self, **kwargs): # noqa: E501 + """list_resource_claim_for_all_namespaces # noqa: E501 + + list or watch objects of kind ResourceClaim # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_resource_claim_for_all_namespaces(async_req=True) + >>> result = thread.get() + + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1ResourceClaimList + """ + kwargs['_return_http_data_only'] = True + return self.list_resource_claim_for_all_namespaces_with_http_info(**kwargs) # noqa: E501 + + def list_resource_claim_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501 + """list_resource_claim_for_all_namespaces # noqa: E501 + + list or watch objects of kind ResourceClaim # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_resource_claim_for_all_namespaces_with_http_info(async_req=True) + >>> result = thread.get() + + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1ResourceClaimList, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'allow_watch_bookmarks', + '_continue', + 'field_selector', + 'label_selector', + 'limit', + 'pretty', + 'resource_version', + 'resource_version_match', + 'send_initial_events', + 'timeout_seconds', + 'watch' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_resource_claim_for_all_namespaces" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 + query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 + query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 + query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 + query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 + query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 + query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 + query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 + query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 + query_params.append(('watch', local_var_params['watch'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1ResourceClaimList", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1/resourceclaims', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def list_resource_claim_template_for_all_namespaces(self, **kwargs): # noqa: E501 + """list_resource_claim_template_for_all_namespaces # noqa: E501 + + list or watch objects of kind ResourceClaimTemplate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_resource_claim_template_for_all_namespaces(async_req=True) + >>> result = thread.get() + + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1ResourceClaimTemplateList + """ + kwargs['_return_http_data_only'] = True + return self.list_resource_claim_template_for_all_namespaces_with_http_info(**kwargs) # noqa: E501 + + def list_resource_claim_template_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501 + """list_resource_claim_template_for_all_namespaces # noqa: E501 + + list or watch objects of kind ResourceClaimTemplate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_resource_claim_template_for_all_namespaces_with_http_info(async_req=True) + >>> result = thread.get() + + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1ResourceClaimTemplateList, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'allow_watch_bookmarks', + '_continue', + 'field_selector', + 'label_selector', + 'limit', + 'pretty', + 'resource_version', + 'resource_version_match', + 'send_initial_events', + 'timeout_seconds', + 'watch' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_resource_claim_template_for_all_namespaces" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 + query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 + query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 + query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 + query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 + query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 + query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 + query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 + query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 + query_params.append(('watch', local_var_params['watch'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1ResourceClaimTemplateList", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1/resourceclaimtemplates', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def list_resource_slice(self, **kwargs): # noqa: E501 + """list_resource_slice # noqa: E501 + + list or watch objects of kind ResourceSlice # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_resource_slice(async_req=True) + >>> result = thread.get() + + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1ResourceSliceList + """ + kwargs['_return_http_data_only'] = True + return self.list_resource_slice_with_http_info(**kwargs) # noqa: E501 + + def list_resource_slice_with_http_info(self, **kwargs): # noqa: E501 + """list_resource_slice # noqa: E501 + + list or watch objects of kind ResourceSlice # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_resource_slice_with_http_info(async_req=True) + >>> result = thread.get() + + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1ResourceSliceList, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'pretty', + 'allow_watch_bookmarks', + '_continue', + 'field_selector', + 'label_selector', + 'limit', + 'resource_version', + 'resource_version_match', + 'send_initial_events', + 'timeout_seconds', + 'watch' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_resource_slice" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 + query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 + query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 + query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 + query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 + query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 + query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 + query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 + query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 + query_params.append(('watch', local_var_params['watch'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1ResourceSliceList", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1/resourceslices', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def patch_device_class(self, name, body, **kwargs): # noqa: E501 + """patch_device_class # noqa: E501 + + partially update the specified DeviceClass # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_device_class(name, body, async_req=True) + >>> result = thread.get() + + :param name: name of the DeviceClass (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1DeviceClass + """ + kwargs['_return_http_data_only'] = True + return self.patch_device_class_with_http_info(name, body, **kwargs) # noqa: E501 + + def patch_device_class_with_http_info(self, name, body, **kwargs): # noqa: E501 + """patch_device_class # noqa: E501 + + partially update the specified DeviceClass # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_device_class_with_http_info(name, body, async_req=True) + >>> result = thread.get() + + :param name: name of the DeviceClass (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1DeviceClass, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation', + 'force' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method patch_device_class" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `patch_device_class`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `patch_device_class`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 + query_params.append(('force', local_var_params['force'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # HTTP header `Content-Type` + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1DeviceClass", + 201: "V1DeviceClass", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1/deviceclasses/{name}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def patch_namespaced_resource_claim(self, name, namespace, body, **kwargs): # noqa: E501 + """patch_namespaced_resource_claim # noqa: E501 + + partially update the specified ResourceClaim # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_namespaced_resource_claim(name, namespace, body, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceClaim (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: ResourceV1ResourceClaim + """ + kwargs['_return_http_data_only'] = True + return self.patch_namespaced_resource_claim_with_http_info(name, namespace, body, **kwargs) # noqa: E501 + + def patch_namespaced_resource_claim_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501 + """patch_namespaced_resource_claim # noqa: E501 + + partially update the specified ResourceClaim # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_namespaced_resource_claim_with_http_info(name, namespace, body, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceClaim (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(ResourceV1ResourceClaim, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'namespace', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation', + 'force' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method patch_namespaced_resource_claim" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_resource_claim`") # noqa: E501 + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_resource_claim`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_resource_claim`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 + query_params.append(('force', local_var_params['force'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # HTTP header `Content-Type` + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "ResourceV1ResourceClaim", + 201: "ResourceV1ResourceClaim", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaims/{name}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def patch_namespaced_resource_claim_status(self, name, namespace, body, **kwargs): # noqa: E501 + """patch_namespaced_resource_claim_status # noqa: E501 + + partially update status of the specified ResourceClaim # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_namespaced_resource_claim_status(name, namespace, body, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceClaim (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: ResourceV1ResourceClaim + """ + kwargs['_return_http_data_only'] = True + return self.patch_namespaced_resource_claim_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501 + + def patch_namespaced_resource_claim_status_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501 + """patch_namespaced_resource_claim_status # noqa: E501 + + partially update status of the specified ResourceClaim # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_namespaced_resource_claim_status_with_http_info(name, namespace, body, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceClaim (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(ResourceV1ResourceClaim, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'namespace', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation', + 'force' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method patch_namespaced_resource_claim_status" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_resource_claim_status`") # noqa: E501 + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_resource_claim_status`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_resource_claim_status`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 + query_params.append(('force', local_var_params['force'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # HTTP header `Content-Type` + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "ResourceV1ResourceClaim", + 201: "ResourceV1ResourceClaim", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaims/{name}/status', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def patch_namespaced_resource_claim_template(self, name, namespace, body, **kwargs): # noqa: E501 + """patch_namespaced_resource_claim_template # noqa: E501 + + partially update the specified ResourceClaimTemplate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_namespaced_resource_claim_template(name, namespace, body, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceClaimTemplate (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1ResourceClaimTemplate + """ + kwargs['_return_http_data_only'] = True + return self.patch_namespaced_resource_claim_template_with_http_info(name, namespace, body, **kwargs) # noqa: E501 + + def patch_namespaced_resource_claim_template_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501 + """patch_namespaced_resource_claim_template # noqa: E501 + + partially update the specified ResourceClaimTemplate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_namespaced_resource_claim_template_with_http_info(name, namespace, body, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceClaimTemplate (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1ResourceClaimTemplate, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'namespace', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation', + 'force' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method patch_namespaced_resource_claim_template" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_resource_claim_template`") # noqa: E501 + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_resource_claim_template`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_resource_claim_template`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 + query_params.append(('force', local_var_params['force'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # HTTP header `Content-Type` + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1ResourceClaimTemplate", + 201: "V1ResourceClaimTemplate", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaimtemplates/{name}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def patch_resource_slice(self, name, body, **kwargs): # noqa: E501 + """patch_resource_slice # noqa: E501 + + partially update the specified ResourceSlice # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_resource_slice(name, body, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceSlice (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1ResourceSlice + """ + kwargs['_return_http_data_only'] = True + return self.patch_resource_slice_with_http_info(name, body, **kwargs) # noqa: E501 + + def patch_resource_slice_with_http_info(self, name, body, **kwargs): # noqa: E501 + """patch_resource_slice # noqa: E501 + + partially update the specified ResourceSlice # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_resource_slice_with_http_info(name, body, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceSlice (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1ResourceSlice, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation', + 'force' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method patch_resource_slice" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `patch_resource_slice`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `patch_resource_slice`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 + query_params.append(('force', local_var_params['force'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # HTTP header `Content-Type` + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1ResourceSlice", + 201: "V1ResourceSlice", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1/resourceslices/{name}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def read_device_class(self, name, **kwargs): # noqa: E501 + """read_device_class # noqa: E501 + + read the specified DeviceClass # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.read_device_class(name, async_req=True) + >>> result = thread.get() + + :param name: name of the DeviceClass (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1DeviceClass + """ + kwargs['_return_http_data_only'] = True + return self.read_device_class_with_http_info(name, **kwargs) # noqa: E501 + + def read_device_class_with_http_info(self, name, **kwargs): # noqa: E501 + """read_device_class # noqa: E501 + + read the specified DeviceClass # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.read_device_class_with_http_info(name, async_req=True) + >>> result = thread.get() + + :param name: name of the DeviceClass (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1DeviceClass, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'pretty' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method read_device_class" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `read_device_class`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1DeviceClass", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1/deviceclasses/{name}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def read_namespaced_resource_claim(self, name, namespace, **kwargs): # noqa: E501 + """read_namespaced_resource_claim # noqa: E501 + + read the specified ResourceClaim # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.read_namespaced_resource_claim(name, namespace, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceClaim (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: ResourceV1ResourceClaim + """ + kwargs['_return_http_data_only'] = True + return self.read_namespaced_resource_claim_with_http_info(name, namespace, **kwargs) # noqa: E501 + + def read_namespaced_resource_claim_with_http_info(self, name, namespace, **kwargs): # noqa: E501 + """read_namespaced_resource_claim # noqa: E501 + + read the specified ResourceClaim # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.read_namespaced_resource_claim_with_http_info(name, namespace, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceClaim (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(ResourceV1ResourceClaim, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'namespace', + 'pretty' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method read_namespaced_resource_claim" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_resource_claim`") # noqa: E501 + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_resource_claim`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "ResourceV1ResourceClaim", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaims/{name}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def read_namespaced_resource_claim_status(self, name, namespace, **kwargs): # noqa: E501 + """read_namespaced_resource_claim_status # noqa: E501 + + read status of the specified ResourceClaim # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.read_namespaced_resource_claim_status(name, namespace, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceClaim (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: ResourceV1ResourceClaim + """ + kwargs['_return_http_data_only'] = True + return self.read_namespaced_resource_claim_status_with_http_info(name, namespace, **kwargs) # noqa: E501 + + def read_namespaced_resource_claim_status_with_http_info(self, name, namespace, **kwargs): # noqa: E501 + """read_namespaced_resource_claim_status # noqa: E501 + + read status of the specified ResourceClaim # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.read_namespaced_resource_claim_status_with_http_info(name, namespace, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceClaim (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(ResourceV1ResourceClaim, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'namespace', + 'pretty' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method read_namespaced_resource_claim_status" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_resource_claim_status`") # noqa: E501 + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_resource_claim_status`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "ResourceV1ResourceClaim", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaims/{name}/status', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def read_namespaced_resource_claim_template(self, name, namespace, **kwargs): # noqa: E501 + """read_namespaced_resource_claim_template # noqa: E501 + + read the specified ResourceClaimTemplate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.read_namespaced_resource_claim_template(name, namespace, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceClaimTemplate (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1ResourceClaimTemplate + """ + kwargs['_return_http_data_only'] = True + return self.read_namespaced_resource_claim_template_with_http_info(name, namespace, **kwargs) # noqa: E501 + + def read_namespaced_resource_claim_template_with_http_info(self, name, namespace, **kwargs): # noqa: E501 + """read_namespaced_resource_claim_template # noqa: E501 + + read the specified ResourceClaimTemplate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.read_namespaced_resource_claim_template_with_http_info(name, namespace, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceClaimTemplate (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1ResourceClaimTemplate, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'namespace', + 'pretty' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method read_namespaced_resource_claim_template" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_resource_claim_template`") # noqa: E501 + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_resource_claim_template`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1ResourceClaimTemplate", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaimtemplates/{name}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def read_resource_slice(self, name, **kwargs): # noqa: E501 + """read_resource_slice # noqa: E501 + + read the specified ResourceSlice # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.read_resource_slice(name, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceSlice (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1ResourceSlice + """ + kwargs['_return_http_data_only'] = True + return self.read_resource_slice_with_http_info(name, **kwargs) # noqa: E501 + + def read_resource_slice_with_http_info(self, name, **kwargs): # noqa: E501 + """read_resource_slice # noqa: E501 + + read the specified ResourceSlice # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.read_resource_slice_with_http_info(name, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceSlice (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1ResourceSlice, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'pretty' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method read_resource_slice" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `read_resource_slice`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1ResourceSlice", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1/resourceslices/{name}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def replace_device_class(self, name, body, **kwargs): # noqa: E501 + """replace_device_class # noqa: E501 + + replace the specified DeviceClass # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.replace_device_class(name, body, async_req=True) + >>> result = thread.get() + + :param name: name of the DeviceClass (required) + :type name: str + :param body: (required) + :type body: V1DeviceClass + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1DeviceClass + """ + kwargs['_return_http_data_only'] = True + return self.replace_device_class_with_http_info(name, body, **kwargs) # noqa: E501 + + def replace_device_class_with_http_info(self, name, body, **kwargs): # noqa: E501 + """replace_device_class # noqa: E501 + + replace the specified DeviceClass # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.replace_device_class_with_http_info(name, body, async_req=True) + >>> result = thread.get() + + :param name: name of the DeviceClass (required) + :type name: str + :param body: (required) + :type body: V1DeviceClass + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1DeviceClass, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method replace_device_class" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `replace_device_class`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `replace_device_class`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1DeviceClass", + 201: "V1DeviceClass", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1/deviceclasses/{name}', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def replace_namespaced_resource_claim(self, name, namespace, body, **kwargs): # noqa: E501 + """replace_namespaced_resource_claim # noqa: E501 + + replace the specified ResourceClaim # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.replace_namespaced_resource_claim(name, namespace, body, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceClaim (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: ResourceV1ResourceClaim + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: ResourceV1ResourceClaim + """ + kwargs['_return_http_data_only'] = True + return self.replace_namespaced_resource_claim_with_http_info(name, namespace, body, **kwargs) # noqa: E501 + + def replace_namespaced_resource_claim_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501 + """replace_namespaced_resource_claim # noqa: E501 + + replace the specified ResourceClaim # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.replace_namespaced_resource_claim_with_http_info(name, namespace, body, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceClaim (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: ResourceV1ResourceClaim + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(ResourceV1ResourceClaim, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'namespace', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method replace_namespaced_resource_claim" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_resource_claim`") # noqa: E501 + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_resource_claim`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_resource_claim`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "ResourceV1ResourceClaim", + 201: "ResourceV1ResourceClaim", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaims/{name}', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def replace_namespaced_resource_claim_status(self, name, namespace, body, **kwargs): # noqa: E501 + """replace_namespaced_resource_claim_status # noqa: E501 + + replace status of the specified ResourceClaim # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.replace_namespaced_resource_claim_status(name, namespace, body, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceClaim (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: ResourceV1ResourceClaim + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: ResourceV1ResourceClaim + """ + kwargs['_return_http_data_only'] = True + return self.replace_namespaced_resource_claim_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501 + + def replace_namespaced_resource_claim_status_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501 + """replace_namespaced_resource_claim_status # noqa: E501 + + replace status of the specified ResourceClaim # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.replace_namespaced_resource_claim_status_with_http_info(name, namespace, body, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceClaim (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: ResourceV1ResourceClaim + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(ResourceV1ResourceClaim, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'namespace', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method replace_namespaced_resource_claim_status" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_resource_claim_status`") # noqa: E501 + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_resource_claim_status`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_resource_claim_status`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "ResourceV1ResourceClaim", + 201: "ResourceV1ResourceClaim", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaims/{name}/status', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def replace_namespaced_resource_claim_template(self, name, namespace, body, **kwargs): # noqa: E501 + """replace_namespaced_resource_claim_template # noqa: E501 + + replace the specified ResourceClaimTemplate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.replace_namespaced_resource_claim_template(name, namespace, body, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceClaimTemplate (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1ResourceClaimTemplate + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1ResourceClaimTemplate + """ + kwargs['_return_http_data_only'] = True + return self.replace_namespaced_resource_claim_template_with_http_info(name, namespace, body, **kwargs) # noqa: E501 + + def replace_namespaced_resource_claim_template_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501 + """replace_namespaced_resource_claim_template # noqa: E501 + + replace the specified ResourceClaimTemplate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.replace_namespaced_resource_claim_template_with_http_info(name, namespace, body, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceClaimTemplate (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1ResourceClaimTemplate + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1ResourceClaimTemplate, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'namespace', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method replace_namespaced_resource_claim_template" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_resource_claim_template`") # noqa: E501 + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_resource_claim_template`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_resource_claim_template`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1ResourceClaimTemplate", + 201: "V1ResourceClaimTemplate", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaimtemplates/{name}', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def replace_resource_slice(self, name, body, **kwargs): # noqa: E501 + """replace_resource_slice # noqa: E501 + + replace the specified ResourceSlice # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.replace_resource_slice(name, body, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceSlice (required) + :type name: str + :param body: (required) + :type body: V1ResourceSlice + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1ResourceSlice + """ + kwargs['_return_http_data_only'] = True + return self.replace_resource_slice_with_http_info(name, body, **kwargs) # noqa: E501 + + def replace_resource_slice_with_http_info(self, name, body, **kwargs): # noqa: E501 + """replace_resource_slice # noqa: E501 + + replace the specified ResourceSlice # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.replace_resource_slice_with_http_info(name, body, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceSlice (required) + :type name: str + :param body: (required) + :type body: V1ResourceSlice + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1ResourceSlice, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method replace_resource_slice" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `replace_resource_slice`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `replace_resource_slice`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1ResourceSlice", + 201: "V1ResourceSlice", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1/resourceslices/{name}', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) diff --git a/kubernetes/client/api/resource_v1alpha2_api.py b/kubernetes/client/api/resource_v1alpha2_api.py deleted file mode 100644 index 2bdb370363..0000000000 --- a/kubernetes/client/api/resource_v1alpha2_api.py +++ /dev/null @@ -1,9328 +0,0 @@ -# coding: utf-8 - -""" - Kubernetes - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - - The version of the OpenAPI document: release-1.30 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from kubernetes.client.api_client import ApiClient -from kubernetes.client.exceptions import ( # noqa: F401 - ApiTypeError, - ApiValueError -) - - -class ResourceV1alpha2Api(object): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def create_namespaced_pod_scheduling_context(self, namespace, body, **kwargs): # noqa: E501 - """create_namespaced_pod_scheduling_context # noqa: E501 - - create a PodSchedulingContext # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_namespaced_pod_scheduling_context(namespace, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1alpha2PodSchedulingContext body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha2PodSchedulingContext - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.create_namespaced_pod_scheduling_context_with_http_info(namespace, body, **kwargs) # noqa: E501 - - def create_namespaced_pod_scheduling_context_with_http_info(self, namespace, body, **kwargs): # noqa: E501 - """create_namespaced_pod_scheduling_context # noqa: E501 - - create a PodSchedulingContext # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_namespaced_pod_scheduling_context_with_http_info(namespace, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1alpha2PodSchedulingContext body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha2PodSchedulingContext, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'namespace', - 'body', - 'pretty', - 'dry_run', - 'field_manager', - 'field_validation' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method create_namespaced_pod_scheduling_context" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_pod_scheduling_context`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_pod_scheduling_context`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'namespace' in local_var_params: - path_params['namespace'] = local_var_params['namespace'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 - query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 - query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/podschedulingcontexts', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha2PodSchedulingContext', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def create_namespaced_resource_claim(self, namespace, body, **kwargs): # noqa: E501 - """create_namespaced_resource_claim # noqa: E501 - - create a ResourceClaim # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_namespaced_resource_claim(namespace, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1alpha2ResourceClaim body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha2ResourceClaim - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.create_namespaced_resource_claim_with_http_info(namespace, body, **kwargs) # noqa: E501 - - def create_namespaced_resource_claim_with_http_info(self, namespace, body, **kwargs): # noqa: E501 - """create_namespaced_resource_claim # noqa: E501 - - create a ResourceClaim # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_namespaced_resource_claim_with_http_info(namespace, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1alpha2ResourceClaim body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha2ResourceClaim, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'namespace', - 'body', - 'pretty', - 'dry_run', - 'field_manager', - 'field_validation' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method create_namespaced_resource_claim" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_resource_claim`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_resource_claim`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'namespace' in local_var_params: - path_params['namespace'] = local_var_params['namespace'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 - query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 - query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaims', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha2ResourceClaim', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def create_namespaced_resource_claim_parameters(self, namespace, body, **kwargs): # noqa: E501 - """create_namespaced_resource_claim_parameters # noqa: E501 - - create ResourceClaimParameters # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_namespaced_resource_claim_parameters(namespace, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1alpha2ResourceClaimParameters body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha2ResourceClaimParameters - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.create_namespaced_resource_claim_parameters_with_http_info(namespace, body, **kwargs) # noqa: E501 - - def create_namespaced_resource_claim_parameters_with_http_info(self, namespace, body, **kwargs): # noqa: E501 - """create_namespaced_resource_claim_parameters # noqa: E501 - - create ResourceClaimParameters # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_namespaced_resource_claim_parameters_with_http_info(namespace, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1alpha2ResourceClaimParameters body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha2ResourceClaimParameters, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'namespace', - 'body', - 'pretty', - 'dry_run', - 'field_manager', - 'field_validation' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method create_namespaced_resource_claim_parameters" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_resource_claim_parameters`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_resource_claim_parameters`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'namespace' in local_var_params: - path_params['namespace'] = local_var_params['namespace'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 - query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 - query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaimparameters', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha2ResourceClaimParameters', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def create_namespaced_resource_claim_template(self, namespace, body, **kwargs): # noqa: E501 - """create_namespaced_resource_claim_template # noqa: E501 - - create a ResourceClaimTemplate # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_namespaced_resource_claim_template(namespace, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1alpha2ResourceClaimTemplate body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha2ResourceClaimTemplate - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.create_namespaced_resource_claim_template_with_http_info(namespace, body, **kwargs) # noqa: E501 - - def create_namespaced_resource_claim_template_with_http_info(self, namespace, body, **kwargs): # noqa: E501 - """create_namespaced_resource_claim_template # noqa: E501 - - create a ResourceClaimTemplate # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_namespaced_resource_claim_template_with_http_info(namespace, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1alpha2ResourceClaimTemplate body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha2ResourceClaimTemplate, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'namespace', - 'body', - 'pretty', - 'dry_run', - 'field_manager', - 'field_validation' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method create_namespaced_resource_claim_template" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_resource_claim_template`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_resource_claim_template`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'namespace' in local_var_params: - path_params['namespace'] = local_var_params['namespace'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 - query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 - query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaimtemplates', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha2ResourceClaimTemplate', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def create_namespaced_resource_class_parameters(self, namespace, body, **kwargs): # noqa: E501 - """create_namespaced_resource_class_parameters # noqa: E501 - - create ResourceClassParameters # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_namespaced_resource_class_parameters(namespace, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1alpha2ResourceClassParameters body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha2ResourceClassParameters - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.create_namespaced_resource_class_parameters_with_http_info(namespace, body, **kwargs) # noqa: E501 - - def create_namespaced_resource_class_parameters_with_http_info(self, namespace, body, **kwargs): # noqa: E501 - """create_namespaced_resource_class_parameters # noqa: E501 - - create ResourceClassParameters # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_namespaced_resource_class_parameters_with_http_info(namespace, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1alpha2ResourceClassParameters body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha2ResourceClassParameters, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'namespace', - 'body', - 'pretty', - 'dry_run', - 'field_manager', - 'field_validation' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method create_namespaced_resource_class_parameters" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_resource_class_parameters`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_resource_class_parameters`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'namespace' in local_var_params: - path_params['namespace'] = local_var_params['namespace'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 - query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 - query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclassparameters', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha2ResourceClassParameters', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def create_resource_class(self, body, **kwargs): # noqa: E501 - """create_resource_class # noqa: E501 - - create a ResourceClass # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_resource_class(body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param V1alpha2ResourceClass body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha2ResourceClass - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.create_resource_class_with_http_info(body, **kwargs) # noqa: E501 - - def create_resource_class_with_http_info(self, body, **kwargs): # noqa: E501 - """create_resource_class # noqa: E501 - - create a ResourceClass # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_resource_class_with_http_info(body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param V1alpha2ResourceClass body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha2ResourceClass, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'body', - 'pretty', - 'dry_run', - 'field_manager', - 'field_validation' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method create_resource_class" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `create_resource_class`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 - query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 - query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/resource.k8s.io/v1alpha2/resourceclasses', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha2ResourceClass', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def create_resource_slice(self, body, **kwargs): # noqa: E501 - """create_resource_slice # noqa: E501 - - create a ResourceSlice # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_resource_slice(body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param V1alpha2ResourceSlice body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha2ResourceSlice - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.create_resource_slice_with_http_info(body, **kwargs) # noqa: E501 - - def create_resource_slice_with_http_info(self, body, **kwargs): # noqa: E501 - """create_resource_slice # noqa: E501 - - create a ResourceSlice # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_resource_slice_with_http_info(body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param V1alpha2ResourceSlice body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha2ResourceSlice, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'body', - 'pretty', - 'dry_run', - 'field_manager', - 'field_validation' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method create_resource_slice" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `create_resource_slice`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 - query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 - query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/resource.k8s.io/v1alpha2/resourceslices', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha2ResourceSlice', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def delete_collection_namespaced_pod_scheduling_context(self, namespace, **kwargs): # noqa: E501 - """delete_collection_namespaced_pod_scheduling_context # noqa: E501 - - delete collection of PodSchedulingContext # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_collection_namespaced_pod_scheduling_context(namespace, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1Status - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.delete_collection_namespaced_pod_scheduling_context_with_http_info(namespace, **kwargs) # noqa: E501 - - def delete_collection_namespaced_pod_scheduling_context_with_http_info(self, namespace, **kwargs): # noqa: E501 - """delete_collection_namespaced_pod_scheduling_context # noqa: E501 - - delete collection of PodSchedulingContext # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_collection_namespaced_pod_scheduling_context_with_http_info(namespace, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'namespace', - 'pretty', - '_continue', - 'dry_run', - 'field_selector', - 'grace_period_seconds', - 'label_selector', - 'limit', - 'orphan_dependents', - 'propagation_policy', - 'resource_version', - 'resource_version_match', - 'send_initial_events', - 'timeout_seconds', - 'body' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method delete_collection_namespaced_pod_scheduling_context" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_pod_scheduling_context`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'namespace' in local_var_params: - path_params['namespace'] = local_var_params['namespace'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 - query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 - query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 - query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 - query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 - query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 - query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 - query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 - query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 - query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 - query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/podschedulingcontexts', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1Status', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def delete_collection_namespaced_resource_claim(self, namespace, **kwargs): # noqa: E501 - """delete_collection_namespaced_resource_claim # noqa: E501 - - delete collection of ResourceClaim # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_collection_namespaced_resource_claim(namespace, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1Status - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.delete_collection_namespaced_resource_claim_with_http_info(namespace, **kwargs) # noqa: E501 - - def delete_collection_namespaced_resource_claim_with_http_info(self, namespace, **kwargs): # noqa: E501 - """delete_collection_namespaced_resource_claim # noqa: E501 - - delete collection of ResourceClaim # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_collection_namespaced_resource_claim_with_http_info(namespace, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'namespace', - 'pretty', - '_continue', - 'dry_run', - 'field_selector', - 'grace_period_seconds', - 'label_selector', - 'limit', - 'orphan_dependents', - 'propagation_policy', - 'resource_version', - 'resource_version_match', - 'send_initial_events', - 'timeout_seconds', - 'body' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method delete_collection_namespaced_resource_claim" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_resource_claim`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'namespace' in local_var_params: - path_params['namespace'] = local_var_params['namespace'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 - query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 - query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 - query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 - query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 - query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 - query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 - query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 - query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 - query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 - query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaims', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1Status', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def delete_collection_namespaced_resource_claim_parameters(self, namespace, **kwargs): # noqa: E501 - """delete_collection_namespaced_resource_claim_parameters # noqa: E501 - - delete collection of ResourceClaimParameters # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_collection_namespaced_resource_claim_parameters(namespace, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1Status - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.delete_collection_namespaced_resource_claim_parameters_with_http_info(namespace, **kwargs) # noqa: E501 - - def delete_collection_namespaced_resource_claim_parameters_with_http_info(self, namespace, **kwargs): # noqa: E501 - """delete_collection_namespaced_resource_claim_parameters # noqa: E501 - - delete collection of ResourceClaimParameters # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_collection_namespaced_resource_claim_parameters_with_http_info(namespace, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'namespace', - 'pretty', - '_continue', - 'dry_run', - 'field_selector', - 'grace_period_seconds', - 'label_selector', - 'limit', - 'orphan_dependents', - 'propagation_policy', - 'resource_version', - 'resource_version_match', - 'send_initial_events', - 'timeout_seconds', - 'body' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method delete_collection_namespaced_resource_claim_parameters" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_resource_claim_parameters`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'namespace' in local_var_params: - path_params['namespace'] = local_var_params['namespace'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 - query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 - query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 - query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 - query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 - query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 - query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 - query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 - query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 - query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 - query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaimparameters', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1Status', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def delete_collection_namespaced_resource_claim_template(self, namespace, **kwargs): # noqa: E501 - """delete_collection_namespaced_resource_claim_template # noqa: E501 - - delete collection of ResourceClaimTemplate # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_collection_namespaced_resource_claim_template(namespace, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1Status - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.delete_collection_namespaced_resource_claim_template_with_http_info(namespace, **kwargs) # noqa: E501 - - def delete_collection_namespaced_resource_claim_template_with_http_info(self, namespace, **kwargs): # noqa: E501 - """delete_collection_namespaced_resource_claim_template # noqa: E501 - - delete collection of ResourceClaimTemplate # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_collection_namespaced_resource_claim_template_with_http_info(namespace, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'namespace', - 'pretty', - '_continue', - 'dry_run', - 'field_selector', - 'grace_period_seconds', - 'label_selector', - 'limit', - 'orphan_dependents', - 'propagation_policy', - 'resource_version', - 'resource_version_match', - 'send_initial_events', - 'timeout_seconds', - 'body' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method delete_collection_namespaced_resource_claim_template" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_resource_claim_template`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'namespace' in local_var_params: - path_params['namespace'] = local_var_params['namespace'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 - query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 - query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 - query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 - query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 - query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 - query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 - query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 - query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 - query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 - query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaimtemplates', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1Status', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def delete_collection_namespaced_resource_class_parameters(self, namespace, **kwargs): # noqa: E501 - """delete_collection_namespaced_resource_class_parameters # noqa: E501 - - delete collection of ResourceClassParameters # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_collection_namespaced_resource_class_parameters(namespace, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1Status - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.delete_collection_namespaced_resource_class_parameters_with_http_info(namespace, **kwargs) # noqa: E501 - - def delete_collection_namespaced_resource_class_parameters_with_http_info(self, namespace, **kwargs): # noqa: E501 - """delete_collection_namespaced_resource_class_parameters # noqa: E501 - - delete collection of ResourceClassParameters # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_collection_namespaced_resource_class_parameters_with_http_info(namespace, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'namespace', - 'pretty', - '_continue', - 'dry_run', - 'field_selector', - 'grace_period_seconds', - 'label_selector', - 'limit', - 'orphan_dependents', - 'propagation_policy', - 'resource_version', - 'resource_version_match', - 'send_initial_events', - 'timeout_seconds', - 'body' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method delete_collection_namespaced_resource_class_parameters" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_resource_class_parameters`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'namespace' in local_var_params: - path_params['namespace'] = local_var_params['namespace'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 - query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 - query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 - query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 - query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 - query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 - query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 - query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 - query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 - query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 - query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclassparameters', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1Status', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def delete_collection_resource_class(self, **kwargs): # noqa: E501 - """delete_collection_resource_class # noqa: E501 - - delete collection of ResourceClass # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_collection_resource_class(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1Status - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.delete_collection_resource_class_with_http_info(**kwargs) # noqa: E501 - - def delete_collection_resource_class_with_http_info(self, **kwargs): # noqa: E501 - """delete_collection_resource_class # noqa: E501 - - delete collection of ResourceClass # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_collection_resource_class_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'pretty', - '_continue', - 'dry_run', - 'field_selector', - 'grace_period_seconds', - 'label_selector', - 'limit', - 'orphan_dependents', - 'propagation_policy', - 'resource_version', - 'resource_version_match', - 'send_initial_events', - 'timeout_seconds', - 'body' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method delete_collection_resource_class" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 - query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 - query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 - query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 - query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 - query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 - query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 - query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 - query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 - query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 - query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/resource.k8s.io/v1alpha2/resourceclasses', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1Status', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def delete_collection_resource_slice(self, **kwargs): # noqa: E501 - """delete_collection_resource_slice # noqa: E501 - - delete collection of ResourceSlice # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_collection_resource_slice(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1Status - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.delete_collection_resource_slice_with_http_info(**kwargs) # noqa: E501 - - def delete_collection_resource_slice_with_http_info(self, **kwargs): # noqa: E501 - """delete_collection_resource_slice # noqa: E501 - - delete collection of ResourceSlice # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_collection_resource_slice_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'pretty', - '_continue', - 'dry_run', - 'field_selector', - 'grace_period_seconds', - 'label_selector', - 'limit', - 'orphan_dependents', - 'propagation_policy', - 'resource_version', - 'resource_version_match', - 'send_initial_events', - 'timeout_seconds', - 'body' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method delete_collection_resource_slice" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 - query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 - query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 - query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 - query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 - query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 - query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 - query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 - query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 - query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 - query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/resource.k8s.io/v1alpha2/resourceslices', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1Status', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def delete_namespaced_pod_scheduling_context(self, name, namespace, **kwargs): # noqa: E501 - """delete_namespaced_pod_scheduling_context # noqa: E501 - - delete a PodSchedulingContext # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_namespaced_pod_scheduling_context(name, namespace, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the PodSchedulingContext (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha2PodSchedulingContext - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.delete_namespaced_pod_scheduling_context_with_http_info(name, namespace, **kwargs) # noqa: E501 - - def delete_namespaced_pod_scheduling_context_with_http_info(self, name, namespace, **kwargs): # noqa: E501 - """delete_namespaced_pod_scheduling_context # noqa: E501 - - delete a PodSchedulingContext # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_namespaced_pod_scheduling_context_with_http_info(name, namespace, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the PodSchedulingContext (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha2PodSchedulingContext, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'namespace', - 'pretty', - 'dry_run', - 'grace_period_seconds', - 'orphan_dependents', - 'propagation_policy', - 'body' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method delete_namespaced_pod_scheduling_context" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_pod_scheduling_context`") # noqa: E501 - # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_pod_scheduling_context`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - if 'namespace' in local_var_params: - path_params['namespace'] = local_var_params['namespace'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 - query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 - query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 - query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/podschedulingcontexts/{name}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha2PodSchedulingContext', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def delete_namespaced_resource_claim(self, name, namespace, **kwargs): # noqa: E501 - """delete_namespaced_resource_claim # noqa: E501 - - delete a ResourceClaim # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_namespaced_resource_claim(name, namespace, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ResourceClaim (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha2ResourceClaim - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.delete_namespaced_resource_claim_with_http_info(name, namespace, **kwargs) # noqa: E501 - - def delete_namespaced_resource_claim_with_http_info(self, name, namespace, **kwargs): # noqa: E501 - """delete_namespaced_resource_claim # noqa: E501 - - delete a ResourceClaim # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_namespaced_resource_claim_with_http_info(name, namespace, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ResourceClaim (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha2ResourceClaim, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'namespace', - 'pretty', - 'dry_run', - 'grace_period_seconds', - 'orphan_dependents', - 'propagation_policy', - 'body' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method delete_namespaced_resource_claim" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_resource_claim`") # noqa: E501 - # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_resource_claim`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - if 'namespace' in local_var_params: - path_params['namespace'] = local_var_params['namespace'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 - query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 - query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 - query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaims/{name}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha2ResourceClaim', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def delete_namespaced_resource_claim_parameters(self, name, namespace, **kwargs): # noqa: E501 - """delete_namespaced_resource_claim_parameters # noqa: E501 - - delete ResourceClaimParameters # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_namespaced_resource_claim_parameters(name, namespace, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ResourceClaimParameters (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha2ResourceClaimParameters - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.delete_namespaced_resource_claim_parameters_with_http_info(name, namespace, **kwargs) # noqa: E501 - - def delete_namespaced_resource_claim_parameters_with_http_info(self, name, namespace, **kwargs): # noqa: E501 - """delete_namespaced_resource_claim_parameters # noqa: E501 - - delete ResourceClaimParameters # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_namespaced_resource_claim_parameters_with_http_info(name, namespace, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ResourceClaimParameters (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha2ResourceClaimParameters, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'namespace', - 'pretty', - 'dry_run', - 'grace_period_seconds', - 'orphan_dependents', - 'propagation_policy', - 'body' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method delete_namespaced_resource_claim_parameters" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_resource_claim_parameters`") # noqa: E501 - # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_resource_claim_parameters`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - if 'namespace' in local_var_params: - path_params['namespace'] = local_var_params['namespace'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 - query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 - query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 - query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaimparameters/{name}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha2ResourceClaimParameters', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def delete_namespaced_resource_claim_template(self, name, namespace, **kwargs): # noqa: E501 - """delete_namespaced_resource_claim_template # noqa: E501 - - delete a ResourceClaimTemplate # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_namespaced_resource_claim_template(name, namespace, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ResourceClaimTemplate (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha2ResourceClaimTemplate - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.delete_namespaced_resource_claim_template_with_http_info(name, namespace, **kwargs) # noqa: E501 - - def delete_namespaced_resource_claim_template_with_http_info(self, name, namespace, **kwargs): # noqa: E501 - """delete_namespaced_resource_claim_template # noqa: E501 - - delete a ResourceClaimTemplate # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_namespaced_resource_claim_template_with_http_info(name, namespace, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ResourceClaimTemplate (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha2ResourceClaimTemplate, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'namespace', - 'pretty', - 'dry_run', - 'grace_period_seconds', - 'orphan_dependents', - 'propagation_policy', - 'body' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method delete_namespaced_resource_claim_template" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_resource_claim_template`") # noqa: E501 - # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_resource_claim_template`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - if 'namespace' in local_var_params: - path_params['namespace'] = local_var_params['namespace'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 - query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 - query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 - query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaimtemplates/{name}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha2ResourceClaimTemplate', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def delete_namespaced_resource_class_parameters(self, name, namespace, **kwargs): # noqa: E501 - """delete_namespaced_resource_class_parameters # noqa: E501 - - delete ResourceClassParameters # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_namespaced_resource_class_parameters(name, namespace, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ResourceClassParameters (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha2ResourceClassParameters - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.delete_namespaced_resource_class_parameters_with_http_info(name, namespace, **kwargs) # noqa: E501 - - def delete_namespaced_resource_class_parameters_with_http_info(self, name, namespace, **kwargs): # noqa: E501 - """delete_namespaced_resource_class_parameters # noqa: E501 - - delete ResourceClassParameters # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_namespaced_resource_class_parameters_with_http_info(name, namespace, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ResourceClassParameters (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha2ResourceClassParameters, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'namespace', - 'pretty', - 'dry_run', - 'grace_period_seconds', - 'orphan_dependents', - 'propagation_policy', - 'body' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method delete_namespaced_resource_class_parameters" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_resource_class_parameters`") # noqa: E501 - # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_resource_class_parameters`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - if 'namespace' in local_var_params: - path_params['namespace'] = local_var_params['namespace'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 - query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 - query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 - query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclassparameters/{name}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha2ResourceClassParameters', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def delete_resource_class(self, name, **kwargs): # noqa: E501 - """delete_resource_class # noqa: E501 - - delete a ResourceClass # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_resource_class(name, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ResourceClass (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha2ResourceClass - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.delete_resource_class_with_http_info(name, **kwargs) # noqa: E501 - - def delete_resource_class_with_http_info(self, name, **kwargs): # noqa: E501 - """delete_resource_class # noqa: E501 - - delete a ResourceClass # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_resource_class_with_http_info(name, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ResourceClass (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha2ResourceClass, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'pretty', - 'dry_run', - 'grace_period_seconds', - 'orphan_dependents', - 'propagation_policy', - 'body' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method delete_resource_class" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `delete_resource_class`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 - query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 - query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 - query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/resource.k8s.io/v1alpha2/resourceclasses/{name}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha2ResourceClass', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def delete_resource_slice(self, name, **kwargs): # noqa: E501 - """delete_resource_slice # noqa: E501 - - delete a ResourceSlice # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_resource_slice(name, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ResourceSlice (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha2ResourceSlice - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.delete_resource_slice_with_http_info(name, **kwargs) # noqa: E501 - - def delete_resource_slice_with_http_info(self, name, **kwargs): # noqa: E501 - """delete_resource_slice # noqa: E501 - - delete a ResourceSlice # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_resource_slice_with_http_info(name, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ResourceSlice (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha2ResourceSlice, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'pretty', - 'dry_run', - 'grace_period_seconds', - 'orphan_dependents', - 'propagation_policy', - 'body' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method delete_resource_slice" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `delete_resource_slice`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 - query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 - query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 - query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/resource.k8s.io/v1alpha2/resourceslices/{name}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha2ResourceSlice', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_api_resources(self, **kwargs): # noqa: E501 - """get_api_resources # noqa: E501 - - get available resources # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_api_resources(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1APIResourceList - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_api_resources_with_http_info(**kwargs) # noqa: E501 - - def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 - """get_api_resources # noqa: E501 - - get available resources # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_api_resources_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_api_resources" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/resource.k8s.io/v1alpha2/', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1APIResourceList', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_namespaced_pod_scheduling_context(self, namespace, **kwargs): # noqa: E501 - """list_namespaced_pod_scheduling_context # noqa: E501 - - list or watch objects of kind PodSchedulingContext # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_namespaced_pod_scheduling_context(namespace, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha2PodSchedulingContextList - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_namespaced_pod_scheduling_context_with_http_info(namespace, **kwargs) # noqa: E501 - - def list_namespaced_pod_scheduling_context_with_http_info(self, namespace, **kwargs): # noqa: E501 - """list_namespaced_pod_scheduling_context # noqa: E501 - - list or watch objects of kind PodSchedulingContext # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_namespaced_pod_scheduling_context_with_http_info(namespace, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha2PodSchedulingContextList, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'namespace', - 'pretty', - 'allow_watch_bookmarks', - '_continue', - 'field_selector', - 'label_selector', - 'limit', - 'resource_version', - 'resource_version_match', - 'send_initial_events', - 'timeout_seconds', - 'watch' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_namespaced_pod_scheduling_context" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_pod_scheduling_context`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'namespace' in local_var_params: - path_params['namespace'] = local_var_params['namespace'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 - query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 - query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 - query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 - query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 - query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 - query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 - query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 - query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 - query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/podschedulingcontexts', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha2PodSchedulingContextList', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_namespaced_resource_claim(self, namespace, **kwargs): # noqa: E501 - """list_namespaced_resource_claim # noqa: E501 - - list or watch objects of kind ResourceClaim # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_namespaced_resource_claim(namespace, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha2ResourceClaimList - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_namespaced_resource_claim_with_http_info(namespace, **kwargs) # noqa: E501 - - def list_namespaced_resource_claim_with_http_info(self, namespace, **kwargs): # noqa: E501 - """list_namespaced_resource_claim # noqa: E501 - - list or watch objects of kind ResourceClaim # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_namespaced_resource_claim_with_http_info(namespace, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha2ResourceClaimList, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'namespace', - 'pretty', - 'allow_watch_bookmarks', - '_continue', - 'field_selector', - 'label_selector', - 'limit', - 'resource_version', - 'resource_version_match', - 'send_initial_events', - 'timeout_seconds', - 'watch' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_namespaced_resource_claim" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_resource_claim`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'namespace' in local_var_params: - path_params['namespace'] = local_var_params['namespace'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 - query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 - query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 - query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 - query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 - query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 - query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 - query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 - query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 - query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaims', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha2ResourceClaimList', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_namespaced_resource_claim_parameters(self, namespace, **kwargs): # noqa: E501 - """list_namespaced_resource_claim_parameters # noqa: E501 - - list or watch objects of kind ResourceClaimParameters # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_namespaced_resource_claim_parameters(namespace, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha2ResourceClaimParametersList - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_namespaced_resource_claim_parameters_with_http_info(namespace, **kwargs) # noqa: E501 - - def list_namespaced_resource_claim_parameters_with_http_info(self, namespace, **kwargs): # noqa: E501 - """list_namespaced_resource_claim_parameters # noqa: E501 - - list or watch objects of kind ResourceClaimParameters # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_namespaced_resource_claim_parameters_with_http_info(namespace, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha2ResourceClaimParametersList, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'namespace', - 'pretty', - 'allow_watch_bookmarks', - '_continue', - 'field_selector', - 'label_selector', - 'limit', - 'resource_version', - 'resource_version_match', - 'send_initial_events', - 'timeout_seconds', - 'watch' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_namespaced_resource_claim_parameters" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_resource_claim_parameters`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'namespace' in local_var_params: - path_params['namespace'] = local_var_params['namespace'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 - query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 - query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 - query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 - query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 - query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 - query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 - query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 - query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 - query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaimparameters', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha2ResourceClaimParametersList', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_namespaced_resource_claim_template(self, namespace, **kwargs): # noqa: E501 - """list_namespaced_resource_claim_template # noqa: E501 - - list or watch objects of kind ResourceClaimTemplate # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_namespaced_resource_claim_template(namespace, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha2ResourceClaimTemplateList - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_namespaced_resource_claim_template_with_http_info(namespace, **kwargs) # noqa: E501 - - def list_namespaced_resource_claim_template_with_http_info(self, namespace, **kwargs): # noqa: E501 - """list_namespaced_resource_claim_template # noqa: E501 - - list or watch objects of kind ResourceClaimTemplate # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_namespaced_resource_claim_template_with_http_info(namespace, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha2ResourceClaimTemplateList, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'namespace', - 'pretty', - 'allow_watch_bookmarks', - '_continue', - 'field_selector', - 'label_selector', - 'limit', - 'resource_version', - 'resource_version_match', - 'send_initial_events', - 'timeout_seconds', - 'watch' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_namespaced_resource_claim_template" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_resource_claim_template`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'namespace' in local_var_params: - path_params['namespace'] = local_var_params['namespace'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 - query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 - query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 - query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 - query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 - query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 - query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 - query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 - query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 - query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaimtemplates', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha2ResourceClaimTemplateList', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_namespaced_resource_class_parameters(self, namespace, **kwargs): # noqa: E501 - """list_namespaced_resource_class_parameters # noqa: E501 - - list or watch objects of kind ResourceClassParameters # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_namespaced_resource_class_parameters(namespace, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha2ResourceClassParametersList - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_namespaced_resource_class_parameters_with_http_info(namespace, **kwargs) # noqa: E501 - - def list_namespaced_resource_class_parameters_with_http_info(self, namespace, **kwargs): # noqa: E501 - """list_namespaced_resource_class_parameters # noqa: E501 - - list or watch objects of kind ResourceClassParameters # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_namespaced_resource_class_parameters_with_http_info(namespace, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha2ResourceClassParametersList, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'namespace', - 'pretty', - 'allow_watch_bookmarks', - '_continue', - 'field_selector', - 'label_selector', - 'limit', - 'resource_version', - 'resource_version_match', - 'send_initial_events', - 'timeout_seconds', - 'watch' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_namespaced_resource_class_parameters" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_resource_class_parameters`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'namespace' in local_var_params: - path_params['namespace'] = local_var_params['namespace'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 - query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 - query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 - query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 - query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 - query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 - query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 - query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 - query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 - query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclassparameters', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha2ResourceClassParametersList', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_pod_scheduling_context_for_all_namespaces(self, **kwargs): # noqa: E501 - """list_pod_scheduling_context_for_all_namespaces # noqa: E501 - - list or watch objects of kind PodSchedulingContext # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_pod_scheduling_context_for_all_namespaces(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha2PodSchedulingContextList - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_pod_scheduling_context_for_all_namespaces_with_http_info(**kwargs) # noqa: E501 - - def list_pod_scheduling_context_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501 - """list_pod_scheduling_context_for_all_namespaces # noqa: E501 - - list or watch objects of kind PodSchedulingContext # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_pod_scheduling_context_for_all_namespaces_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha2PodSchedulingContextList, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'allow_watch_bookmarks', - '_continue', - 'field_selector', - 'label_selector', - 'limit', - 'pretty', - 'resource_version', - 'resource_version_match', - 'send_initial_events', - 'timeout_seconds', - 'watch' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_pod_scheduling_context_for_all_namespaces" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 - query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 - query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 - query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 - query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 - query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 - query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 - query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 - query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 - query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/resource.k8s.io/v1alpha2/podschedulingcontexts', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha2PodSchedulingContextList', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_resource_claim_for_all_namespaces(self, **kwargs): # noqa: E501 - """list_resource_claim_for_all_namespaces # noqa: E501 - - list or watch objects of kind ResourceClaim # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_resource_claim_for_all_namespaces(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha2ResourceClaimList - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_resource_claim_for_all_namespaces_with_http_info(**kwargs) # noqa: E501 - - def list_resource_claim_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501 - """list_resource_claim_for_all_namespaces # noqa: E501 - - list or watch objects of kind ResourceClaim # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_resource_claim_for_all_namespaces_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha2ResourceClaimList, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'allow_watch_bookmarks', - '_continue', - 'field_selector', - 'label_selector', - 'limit', - 'pretty', - 'resource_version', - 'resource_version_match', - 'send_initial_events', - 'timeout_seconds', - 'watch' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_resource_claim_for_all_namespaces" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 - query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 - query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 - query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 - query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 - query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 - query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 - query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 - query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 - query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/resource.k8s.io/v1alpha2/resourceclaims', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha2ResourceClaimList', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_resource_claim_parameters_for_all_namespaces(self, **kwargs): # noqa: E501 - """list_resource_claim_parameters_for_all_namespaces # noqa: E501 - - list or watch objects of kind ResourceClaimParameters # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_resource_claim_parameters_for_all_namespaces(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha2ResourceClaimParametersList - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_resource_claim_parameters_for_all_namespaces_with_http_info(**kwargs) # noqa: E501 - - def list_resource_claim_parameters_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501 - """list_resource_claim_parameters_for_all_namespaces # noqa: E501 - - list or watch objects of kind ResourceClaimParameters # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_resource_claim_parameters_for_all_namespaces_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha2ResourceClaimParametersList, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'allow_watch_bookmarks', - '_continue', - 'field_selector', - 'label_selector', - 'limit', - 'pretty', - 'resource_version', - 'resource_version_match', - 'send_initial_events', - 'timeout_seconds', - 'watch' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_resource_claim_parameters_for_all_namespaces" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 - query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 - query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 - query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 - query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 - query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 - query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 - query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 - query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 - query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/resource.k8s.io/v1alpha2/resourceclaimparameters', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha2ResourceClaimParametersList', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_resource_claim_template_for_all_namespaces(self, **kwargs): # noqa: E501 - """list_resource_claim_template_for_all_namespaces # noqa: E501 - - list or watch objects of kind ResourceClaimTemplate # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_resource_claim_template_for_all_namespaces(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha2ResourceClaimTemplateList - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_resource_claim_template_for_all_namespaces_with_http_info(**kwargs) # noqa: E501 - - def list_resource_claim_template_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501 - """list_resource_claim_template_for_all_namespaces # noqa: E501 - - list or watch objects of kind ResourceClaimTemplate # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_resource_claim_template_for_all_namespaces_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha2ResourceClaimTemplateList, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'allow_watch_bookmarks', - '_continue', - 'field_selector', - 'label_selector', - 'limit', - 'pretty', - 'resource_version', - 'resource_version_match', - 'send_initial_events', - 'timeout_seconds', - 'watch' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_resource_claim_template_for_all_namespaces" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 - query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 - query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 - query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 - query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 - query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 - query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 - query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 - query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 - query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/resource.k8s.io/v1alpha2/resourceclaimtemplates', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha2ResourceClaimTemplateList', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_resource_class(self, **kwargs): # noqa: E501 - """list_resource_class # noqa: E501 - - list or watch objects of kind ResourceClass # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_resource_class(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha2ResourceClassList - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_resource_class_with_http_info(**kwargs) # noqa: E501 - - def list_resource_class_with_http_info(self, **kwargs): # noqa: E501 - """list_resource_class # noqa: E501 - - list or watch objects of kind ResourceClass # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_resource_class_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha2ResourceClassList, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'pretty', - 'allow_watch_bookmarks', - '_continue', - 'field_selector', - 'label_selector', - 'limit', - 'resource_version', - 'resource_version_match', - 'send_initial_events', - 'timeout_seconds', - 'watch' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_resource_class" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 - query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 - query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 - query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 - query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 - query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 - query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 - query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 - query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 - query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/resource.k8s.io/v1alpha2/resourceclasses', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha2ResourceClassList', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_resource_class_parameters_for_all_namespaces(self, **kwargs): # noqa: E501 - """list_resource_class_parameters_for_all_namespaces # noqa: E501 - - list or watch objects of kind ResourceClassParameters # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_resource_class_parameters_for_all_namespaces(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha2ResourceClassParametersList - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_resource_class_parameters_for_all_namespaces_with_http_info(**kwargs) # noqa: E501 - - def list_resource_class_parameters_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501 - """list_resource_class_parameters_for_all_namespaces # noqa: E501 - - list or watch objects of kind ResourceClassParameters # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_resource_class_parameters_for_all_namespaces_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha2ResourceClassParametersList, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'allow_watch_bookmarks', - '_continue', - 'field_selector', - 'label_selector', - 'limit', - 'pretty', - 'resource_version', - 'resource_version_match', - 'send_initial_events', - 'timeout_seconds', - 'watch' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_resource_class_parameters_for_all_namespaces" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 - query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 - query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 - query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 - query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 - query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 - query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 - query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 - query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 - query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/resource.k8s.io/v1alpha2/resourceclassparameters', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha2ResourceClassParametersList', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_resource_slice(self, **kwargs): # noqa: E501 - """list_resource_slice # noqa: E501 - - list or watch objects of kind ResourceSlice # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_resource_slice(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha2ResourceSliceList - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_resource_slice_with_http_info(**kwargs) # noqa: E501 - - def list_resource_slice_with_http_info(self, **kwargs): # noqa: E501 - """list_resource_slice # noqa: E501 - - list or watch objects of kind ResourceSlice # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_resource_slice_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha2ResourceSliceList, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'pretty', - 'allow_watch_bookmarks', - '_continue', - 'field_selector', - 'label_selector', - 'limit', - 'resource_version', - 'resource_version_match', - 'send_initial_events', - 'timeout_seconds', - 'watch' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_resource_slice" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 - query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 - query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 - query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 - query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 - query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 - query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 - query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 - query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 - query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/resource.k8s.io/v1alpha2/resourceslices', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha2ResourceSliceList', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def patch_namespaced_pod_scheduling_context(self, name, namespace, body, **kwargs): # noqa: E501 - """patch_namespaced_pod_scheduling_context # noqa: E501 - - partially update the specified PodSchedulingContext # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_namespaced_pod_scheduling_context(name, namespace, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the PodSchedulingContext (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha2PodSchedulingContext - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.patch_namespaced_pod_scheduling_context_with_http_info(name, namespace, body, **kwargs) # noqa: E501 - - def patch_namespaced_pod_scheduling_context_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501 - """patch_namespaced_pod_scheduling_context # noqa: E501 - - partially update the specified PodSchedulingContext # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_namespaced_pod_scheduling_context_with_http_info(name, namespace, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the PodSchedulingContext (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha2PodSchedulingContext, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'namespace', - 'body', - 'pretty', - 'dry_run', - 'field_manager', - 'field_validation', - 'force' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method patch_namespaced_pod_scheduling_context" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_pod_scheduling_context`") # noqa: E501 - # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_pod_scheduling_context`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_pod_scheduling_context`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - if 'namespace' in local_var_params: - path_params['namespace'] = local_var_params['namespace'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 - query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 - query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 - query_params.append(('force', local_var_params['force'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/podschedulingcontexts/{name}', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha2PodSchedulingContext', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def patch_namespaced_pod_scheduling_context_status(self, name, namespace, body, **kwargs): # noqa: E501 - """patch_namespaced_pod_scheduling_context_status # noqa: E501 - - partially update status of the specified PodSchedulingContext # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_namespaced_pod_scheduling_context_status(name, namespace, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the PodSchedulingContext (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha2PodSchedulingContext - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.patch_namespaced_pod_scheduling_context_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501 - - def patch_namespaced_pod_scheduling_context_status_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501 - """patch_namespaced_pod_scheduling_context_status # noqa: E501 - - partially update status of the specified PodSchedulingContext # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_namespaced_pod_scheduling_context_status_with_http_info(name, namespace, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the PodSchedulingContext (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha2PodSchedulingContext, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'namespace', - 'body', - 'pretty', - 'dry_run', - 'field_manager', - 'field_validation', - 'force' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method patch_namespaced_pod_scheduling_context_status" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_pod_scheduling_context_status`") # noqa: E501 - # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_pod_scheduling_context_status`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_pod_scheduling_context_status`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - if 'namespace' in local_var_params: - path_params['namespace'] = local_var_params['namespace'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 - query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 - query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 - query_params.append(('force', local_var_params['force'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/podschedulingcontexts/{name}/status', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha2PodSchedulingContext', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def patch_namespaced_resource_claim(self, name, namespace, body, **kwargs): # noqa: E501 - """patch_namespaced_resource_claim # noqa: E501 - - partially update the specified ResourceClaim # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_namespaced_resource_claim(name, namespace, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ResourceClaim (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha2ResourceClaim - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.patch_namespaced_resource_claim_with_http_info(name, namespace, body, **kwargs) # noqa: E501 - - def patch_namespaced_resource_claim_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501 - """patch_namespaced_resource_claim # noqa: E501 - - partially update the specified ResourceClaim # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_namespaced_resource_claim_with_http_info(name, namespace, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ResourceClaim (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha2ResourceClaim, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'namespace', - 'body', - 'pretty', - 'dry_run', - 'field_manager', - 'field_validation', - 'force' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method patch_namespaced_resource_claim" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_resource_claim`") # noqa: E501 - # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_resource_claim`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_resource_claim`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - if 'namespace' in local_var_params: - path_params['namespace'] = local_var_params['namespace'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 - query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 - query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 - query_params.append(('force', local_var_params['force'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaims/{name}', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha2ResourceClaim', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def patch_namespaced_resource_claim_parameters(self, name, namespace, body, **kwargs): # noqa: E501 - """patch_namespaced_resource_claim_parameters # noqa: E501 - - partially update the specified ResourceClaimParameters # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_namespaced_resource_claim_parameters(name, namespace, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ResourceClaimParameters (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha2ResourceClaimParameters - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.patch_namespaced_resource_claim_parameters_with_http_info(name, namespace, body, **kwargs) # noqa: E501 - - def patch_namespaced_resource_claim_parameters_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501 - """patch_namespaced_resource_claim_parameters # noqa: E501 - - partially update the specified ResourceClaimParameters # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_namespaced_resource_claim_parameters_with_http_info(name, namespace, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ResourceClaimParameters (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha2ResourceClaimParameters, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'namespace', - 'body', - 'pretty', - 'dry_run', - 'field_manager', - 'field_validation', - 'force' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method patch_namespaced_resource_claim_parameters" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_resource_claim_parameters`") # noqa: E501 - # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_resource_claim_parameters`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_resource_claim_parameters`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - if 'namespace' in local_var_params: - path_params['namespace'] = local_var_params['namespace'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 - query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 - query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 - query_params.append(('force', local_var_params['force'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaimparameters/{name}', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha2ResourceClaimParameters', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def patch_namespaced_resource_claim_status(self, name, namespace, body, **kwargs): # noqa: E501 - """patch_namespaced_resource_claim_status # noqa: E501 - - partially update status of the specified ResourceClaim # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_namespaced_resource_claim_status(name, namespace, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ResourceClaim (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha2ResourceClaim - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.patch_namespaced_resource_claim_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501 - - def patch_namespaced_resource_claim_status_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501 - """patch_namespaced_resource_claim_status # noqa: E501 - - partially update status of the specified ResourceClaim # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_namespaced_resource_claim_status_with_http_info(name, namespace, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ResourceClaim (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha2ResourceClaim, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'namespace', - 'body', - 'pretty', - 'dry_run', - 'field_manager', - 'field_validation', - 'force' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method patch_namespaced_resource_claim_status" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_resource_claim_status`") # noqa: E501 - # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_resource_claim_status`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_resource_claim_status`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - if 'namespace' in local_var_params: - path_params['namespace'] = local_var_params['namespace'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 - query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 - query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 - query_params.append(('force', local_var_params['force'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaims/{name}/status', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha2ResourceClaim', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def patch_namespaced_resource_claim_template(self, name, namespace, body, **kwargs): # noqa: E501 - """patch_namespaced_resource_claim_template # noqa: E501 - - partially update the specified ResourceClaimTemplate # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_namespaced_resource_claim_template(name, namespace, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ResourceClaimTemplate (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha2ResourceClaimTemplate - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.patch_namespaced_resource_claim_template_with_http_info(name, namespace, body, **kwargs) # noqa: E501 - - def patch_namespaced_resource_claim_template_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501 - """patch_namespaced_resource_claim_template # noqa: E501 - - partially update the specified ResourceClaimTemplate # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_namespaced_resource_claim_template_with_http_info(name, namespace, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ResourceClaimTemplate (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha2ResourceClaimTemplate, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'namespace', - 'body', - 'pretty', - 'dry_run', - 'field_manager', - 'field_validation', - 'force' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method patch_namespaced_resource_claim_template" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_resource_claim_template`") # noqa: E501 - # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_resource_claim_template`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_resource_claim_template`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - if 'namespace' in local_var_params: - path_params['namespace'] = local_var_params['namespace'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 - query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 - query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 - query_params.append(('force', local_var_params['force'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaimtemplates/{name}', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha2ResourceClaimTemplate', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def patch_namespaced_resource_class_parameters(self, name, namespace, body, **kwargs): # noqa: E501 - """patch_namespaced_resource_class_parameters # noqa: E501 - - partially update the specified ResourceClassParameters # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_namespaced_resource_class_parameters(name, namespace, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ResourceClassParameters (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha2ResourceClassParameters - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.patch_namespaced_resource_class_parameters_with_http_info(name, namespace, body, **kwargs) # noqa: E501 - - def patch_namespaced_resource_class_parameters_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501 - """patch_namespaced_resource_class_parameters # noqa: E501 - - partially update the specified ResourceClassParameters # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_namespaced_resource_class_parameters_with_http_info(name, namespace, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ResourceClassParameters (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha2ResourceClassParameters, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'namespace', - 'body', - 'pretty', - 'dry_run', - 'field_manager', - 'field_validation', - 'force' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method patch_namespaced_resource_class_parameters" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_resource_class_parameters`") # noqa: E501 - # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_resource_class_parameters`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_resource_class_parameters`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - if 'namespace' in local_var_params: - path_params['namespace'] = local_var_params['namespace'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 - query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 - query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 - query_params.append(('force', local_var_params['force'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclassparameters/{name}', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha2ResourceClassParameters', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def patch_resource_class(self, name, body, **kwargs): # noqa: E501 - """patch_resource_class # noqa: E501 - - partially update the specified ResourceClass # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_resource_class(name, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ResourceClass (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha2ResourceClass - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.patch_resource_class_with_http_info(name, body, **kwargs) # noqa: E501 - - def patch_resource_class_with_http_info(self, name, body, **kwargs): # noqa: E501 - """patch_resource_class # noqa: E501 - - partially update the specified ResourceClass # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_resource_class_with_http_info(name, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ResourceClass (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha2ResourceClass, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'body', - 'pretty', - 'dry_run', - 'field_manager', - 'field_validation', - 'force' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method patch_resource_class" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `patch_resource_class`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `patch_resource_class`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 - query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 - query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 - query_params.append(('force', local_var_params['force'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/resource.k8s.io/v1alpha2/resourceclasses/{name}', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha2ResourceClass', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def patch_resource_slice(self, name, body, **kwargs): # noqa: E501 - """patch_resource_slice # noqa: E501 - - partially update the specified ResourceSlice # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_resource_slice(name, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ResourceSlice (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha2ResourceSlice - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.patch_resource_slice_with_http_info(name, body, **kwargs) # noqa: E501 - - def patch_resource_slice_with_http_info(self, name, body, **kwargs): # noqa: E501 - """patch_resource_slice # noqa: E501 - - partially update the specified ResourceSlice # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_resource_slice_with_http_info(name, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ResourceSlice (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha2ResourceSlice, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'body', - 'pretty', - 'dry_run', - 'field_manager', - 'field_validation', - 'force' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method patch_resource_slice" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `patch_resource_slice`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `patch_resource_slice`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 - query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 - query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 - query_params.append(('force', local_var_params['force'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/resource.k8s.io/v1alpha2/resourceslices/{name}', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha2ResourceSlice', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def read_namespaced_pod_scheduling_context(self, name, namespace, **kwargs): # noqa: E501 - """read_namespaced_pod_scheduling_context # noqa: E501 - - read the specified PodSchedulingContext # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.read_namespaced_pod_scheduling_context(name, namespace, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the PodSchedulingContext (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha2PodSchedulingContext - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.read_namespaced_pod_scheduling_context_with_http_info(name, namespace, **kwargs) # noqa: E501 - - def read_namespaced_pod_scheduling_context_with_http_info(self, name, namespace, **kwargs): # noqa: E501 - """read_namespaced_pod_scheduling_context # noqa: E501 - - read the specified PodSchedulingContext # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.read_namespaced_pod_scheduling_context_with_http_info(name, namespace, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the PodSchedulingContext (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha2PodSchedulingContext, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'namespace', - 'pretty' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method read_namespaced_pod_scheduling_context" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_pod_scheduling_context`") # noqa: E501 - # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_pod_scheduling_context`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - if 'namespace' in local_var_params: - path_params['namespace'] = local_var_params['namespace'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/podschedulingcontexts/{name}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha2PodSchedulingContext', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def read_namespaced_pod_scheduling_context_status(self, name, namespace, **kwargs): # noqa: E501 - """read_namespaced_pod_scheduling_context_status # noqa: E501 - - read status of the specified PodSchedulingContext # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.read_namespaced_pod_scheduling_context_status(name, namespace, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the PodSchedulingContext (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha2PodSchedulingContext - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.read_namespaced_pod_scheduling_context_status_with_http_info(name, namespace, **kwargs) # noqa: E501 - - def read_namespaced_pod_scheduling_context_status_with_http_info(self, name, namespace, **kwargs): # noqa: E501 - """read_namespaced_pod_scheduling_context_status # noqa: E501 - - read status of the specified PodSchedulingContext # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.read_namespaced_pod_scheduling_context_status_with_http_info(name, namespace, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the PodSchedulingContext (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha2PodSchedulingContext, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'namespace', - 'pretty' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method read_namespaced_pod_scheduling_context_status" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_pod_scheduling_context_status`") # noqa: E501 - # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_pod_scheduling_context_status`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - if 'namespace' in local_var_params: - path_params['namespace'] = local_var_params['namespace'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/podschedulingcontexts/{name}/status', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha2PodSchedulingContext', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def read_namespaced_resource_claim(self, name, namespace, **kwargs): # noqa: E501 - """read_namespaced_resource_claim # noqa: E501 - - read the specified ResourceClaim # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.read_namespaced_resource_claim(name, namespace, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ResourceClaim (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha2ResourceClaim - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.read_namespaced_resource_claim_with_http_info(name, namespace, **kwargs) # noqa: E501 - - def read_namespaced_resource_claim_with_http_info(self, name, namespace, **kwargs): # noqa: E501 - """read_namespaced_resource_claim # noqa: E501 - - read the specified ResourceClaim # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.read_namespaced_resource_claim_with_http_info(name, namespace, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ResourceClaim (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha2ResourceClaim, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'namespace', - 'pretty' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method read_namespaced_resource_claim" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_resource_claim`") # noqa: E501 - # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_resource_claim`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - if 'namespace' in local_var_params: - path_params['namespace'] = local_var_params['namespace'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaims/{name}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha2ResourceClaim', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def read_namespaced_resource_claim_parameters(self, name, namespace, **kwargs): # noqa: E501 - """read_namespaced_resource_claim_parameters # noqa: E501 - - read the specified ResourceClaimParameters # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.read_namespaced_resource_claim_parameters(name, namespace, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ResourceClaimParameters (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha2ResourceClaimParameters - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.read_namespaced_resource_claim_parameters_with_http_info(name, namespace, **kwargs) # noqa: E501 - - def read_namespaced_resource_claim_parameters_with_http_info(self, name, namespace, **kwargs): # noqa: E501 - """read_namespaced_resource_claim_parameters # noqa: E501 - - read the specified ResourceClaimParameters # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.read_namespaced_resource_claim_parameters_with_http_info(name, namespace, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ResourceClaimParameters (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha2ResourceClaimParameters, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'namespace', - 'pretty' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method read_namespaced_resource_claim_parameters" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_resource_claim_parameters`") # noqa: E501 - # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_resource_claim_parameters`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - if 'namespace' in local_var_params: - path_params['namespace'] = local_var_params['namespace'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaimparameters/{name}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha2ResourceClaimParameters', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def read_namespaced_resource_claim_status(self, name, namespace, **kwargs): # noqa: E501 - """read_namespaced_resource_claim_status # noqa: E501 - - read status of the specified ResourceClaim # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.read_namespaced_resource_claim_status(name, namespace, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ResourceClaim (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha2ResourceClaim - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.read_namespaced_resource_claim_status_with_http_info(name, namespace, **kwargs) # noqa: E501 - - def read_namespaced_resource_claim_status_with_http_info(self, name, namespace, **kwargs): # noqa: E501 - """read_namespaced_resource_claim_status # noqa: E501 - - read status of the specified ResourceClaim # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.read_namespaced_resource_claim_status_with_http_info(name, namespace, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ResourceClaim (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha2ResourceClaim, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'namespace', - 'pretty' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method read_namespaced_resource_claim_status" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_resource_claim_status`") # noqa: E501 - # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_resource_claim_status`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - if 'namespace' in local_var_params: - path_params['namespace'] = local_var_params['namespace'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaims/{name}/status', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha2ResourceClaim', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def read_namespaced_resource_claim_template(self, name, namespace, **kwargs): # noqa: E501 - """read_namespaced_resource_claim_template # noqa: E501 - - read the specified ResourceClaimTemplate # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.read_namespaced_resource_claim_template(name, namespace, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ResourceClaimTemplate (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha2ResourceClaimTemplate - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.read_namespaced_resource_claim_template_with_http_info(name, namespace, **kwargs) # noqa: E501 - - def read_namespaced_resource_claim_template_with_http_info(self, name, namespace, **kwargs): # noqa: E501 - """read_namespaced_resource_claim_template # noqa: E501 - - read the specified ResourceClaimTemplate # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.read_namespaced_resource_claim_template_with_http_info(name, namespace, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ResourceClaimTemplate (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha2ResourceClaimTemplate, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'namespace', - 'pretty' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method read_namespaced_resource_claim_template" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_resource_claim_template`") # noqa: E501 - # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_resource_claim_template`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - if 'namespace' in local_var_params: - path_params['namespace'] = local_var_params['namespace'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaimtemplates/{name}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha2ResourceClaimTemplate', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def read_namespaced_resource_class_parameters(self, name, namespace, **kwargs): # noqa: E501 - """read_namespaced_resource_class_parameters # noqa: E501 - - read the specified ResourceClassParameters # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.read_namespaced_resource_class_parameters(name, namespace, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ResourceClassParameters (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha2ResourceClassParameters - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.read_namespaced_resource_class_parameters_with_http_info(name, namespace, **kwargs) # noqa: E501 - - def read_namespaced_resource_class_parameters_with_http_info(self, name, namespace, **kwargs): # noqa: E501 - """read_namespaced_resource_class_parameters # noqa: E501 - - read the specified ResourceClassParameters # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.read_namespaced_resource_class_parameters_with_http_info(name, namespace, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ResourceClassParameters (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha2ResourceClassParameters, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'namespace', - 'pretty' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method read_namespaced_resource_class_parameters" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_resource_class_parameters`") # noqa: E501 - # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_resource_class_parameters`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - if 'namespace' in local_var_params: - path_params['namespace'] = local_var_params['namespace'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclassparameters/{name}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha2ResourceClassParameters', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def read_resource_class(self, name, **kwargs): # noqa: E501 - """read_resource_class # noqa: E501 - - read the specified ResourceClass # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.read_resource_class(name, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ResourceClass (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha2ResourceClass - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.read_resource_class_with_http_info(name, **kwargs) # noqa: E501 - - def read_resource_class_with_http_info(self, name, **kwargs): # noqa: E501 - """read_resource_class # noqa: E501 - - read the specified ResourceClass # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.read_resource_class_with_http_info(name, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ResourceClass (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha2ResourceClass, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'pretty' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method read_resource_class" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `read_resource_class`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/resource.k8s.io/v1alpha2/resourceclasses/{name}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha2ResourceClass', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def read_resource_slice(self, name, **kwargs): # noqa: E501 - """read_resource_slice # noqa: E501 - - read the specified ResourceSlice # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.read_resource_slice(name, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ResourceSlice (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha2ResourceSlice - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.read_resource_slice_with_http_info(name, **kwargs) # noqa: E501 - - def read_resource_slice_with_http_info(self, name, **kwargs): # noqa: E501 - """read_resource_slice # noqa: E501 - - read the specified ResourceSlice # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.read_resource_slice_with_http_info(name, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ResourceSlice (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha2ResourceSlice, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'pretty' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method read_resource_slice" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `read_resource_slice`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/resource.k8s.io/v1alpha2/resourceslices/{name}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha2ResourceSlice', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def replace_namespaced_pod_scheduling_context(self, name, namespace, body, **kwargs): # noqa: E501 - """replace_namespaced_pod_scheduling_context # noqa: E501 - - replace the specified PodSchedulingContext # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.replace_namespaced_pod_scheduling_context(name, namespace, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the PodSchedulingContext (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1alpha2PodSchedulingContext body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha2PodSchedulingContext - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.replace_namespaced_pod_scheduling_context_with_http_info(name, namespace, body, **kwargs) # noqa: E501 - - def replace_namespaced_pod_scheduling_context_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501 - """replace_namespaced_pod_scheduling_context # noqa: E501 - - replace the specified PodSchedulingContext # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.replace_namespaced_pod_scheduling_context_with_http_info(name, namespace, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the PodSchedulingContext (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1alpha2PodSchedulingContext body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha2PodSchedulingContext, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'namespace', - 'body', - 'pretty', - 'dry_run', - 'field_manager', - 'field_validation' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method replace_namespaced_pod_scheduling_context" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_pod_scheduling_context`") # noqa: E501 - # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_pod_scheduling_context`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_pod_scheduling_context`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - if 'namespace' in local_var_params: - path_params['namespace'] = local_var_params['namespace'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 - query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 - query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/podschedulingcontexts/{name}', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha2PodSchedulingContext', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def replace_namespaced_pod_scheduling_context_status(self, name, namespace, body, **kwargs): # noqa: E501 - """replace_namespaced_pod_scheduling_context_status # noqa: E501 - - replace status of the specified PodSchedulingContext # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.replace_namespaced_pod_scheduling_context_status(name, namespace, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the PodSchedulingContext (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1alpha2PodSchedulingContext body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha2PodSchedulingContext - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.replace_namespaced_pod_scheduling_context_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501 - - def replace_namespaced_pod_scheduling_context_status_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501 - """replace_namespaced_pod_scheduling_context_status # noqa: E501 - - replace status of the specified PodSchedulingContext # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.replace_namespaced_pod_scheduling_context_status_with_http_info(name, namespace, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the PodSchedulingContext (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1alpha2PodSchedulingContext body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha2PodSchedulingContext, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'namespace', - 'body', - 'pretty', - 'dry_run', - 'field_manager', - 'field_validation' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method replace_namespaced_pod_scheduling_context_status" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_pod_scheduling_context_status`") # noqa: E501 - # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_pod_scheduling_context_status`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_pod_scheduling_context_status`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - if 'namespace' in local_var_params: - path_params['namespace'] = local_var_params['namespace'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 - query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 - query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/podschedulingcontexts/{name}/status', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha2PodSchedulingContext', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def replace_namespaced_resource_claim(self, name, namespace, body, **kwargs): # noqa: E501 - """replace_namespaced_resource_claim # noqa: E501 - - replace the specified ResourceClaim # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.replace_namespaced_resource_claim(name, namespace, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ResourceClaim (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1alpha2ResourceClaim body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha2ResourceClaim - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.replace_namespaced_resource_claim_with_http_info(name, namespace, body, **kwargs) # noqa: E501 - - def replace_namespaced_resource_claim_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501 - """replace_namespaced_resource_claim # noqa: E501 - - replace the specified ResourceClaim # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.replace_namespaced_resource_claim_with_http_info(name, namespace, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ResourceClaim (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1alpha2ResourceClaim body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha2ResourceClaim, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'namespace', - 'body', - 'pretty', - 'dry_run', - 'field_manager', - 'field_validation' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method replace_namespaced_resource_claim" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_resource_claim`") # noqa: E501 - # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_resource_claim`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_resource_claim`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - if 'namespace' in local_var_params: - path_params['namespace'] = local_var_params['namespace'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 - query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 - query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaims/{name}', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha2ResourceClaim', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def replace_namespaced_resource_claim_parameters(self, name, namespace, body, **kwargs): # noqa: E501 - """replace_namespaced_resource_claim_parameters # noqa: E501 - - replace the specified ResourceClaimParameters # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.replace_namespaced_resource_claim_parameters(name, namespace, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ResourceClaimParameters (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1alpha2ResourceClaimParameters body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha2ResourceClaimParameters - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.replace_namespaced_resource_claim_parameters_with_http_info(name, namespace, body, **kwargs) # noqa: E501 - - def replace_namespaced_resource_claim_parameters_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501 - """replace_namespaced_resource_claim_parameters # noqa: E501 - - replace the specified ResourceClaimParameters # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.replace_namespaced_resource_claim_parameters_with_http_info(name, namespace, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ResourceClaimParameters (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1alpha2ResourceClaimParameters body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha2ResourceClaimParameters, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'namespace', - 'body', - 'pretty', - 'dry_run', - 'field_manager', - 'field_validation' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method replace_namespaced_resource_claim_parameters" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_resource_claim_parameters`") # noqa: E501 - # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_resource_claim_parameters`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_resource_claim_parameters`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - if 'namespace' in local_var_params: - path_params['namespace'] = local_var_params['namespace'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 - query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 - query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaimparameters/{name}', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha2ResourceClaimParameters', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def replace_namespaced_resource_claim_status(self, name, namespace, body, **kwargs): # noqa: E501 - """replace_namespaced_resource_claim_status # noqa: E501 - - replace status of the specified ResourceClaim # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.replace_namespaced_resource_claim_status(name, namespace, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ResourceClaim (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1alpha2ResourceClaim body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha2ResourceClaim - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.replace_namespaced_resource_claim_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501 - - def replace_namespaced_resource_claim_status_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501 - """replace_namespaced_resource_claim_status # noqa: E501 - - replace status of the specified ResourceClaim # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.replace_namespaced_resource_claim_status_with_http_info(name, namespace, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ResourceClaim (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1alpha2ResourceClaim body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha2ResourceClaim, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'namespace', - 'body', - 'pretty', - 'dry_run', - 'field_manager', - 'field_validation' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method replace_namespaced_resource_claim_status" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_resource_claim_status`") # noqa: E501 - # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_resource_claim_status`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_resource_claim_status`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - if 'namespace' in local_var_params: - path_params['namespace'] = local_var_params['namespace'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 - query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 - query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaims/{name}/status', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha2ResourceClaim', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def replace_namespaced_resource_claim_template(self, name, namespace, body, **kwargs): # noqa: E501 - """replace_namespaced_resource_claim_template # noqa: E501 - - replace the specified ResourceClaimTemplate # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.replace_namespaced_resource_claim_template(name, namespace, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ResourceClaimTemplate (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1alpha2ResourceClaimTemplate body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha2ResourceClaimTemplate - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.replace_namespaced_resource_claim_template_with_http_info(name, namespace, body, **kwargs) # noqa: E501 - - def replace_namespaced_resource_claim_template_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501 - """replace_namespaced_resource_claim_template # noqa: E501 - - replace the specified ResourceClaimTemplate # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.replace_namespaced_resource_claim_template_with_http_info(name, namespace, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ResourceClaimTemplate (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1alpha2ResourceClaimTemplate body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha2ResourceClaimTemplate, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'namespace', - 'body', - 'pretty', - 'dry_run', - 'field_manager', - 'field_validation' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method replace_namespaced_resource_claim_template" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_resource_claim_template`") # noqa: E501 - # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_resource_claim_template`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_resource_claim_template`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - if 'namespace' in local_var_params: - path_params['namespace'] = local_var_params['namespace'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 - query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 - query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaimtemplates/{name}', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha2ResourceClaimTemplate', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def replace_namespaced_resource_class_parameters(self, name, namespace, body, **kwargs): # noqa: E501 - """replace_namespaced_resource_class_parameters # noqa: E501 - - replace the specified ResourceClassParameters # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.replace_namespaced_resource_class_parameters(name, namespace, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ResourceClassParameters (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1alpha2ResourceClassParameters body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha2ResourceClassParameters - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.replace_namespaced_resource_class_parameters_with_http_info(name, namespace, body, **kwargs) # noqa: E501 - - def replace_namespaced_resource_class_parameters_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501 - """replace_namespaced_resource_class_parameters # noqa: E501 - - replace the specified ResourceClassParameters # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.replace_namespaced_resource_class_parameters_with_http_info(name, namespace, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ResourceClassParameters (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1alpha2ResourceClassParameters body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha2ResourceClassParameters, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'namespace', - 'body', - 'pretty', - 'dry_run', - 'field_manager', - 'field_validation' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method replace_namespaced_resource_class_parameters" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_resource_class_parameters`") # noqa: E501 - # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_resource_class_parameters`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_resource_class_parameters`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - if 'namespace' in local_var_params: - path_params['namespace'] = local_var_params['namespace'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 - query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 - query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclassparameters/{name}', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha2ResourceClassParameters', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def replace_resource_class(self, name, body, **kwargs): # noqa: E501 - """replace_resource_class # noqa: E501 - - replace the specified ResourceClass # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.replace_resource_class(name, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ResourceClass (required) - :param V1alpha2ResourceClass body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha2ResourceClass - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.replace_resource_class_with_http_info(name, body, **kwargs) # noqa: E501 - - def replace_resource_class_with_http_info(self, name, body, **kwargs): # noqa: E501 - """replace_resource_class # noqa: E501 - - replace the specified ResourceClass # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.replace_resource_class_with_http_info(name, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ResourceClass (required) - :param V1alpha2ResourceClass body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha2ResourceClass, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'body', - 'pretty', - 'dry_run', - 'field_manager', - 'field_validation' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method replace_resource_class" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `replace_resource_class`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `replace_resource_class`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 - query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 - query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/resource.k8s.io/v1alpha2/resourceclasses/{name}', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha2ResourceClass', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def replace_resource_slice(self, name, body, **kwargs): # noqa: E501 - """replace_resource_slice # noqa: E501 - - replace the specified ResourceSlice # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.replace_resource_slice(name, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ResourceSlice (required) - :param V1alpha2ResourceSlice body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha2ResourceSlice - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.replace_resource_slice_with_http_info(name, body, **kwargs) # noqa: E501 - - def replace_resource_slice_with_http_info(self, name, body, **kwargs): # noqa: E501 - """replace_resource_slice # noqa: E501 - - replace the specified ResourceSlice # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.replace_resource_slice_with_http_info(name, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the ResourceSlice (required) - :param V1alpha2ResourceSlice body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha2ResourceSlice, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'body', - 'pretty', - 'dry_run', - 'field_manager', - 'field_validation' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method replace_resource_slice" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `replace_resource_slice`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `replace_resource_slice`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 - query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 - query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/resource.k8s.io/v1alpha2/resourceslices/{name}', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha2ResourceSlice', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) diff --git a/kubernetes/client/api/resource_v1alpha3_api.py b/kubernetes/client/api/resource_v1alpha3_api.py new file mode 100644 index 0000000000..b2d79c46fb --- /dev/null +++ b/kubernetes/client/api/resource_v1alpha3_api.py @@ -0,0 +1,1987 @@ +# coding: utf-8 + +""" + Kubernetes + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: release-1.35 + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from kubernetes.client.api_client import ApiClient +from kubernetes.client.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class ResourceV1alpha3Api(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def create_device_taint_rule(self, body, **kwargs): # noqa: E501 + """create_device_taint_rule # noqa: E501 + + create a DeviceTaintRule # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_device_taint_rule(body, async_req=True) + >>> result = thread.get() + + :param body: (required) + :type body: V1alpha3DeviceTaintRule + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1alpha3DeviceTaintRule + """ + kwargs['_return_http_data_only'] = True + return self.create_device_taint_rule_with_http_info(body, **kwargs) # noqa: E501 + + def create_device_taint_rule_with_http_info(self, body, **kwargs): # noqa: E501 + """create_device_taint_rule # noqa: E501 + + create a DeviceTaintRule # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_device_taint_rule_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param body: (required) + :type body: V1alpha3DeviceTaintRule + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1alpha3DeviceTaintRule, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_device_taint_rule" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `create_device_taint_rule`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1alpha3DeviceTaintRule", + 201: "V1alpha3DeviceTaintRule", + 202: "V1alpha3DeviceTaintRule", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1alpha3/devicetaintrules', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_collection_device_taint_rule(self, **kwargs): # noqa: E501 + """delete_collection_device_taint_rule # noqa: E501 + + delete collection of DeviceTaintRule # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_collection_device_taint_rule(async_req=True) + >>> result = thread.get() + + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1Status + """ + kwargs['_return_http_data_only'] = True + return self.delete_collection_device_taint_rule_with_http_info(**kwargs) # noqa: E501 + + def delete_collection_device_taint_rule_with_http_info(self, **kwargs): # noqa: E501 + """delete_collection_device_taint_rule # noqa: E501 + + delete collection of DeviceTaintRule # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_collection_device_taint_rule_with_http_info(async_req=True) + >>> result = thread.get() + + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'pretty', + '_continue', + 'dry_run', + 'field_selector', + 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', + 'label_selector', + 'limit', + 'orphan_dependents', + 'propagation_policy', + 'resource_version', + 'resource_version_match', + 'send_initial_events', + 'timeout_seconds', + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_collection_device_taint_rule" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 + query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 + query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 + query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 + query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 + query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 + query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 + query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 + query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 + query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 + query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1Status", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1alpha3/devicetaintrules', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_device_taint_rule(self, name, **kwargs): # noqa: E501 + """delete_device_taint_rule # noqa: E501 + + delete a DeviceTaintRule # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_device_taint_rule(name, async_req=True) + >>> result = thread.get() + + :param name: name of the DeviceTaintRule (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1alpha3DeviceTaintRule + """ + kwargs['_return_http_data_only'] = True + return self.delete_device_taint_rule_with_http_info(name, **kwargs) # noqa: E501 + + def delete_device_taint_rule_with_http_info(self, name, **kwargs): # noqa: E501 + """delete_device_taint_rule # noqa: E501 + + delete a DeviceTaintRule # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_device_taint_rule_with_http_info(name, async_req=True) + >>> result = thread.get() + + :param name: name of the DeviceTaintRule (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1alpha3DeviceTaintRule, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'pretty', + 'dry_run', + 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', + 'orphan_dependents', + 'propagation_policy', + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_device_taint_rule" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `delete_device_taint_rule`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 + query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 + query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 + query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1alpha3DeviceTaintRule", + 202: "V1alpha3DeviceTaintRule", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1alpha3/devicetaintrules/{name}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_api_resources(self, **kwargs): # noqa: E501 + """get_api_resources # noqa: E501 + + get available resources # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_api_resources(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1APIResourceList + """ + kwargs['_return_http_data_only'] = True + return self.get_api_resources_with_http_info(**kwargs) # noqa: E501 + + def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 + """get_api_resources # noqa: E501 + + get available resources # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_api_resources_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_api_resources" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1APIResourceList", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1alpha3/', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def list_device_taint_rule(self, **kwargs): # noqa: E501 + """list_device_taint_rule # noqa: E501 + + list or watch objects of kind DeviceTaintRule # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_device_taint_rule(async_req=True) + >>> result = thread.get() + + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1alpha3DeviceTaintRuleList + """ + kwargs['_return_http_data_only'] = True + return self.list_device_taint_rule_with_http_info(**kwargs) # noqa: E501 + + def list_device_taint_rule_with_http_info(self, **kwargs): # noqa: E501 + """list_device_taint_rule # noqa: E501 + + list or watch objects of kind DeviceTaintRule # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_device_taint_rule_with_http_info(async_req=True) + >>> result = thread.get() + + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1alpha3DeviceTaintRuleList, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'pretty', + 'allow_watch_bookmarks', + '_continue', + 'field_selector', + 'label_selector', + 'limit', + 'resource_version', + 'resource_version_match', + 'send_initial_events', + 'timeout_seconds', + 'watch' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_device_taint_rule" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 + query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 + query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 + query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 + query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 + query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 + query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 + query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 + query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 + query_params.append(('watch', local_var_params['watch'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1alpha3DeviceTaintRuleList", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1alpha3/devicetaintrules', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def patch_device_taint_rule(self, name, body, **kwargs): # noqa: E501 + """patch_device_taint_rule # noqa: E501 + + partially update the specified DeviceTaintRule # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_device_taint_rule(name, body, async_req=True) + >>> result = thread.get() + + :param name: name of the DeviceTaintRule (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1alpha3DeviceTaintRule + """ + kwargs['_return_http_data_only'] = True + return self.patch_device_taint_rule_with_http_info(name, body, **kwargs) # noqa: E501 + + def patch_device_taint_rule_with_http_info(self, name, body, **kwargs): # noqa: E501 + """patch_device_taint_rule # noqa: E501 + + partially update the specified DeviceTaintRule # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_device_taint_rule_with_http_info(name, body, async_req=True) + >>> result = thread.get() + + :param name: name of the DeviceTaintRule (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1alpha3DeviceTaintRule, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation', + 'force' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method patch_device_taint_rule" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `patch_device_taint_rule`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `patch_device_taint_rule`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 + query_params.append(('force', local_var_params['force'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # HTTP header `Content-Type` + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1alpha3DeviceTaintRule", + 201: "V1alpha3DeviceTaintRule", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1alpha3/devicetaintrules/{name}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def patch_device_taint_rule_status(self, name, body, **kwargs): # noqa: E501 + """patch_device_taint_rule_status # noqa: E501 + + partially update status of the specified DeviceTaintRule # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_device_taint_rule_status(name, body, async_req=True) + >>> result = thread.get() + + :param name: name of the DeviceTaintRule (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1alpha3DeviceTaintRule + """ + kwargs['_return_http_data_only'] = True + return self.patch_device_taint_rule_status_with_http_info(name, body, **kwargs) # noqa: E501 + + def patch_device_taint_rule_status_with_http_info(self, name, body, **kwargs): # noqa: E501 + """patch_device_taint_rule_status # noqa: E501 + + partially update status of the specified DeviceTaintRule # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_device_taint_rule_status_with_http_info(name, body, async_req=True) + >>> result = thread.get() + + :param name: name of the DeviceTaintRule (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1alpha3DeviceTaintRule, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation', + 'force' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method patch_device_taint_rule_status" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `patch_device_taint_rule_status`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `patch_device_taint_rule_status`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 + query_params.append(('force', local_var_params['force'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # HTTP header `Content-Type` + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1alpha3DeviceTaintRule", + 201: "V1alpha3DeviceTaintRule", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1alpha3/devicetaintrules/{name}/status', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def read_device_taint_rule(self, name, **kwargs): # noqa: E501 + """read_device_taint_rule # noqa: E501 + + read the specified DeviceTaintRule # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.read_device_taint_rule(name, async_req=True) + >>> result = thread.get() + + :param name: name of the DeviceTaintRule (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1alpha3DeviceTaintRule + """ + kwargs['_return_http_data_only'] = True + return self.read_device_taint_rule_with_http_info(name, **kwargs) # noqa: E501 + + def read_device_taint_rule_with_http_info(self, name, **kwargs): # noqa: E501 + """read_device_taint_rule # noqa: E501 + + read the specified DeviceTaintRule # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.read_device_taint_rule_with_http_info(name, async_req=True) + >>> result = thread.get() + + :param name: name of the DeviceTaintRule (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1alpha3DeviceTaintRule, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'pretty' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method read_device_taint_rule" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `read_device_taint_rule`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1alpha3DeviceTaintRule", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1alpha3/devicetaintrules/{name}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def read_device_taint_rule_status(self, name, **kwargs): # noqa: E501 + """read_device_taint_rule_status # noqa: E501 + + read status of the specified DeviceTaintRule # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.read_device_taint_rule_status(name, async_req=True) + >>> result = thread.get() + + :param name: name of the DeviceTaintRule (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1alpha3DeviceTaintRule + """ + kwargs['_return_http_data_only'] = True + return self.read_device_taint_rule_status_with_http_info(name, **kwargs) # noqa: E501 + + def read_device_taint_rule_status_with_http_info(self, name, **kwargs): # noqa: E501 + """read_device_taint_rule_status # noqa: E501 + + read status of the specified DeviceTaintRule # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.read_device_taint_rule_status_with_http_info(name, async_req=True) + >>> result = thread.get() + + :param name: name of the DeviceTaintRule (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1alpha3DeviceTaintRule, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'pretty' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method read_device_taint_rule_status" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `read_device_taint_rule_status`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1alpha3DeviceTaintRule", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1alpha3/devicetaintrules/{name}/status', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def replace_device_taint_rule(self, name, body, **kwargs): # noqa: E501 + """replace_device_taint_rule # noqa: E501 + + replace the specified DeviceTaintRule # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.replace_device_taint_rule(name, body, async_req=True) + >>> result = thread.get() + + :param name: name of the DeviceTaintRule (required) + :type name: str + :param body: (required) + :type body: V1alpha3DeviceTaintRule + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1alpha3DeviceTaintRule + """ + kwargs['_return_http_data_only'] = True + return self.replace_device_taint_rule_with_http_info(name, body, **kwargs) # noqa: E501 + + def replace_device_taint_rule_with_http_info(self, name, body, **kwargs): # noqa: E501 + """replace_device_taint_rule # noqa: E501 + + replace the specified DeviceTaintRule # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.replace_device_taint_rule_with_http_info(name, body, async_req=True) + >>> result = thread.get() + + :param name: name of the DeviceTaintRule (required) + :type name: str + :param body: (required) + :type body: V1alpha3DeviceTaintRule + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1alpha3DeviceTaintRule, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method replace_device_taint_rule" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `replace_device_taint_rule`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `replace_device_taint_rule`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1alpha3DeviceTaintRule", + 201: "V1alpha3DeviceTaintRule", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1alpha3/devicetaintrules/{name}', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def replace_device_taint_rule_status(self, name, body, **kwargs): # noqa: E501 + """replace_device_taint_rule_status # noqa: E501 + + replace status of the specified DeviceTaintRule # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.replace_device_taint_rule_status(name, body, async_req=True) + >>> result = thread.get() + + :param name: name of the DeviceTaintRule (required) + :type name: str + :param body: (required) + :type body: V1alpha3DeviceTaintRule + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1alpha3DeviceTaintRule + """ + kwargs['_return_http_data_only'] = True + return self.replace_device_taint_rule_status_with_http_info(name, body, **kwargs) # noqa: E501 + + def replace_device_taint_rule_status_with_http_info(self, name, body, **kwargs): # noqa: E501 + """replace_device_taint_rule_status # noqa: E501 + + replace status of the specified DeviceTaintRule # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.replace_device_taint_rule_status_with_http_info(name, body, async_req=True) + >>> result = thread.get() + + :param name: name of the DeviceTaintRule (required) + :type name: str + :param body: (required) + :type body: V1alpha3DeviceTaintRule + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1alpha3DeviceTaintRule, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method replace_device_taint_rule_status" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `replace_device_taint_rule_status`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `replace_device_taint_rule_status`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1alpha3DeviceTaintRule", + 201: "V1alpha3DeviceTaintRule", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1alpha3/devicetaintrules/{name}/status', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) diff --git a/kubernetes/client/api/resource_v1beta1_api.py b/kubernetes/client/api/resource_v1beta1_api.py new file mode 100644 index 0000000000..3e8ab068df --- /dev/null +++ b/kubernetes/client/api/resource_v1beta1_api.py @@ -0,0 +1,6491 @@ +# coding: utf-8 + +""" + Kubernetes + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: release-1.35 + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from kubernetes.client.api_client import ApiClient +from kubernetes.client.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class ResourceV1beta1Api(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def create_device_class(self, body, **kwargs): # noqa: E501 + """create_device_class # noqa: E501 + + create a DeviceClass # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_device_class(body, async_req=True) + >>> result = thread.get() + + :param body: (required) + :type body: V1beta1DeviceClass + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1DeviceClass + """ + kwargs['_return_http_data_only'] = True + return self.create_device_class_with_http_info(body, **kwargs) # noqa: E501 + + def create_device_class_with_http_info(self, body, **kwargs): # noqa: E501 + """create_device_class # noqa: E501 + + create a DeviceClass # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_device_class_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param body: (required) + :type body: V1beta1DeviceClass + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1DeviceClass, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_device_class" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `create_device_class`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1DeviceClass", + 201: "V1beta1DeviceClass", + 202: "V1beta1DeviceClass", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1beta1/deviceclasses', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def create_namespaced_resource_claim(self, namespace, body, **kwargs): # noqa: E501 + """create_namespaced_resource_claim # noqa: E501 + + create a ResourceClaim # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_namespaced_resource_claim(namespace, body, async_req=True) + >>> result = thread.get() + + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1beta1ResourceClaim + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1ResourceClaim + """ + kwargs['_return_http_data_only'] = True + return self.create_namespaced_resource_claim_with_http_info(namespace, body, **kwargs) # noqa: E501 + + def create_namespaced_resource_claim_with_http_info(self, namespace, body, **kwargs): # noqa: E501 + """create_namespaced_resource_claim # noqa: E501 + + create a ResourceClaim # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_namespaced_resource_claim_with_http_info(namespace, body, async_req=True) + >>> result = thread.get() + + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1beta1ResourceClaim + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1ResourceClaim, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'namespace', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_namespaced_resource_claim" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_resource_claim`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_resource_claim`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1ResourceClaim", + 201: "V1beta1ResourceClaim", + 202: "V1beta1ResourceClaim", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaims', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def create_namespaced_resource_claim_template(self, namespace, body, **kwargs): # noqa: E501 + """create_namespaced_resource_claim_template # noqa: E501 + + create a ResourceClaimTemplate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_namespaced_resource_claim_template(namespace, body, async_req=True) + >>> result = thread.get() + + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1beta1ResourceClaimTemplate + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1ResourceClaimTemplate + """ + kwargs['_return_http_data_only'] = True + return self.create_namespaced_resource_claim_template_with_http_info(namespace, body, **kwargs) # noqa: E501 + + def create_namespaced_resource_claim_template_with_http_info(self, namespace, body, **kwargs): # noqa: E501 + """create_namespaced_resource_claim_template # noqa: E501 + + create a ResourceClaimTemplate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_namespaced_resource_claim_template_with_http_info(namespace, body, async_req=True) + >>> result = thread.get() + + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1beta1ResourceClaimTemplate + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1ResourceClaimTemplate, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'namespace', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_namespaced_resource_claim_template" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_resource_claim_template`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_resource_claim_template`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1ResourceClaimTemplate", + 201: "V1beta1ResourceClaimTemplate", + 202: "V1beta1ResourceClaimTemplate", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaimtemplates', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def create_resource_slice(self, body, **kwargs): # noqa: E501 + """create_resource_slice # noqa: E501 + + create a ResourceSlice # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_resource_slice(body, async_req=True) + >>> result = thread.get() + + :param body: (required) + :type body: V1beta1ResourceSlice + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1ResourceSlice + """ + kwargs['_return_http_data_only'] = True + return self.create_resource_slice_with_http_info(body, **kwargs) # noqa: E501 + + def create_resource_slice_with_http_info(self, body, **kwargs): # noqa: E501 + """create_resource_slice # noqa: E501 + + create a ResourceSlice # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_resource_slice_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param body: (required) + :type body: V1beta1ResourceSlice + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1ResourceSlice, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_resource_slice" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `create_resource_slice`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1ResourceSlice", + 201: "V1beta1ResourceSlice", + 202: "V1beta1ResourceSlice", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1beta1/resourceslices', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_collection_device_class(self, **kwargs): # noqa: E501 + """delete_collection_device_class # noqa: E501 + + delete collection of DeviceClass # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_collection_device_class(async_req=True) + >>> result = thread.get() + + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1Status + """ + kwargs['_return_http_data_only'] = True + return self.delete_collection_device_class_with_http_info(**kwargs) # noqa: E501 + + def delete_collection_device_class_with_http_info(self, **kwargs): # noqa: E501 + """delete_collection_device_class # noqa: E501 + + delete collection of DeviceClass # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_collection_device_class_with_http_info(async_req=True) + >>> result = thread.get() + + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'pretty', + '_continue', + 'dry_run', + 'field_selector', + 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', + 'label_selector', + 'limit', + 'orphan_dependents', + 'propagation_policy', + 'resource_version', + 'resource_version_match', + 'send_initial_events', + 'timeout_seconds', + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_collection_device_class" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 + query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 + query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 + query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 + query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 + query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 + query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 + query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 + query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 + query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 + query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1Status", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1beta1/deviceclasses', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_collection_namespaced_resource_claim(self, namespace, **kwargs): # noqa: E501 + """delete_collection_namespaced_resource_claim # noqa: E501 + + delete collection of ResourceClaim # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_collection_namespaced_resource_claim(namespace, async_req=True) + >>> result = thread.get() + + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1Status + """ + kwargs['_return_http_data_only'] = True + return self.delete_collection_namespaced_resource_claim_with_http_info(namespace, **kwargs) # noqa: E501 + + def delete_collection_namespaced_resource_claim_with_http_info(self, namespace, **kwargs): # noqa: E501 + """delete_collection_namespaced_resource_claim # noqa: E501 + + delete collection of ResourceClaim # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_collection_namespaced_resource_claim_with_http_info(namespace, async_req=True) + >>> result = thread.get() + + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'namespace', + 'pretty', + '_continue', + 'dry_run', + 'field_selector', + 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', + 'label_selector', + 'limit', + 'orphan_dependents', + 'propagation_policy', + 'resource_version', + 'resource_version_match', + 'send_initial_events', + 'timeout_seconds', + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_collection_namespaced_resource_claim" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_resource_claim`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 + query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 + query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 + query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 + query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 + query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 + query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 + query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 + query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 + query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 + query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1Status", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaims', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_collection_namespaced_resource_claim_template(self, namespace, **kwargs): # noqa: E501 + """delete_collection_namespaced_resource_claim_template # noqa: E501 + + delete collection of ResourceClaimTemplate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_collection_namespaced_resource_claim_template(namespace, async_req=True) + >>> result = thread.get() + + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1Status + """ + kwargs['_return_http_data_only'] = True + return self.delete_collection_namespaced_resource_claim_template_with_http_info(namespace, **kwargs) # noqa: E501 + + def delete_collection_namespaced_resource_claim_template_with_http_info(self, namespace, **kwargs): # noqa: E501 + """delete_collection_namespaced_resource_claim_template # noqa: E501 + + delete collection of ResourceClaimTemplate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_collection_namespaced_resource_claim_template_with_http_info(namespace, async_req=True) + >>> result = thread.get() + + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'namespace', + 'pretty', + '_continue', + 'dry_run', + 'field_selector', + 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', + 'label_selector', + 'limit', + 'orphan_dependents', + 'propagation_policy', + 'resource_version', + 'resource_version_match', + 'send_initial_events', + 'timeout_seconds', + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_collection_namespaced_resource_claim_template" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_resource_claim_template`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 + query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 + query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 + query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 + query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 + query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 + query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 + query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 + query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 + query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 + query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1Status", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaimtemplates', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_collection_resource_slice(self, **kwargs): # noqa: E501 + """delete_collection_resource_slice # noqa: E501 + + delete collection of ResourceSlice # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_collection_resource_slice(async_req=True) + >>> result = thread.get() + + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1Status + """ + kwargs['_return_http_data_only'] = True + return self.delete_collection_resource_slice_with_http_info(**kwargs) # noqa: E501 + + def delete_collection_resource_slice_with_http_info(self, **kwargs): # noqa: E501 + """delete_collection_resource_slice # noqa: E501 + + delete collection of ResourceSlice # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_collection_resource_slice_with_http_info(async_req=True) + >>> result = thread.get() + + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'pretty', + '_continue', + 'dry_run', + 'field_selector', + 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', + 'label_selector', + 'limit', + 'orphan_dependents', + 'propagation_policy', + 'resource_version', + 'resource_version_match', + 'send_initial_events', + 'timeout_seconds', + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_collection_resource_slice" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 + query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 + query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 + query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 + query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 + query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 + query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 + query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 + query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 + query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 + query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1Status", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1beta1/resourceslices', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_device_class(self, name, **kwargs): # noqa: E501 + """delete_device_class # noqa: E501 + + delete a DeviceClass # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_device_class(name, async_req=True) + >>> result = thread.get() + + :param name: name of the DeviceClass (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1DeviceClass + """ + kwargs['_return_http_data_only'] = True + return self.delete_device_class_with_http_info(name, **kwargs) # noqa: E501 + + def delete_device_class_with_http_info(self, name, **kwargs): # noqa: E501 + """delete_device_class # noqa: E501 + + delete a DeviceClass # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_device_class_with_http_info(name, async_req=True) + >>> result = thread.get() + + :param name: name of the DeviceClass (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1DeviceClass, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'pretty', + 'dry_run', + 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', + 'orphan_dependents', + 'propagation_policy', + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_device_class" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `delete_device_class`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 + query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 + query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 + query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1DeviceClass", + 202: "V1beta1DeviceClass", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1beta1/deviceclasses/{name}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_namespaced_resource_claim(self, name, namespace, **kwargs): # noqa: E501 + """delete_namespaced_resource_claim # noqa: E501 + + delete a ResourceClaim # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_namespaced_resource_claim(name, namespace, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceClaim (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1ResourceClaim + """ + kwargs['_return_http_data_only'] = True + return self.delete_namespaced_resource_claim_with_http_info(name, namespace, **kwargs) # noqa: E501 + + def delete_namespaced_resource_claim_with_http_info(self, name, namespace, **kwargs): # noqa: E501 + """delete_namespaced_resource_claim # noqa: E501 + + delete a ResourceClaim # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_namespaced_resource_claim_with_http_info(name, namespace, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceClaim (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1ResourceClaim, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'namespace', + 'pretty', + 'dry_run', + 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', + 'orphan_dependents', + 'propagation_policy', + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_namespaced_resource_claim" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_resource_claim`") # noqa: E501 + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_resource_claim`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 + query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 + query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 + query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1ResourceClaim", + 202: "V1beta1ResourceClaim", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaims/{name}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_namespaced_resource_claim_template(self, name, namespace, **kwargs): # noqa: E501 + """delete_namespaced_resource_claim_template # noqa: E501 + + delete a ResourceClaimTemplate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_namespaced_resource_claim_template(name, namespace, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceClaimTemplate (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1ResourceClaimTemplate + """ + kwargs['_return_http_data_only'] = True + return self.delete_namespaced_resource_claim_template_with_http_info(name, namespace, **kwargs) # noqa: E501 + + def delete_namespaced_resource_claim_template_with_http_info(self, name, namespace, **kwargs): # noqa: E501 + """delete_namespaced_resource_claim_template # noqa: E501 + + delete a ResourceClaimTemplate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_namespaced_resource_claim_template_with_http_info(name, namespace, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceClaimTemplate (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1ResourceClaimTemplate, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'namespace', + 'pretty', + 'dry_run', + 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', + 'orphan_dependents', + 'propagation_policy', + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_namespaced_resource_claim_template" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_resource_claim_template`") # noqa: E501 + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_resource_claim_template`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 + query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 + query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 + query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1ResourceClaimTemplate", + 202: "V1beta1ResourceClaimTemplate", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaimtemplates/{name}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_resource_slice(self, name, **kwargs): # noqa: E501 + """delete_resource_slice # noqa: E501 + + delete a ResourceSlice # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_resource_slice(name, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceSlice (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1ResourceSlice + """ + kwargs['_return_http_data_only'] = True + return self.delete_resource_slice_with_http_info(name, **kwargs) # noqa: E501 + + def delete_resource_slice_with_http_info(self, name, **kwargs): # noqa: E501 + """delete_resource_slice # noqa: E501 + + delete a ResourceSlice # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_resource_slice_with_http_info(name, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceSlice (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1ResourceSlice, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'pretty', + 'dry_run', + 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', + 'orphan_dependents', + 'propagation_policy', + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_resource_slice" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `delete_resource_slice`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 + query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 + query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 + query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1ResourceSlice", + 202: "V1beta1ResourceSlice", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1beta1/resourceslices/{name}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_api_resources(self, **kwargs): # noqa: E501 + """get_api_resources # noqa: E501 + + get available resources # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_api_resources(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1APIResourceList + """ + kwargs['_return_http_data_only'] = True + return self.get_api_resources_with_http_info(**kwargs) # noqa: E501 + + def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 + """get_api_resources # noqa: E501 + + get available resources # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_api_resources_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_api_resources" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1APIResourceList", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1beta1/', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def list_device_class(self, **kwargs): # noqa: E501 + """list_device_class # noqa: E501 + + list or watch objects of kind DeviceClass # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_device_class(async_req=True) + >>> result = thread.get() + + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1DeviceClassList + """ + kwargs['_return_http_data_only'] = True + return self.list_device_class_with_http_info(**kwargs) # noqa: E501 + + def list_device_class_with_http_info(self, **kwargs): # noqa: E501 + """list_device_class # noqa: E501 + + list or watch objects of kind DeviceClass # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_device_class_with_http_info(async_req=True) + >>> result = thread.get() + + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1DeviceClassList, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'pretty', + 'allow_watch_bookmarks', + '_continue', + 'field_selector', + 'label_selector', + 'limit', + 'resource_version', + 'resource_version_match', + 'send_initial_events', + 'timeout_seconds', + 'watch' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_device_class" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 + query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 + query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 + query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 + query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 + query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 + query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 + query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 + query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 + query_params.append(('watch', local_var_params['watch'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1DeviceClassList", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1beta1/deviceclasses', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def list_namespaced_resource_claim(self, namespace, **kwargs): # noqa: E501 + """list_namespaced_resource_claim # noqa: E501 + + list or watch objects of kind ResourceClaim # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_namespaced_resource_claim(namespace, async_req=True) + >>> result = thread.get() + + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1ResourceClaimList + """ + kwargs['_return_http_data_only'] = True + return self.list_namespaced_resource_claim_with_http_info(namespace, **kwargs) # noqa: E501 + + def list_namespaced_resource_claim_with_http_info(self, namespace, **kwargs): # noqa: E501 + """list_namespaced_resource_claim # noqa: E501 + + list or watch objects of kind ResourceClaim # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_namespaced_resource_claim_with_http_info(namespace, async_req=True) + >>> result = thread.get() + + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1ResourceClaimList, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'namespace', + 'pretty', + 'allow_watch_bookmarks', + '_continue', + 'field_selector', + 'label_selector', + 'limit', + 'resource_version', + 'resource_version_match', + 'send_initial_events', + 'timeout_seconds', + 'watch' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_namespaced_resource_claim" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_resource_claim`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 + query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 + query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 + query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 + query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 + query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 + query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 + query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 + query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 + query_params.append(('watch', local_var_params['watch'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1ResourceClaimList", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaims', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def list_namespaced_resource_claim_template(self, namespace, **kwargs): # noqa: E501 + """list_namespaced_resource_claim_template # noqa: E501 + + list or watch objects of kind ResourceClaimTemplate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_namespaced_resource_claim_template(namespace, async_req=True) + >>> result = thread.get() + + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1ResourceClaimTemplateList + """ + kwargs['_return_http_data_only'] = True + return self.list_namespaced_resource_claim_template_with_http_info(namespace, **kwargs) # noqa: E501 + + def list_namespaced_resource_claim_template_with_http_info(self, namespace, **kwargs): # noqa: E501 + """list_namespaced_resource_claim_template # noqa: E501 + + list or watch objects of kind ResourceClaimTemplate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_namespaced_resource_claim_template_with_http_info(namespace, async_req=True) + >>> result = thread.get() + + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1ResourceClaimTemplateList, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'namespace', + 'pretty', + 'allow_watch_bookmarks', + '_continue', + 'field_selector', + 'label_selector', + 'limit', + 'resource_version', + 'resource_version_match', + 'send_initial_events', + 'timeout_seconds', + 'watch' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_namespaced_resource_claim_template" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_resource_claim_template`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 + query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 + query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 + query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 + query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 + query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 + query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 + query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 + query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 + query_params.append(('watch', local_var_params['watch'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1ResourceClaimTemplateList", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaimtemplates', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def list_resource_claim_for_all_namespaces(self, **kwargs): # noqa: E501 + """list_resource_claim_for_all_namespaces # noqa: E501 + + list or watch objects of kind ResourceClaim # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_resource_claim_for_all_namespaces(async_req=True) + >>> result = thread.get() + + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1ResourceClaimList + """ + kwargs['_return_http_data_only'] = True + return self.list_resource_claim_for_all_namespaces_with_http_info(**kwargs) # noqa: E501 + + def list_resource_claim_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501 + """list_resource_claim_for_all_namespaces # noqa: E501 + + list or watch objects of kind ResourceClaim # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_resource_claim_for_all_namespaces_with_http_info(async_req=True) + >>> result = thread.get() + + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1ResourceClaimList, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'allow_watch_bookmarks', + '_continue', + 'field_selector', + 'label_selector', + 'limit', + 'pretty', + 'resource_version', + 'resource_version_match', + 'send_initial_events', + 'timeout_seconds', + 'watch' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_resource_claim_for_all_namespaces" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 + query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 + query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 + query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 + query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 + query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 + query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 + query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 + query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 + query_params.append(('watch', local_var_params['watch'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1ResourceClaimList", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1beta1/resourceclaims', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def list_resource_claim_template_for_all_namespaces(self, **kwargs): # noqa: E501 + """list_resource_claim_template_for_all_namespaces # noqa: E501 + + list or watch objects of kind ResourceClaimTemplate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_resource_claim_template_for_all_namespaces(async_req=True) + >>> result = thread.get() + + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1ResourceClaimTemplateList + """ + kwargs['_return_http_data_only'] = True + return self.list_resource_claim_template_for_all_namespaces_with_http_info(**kwargs) # noqa: E501 + + def list_resource_claim_template_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501 + """list_resource_claim_template_for_all_namespaces # noqa: E501 + + list or watch objects of kind ResourceClaimTemplate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_resource_claim_template_for_all_namespaces_with_http_info(async_req=True) + >>> result = thread.get() + + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1ResourceClaimTemplateList, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'allow_watch_bookmarks', + '_continue', + 'field_selector', + 'label_selector', + 'limit', + 'pretty', + 'resource_version', + 'resource_version_match', + 'send_initial_events', + 'timeout_seconds', + 'watch' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_resource_claim_template_for_all_namespaces" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 + query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 + query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 + query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 + query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 + query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 + query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 + query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 + query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 + query_params.append(('watch', local_var_params['watch'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1ResourceClaimTemplateList", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1beta1/resourceclaimtemplates', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def list_resource_slice(self, **kwargs): # noqa: E501 + """list_resource_slice # noqa: E501 + + list or watch objects of kind ResourceSlice # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_resource_slice(async_req=True) + >>> result = thread.get() + + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1ResourceSliceList + """ + kwargs['_return_http_data_only'] = True + return self.list_resource_slice_with_http_info(**kwargs) # noqa: E501 + + def list_resource_slice_with_http_info(self, **kwargs): # noqa: E501 + """list_resource_slice # noqa: E501 + + list or watch objects of kind ResourceSlice # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_resource_slice_with_http_info(async_req=True) + >>> result = thread.get() + + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1ResourceSliceList, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'pretty', + 'allow_watch_bookmarks', + '_continue', + 'field_selector', + 'label_selector', + 'limit', + 'resource_version', + 'resource_version_match', + 'send_initial_events', + 'timeout_seconds', + 'watch' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_resource_slice" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 + query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 + query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 + query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 + query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 + query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 + query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 + query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 + query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 + query_params.append(('watch', local_var_params['watch'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1ResourceSliceList", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1beta1/resourceslices', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def patch_device_class(self, name, body, **kwargs): # noqa: E501 + """patch_device_class # noqa: E501 + + partially update the specified DeviceClass # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_device_class(name, body, async_req=True) + >>> result = thread.get() + + :param name: name of the DeviceClass (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1DeviceClass + """ + kwargs['_return_http_data_only'] = True + return self.patch_device_class_with_http_info(name, body, **kwargs) # noqa: E501 + + def patch_device_class_with_http_info(self, name, body, **kwargs): # noqa: E501 + """patch_device_class # noqa: E501 + + partially update the specified DeviceClass # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_device_class_with_http_info(name, body, async_req=True) + >>> result = thread.get() + + :param name: name of the DeviceClass (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1DeviceClass, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation', + 'force' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method patch_device_class" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `patch_device_class`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `patch_device_class`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 + query_params.append(('force', local_var_params['force'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # HTTP header `Content-Type` + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1DeviceClass", + 201: "V1beta1DeviceClass", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1beta1/deviceclasses/{name}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def patch_namespaced_resource_claim(self, name, namespace, body, **kwargs): # noqa: E501 + """patch_namespaced_resource_claim # noqa: E501 + + partially update the specified ResourceClaim # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_namespaced_resource_claim(name, namespace, body, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceClaim (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1ResourceClaim + """ + kwargs['_return_http_data_only'] = True + return self.patch_namespaced_resource_claim_with_http_info(name, namespace, body, **kwargs) # noqa: E501 + + def patch_namespaced_resource_claim_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501 + """patch_namespaced_resource_claim # noqa: E501 + + partially update the specified ResourceClaim # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_namespaced_resource_claim_with_http_info(name, namespace, body, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceClaim (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1ResourceClaim, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'namespace', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation', + 'force' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method patch_namespaced_resource_claim" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_resource_claim`") # noqa: E501 + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_resource_claim`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_resource_claim`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 + query_params.append(('force', local_var_params['force'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # HTTP header `Content-Type` + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1ResourceClaim", + 201: "V1beta1ResourceClaim", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaims/{name}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def patch_namespaced_resource_claim_status(self, name, namespace, body, **kwargs): # noqa: E501 + """patch_namespaced_resource_claim_status # noqa: E501 + + partially update status of the specified ResourceClaim # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_namespaced_resource_claim_status(name, namespace, body, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceClaim (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1ResourceClaim + """ + kwargs['_return_http_data_only'] = True + return self.patch_namespaced_resource_claim_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501 + + def patch_namespaced_resource_claim_status_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501 + """patch_namespaced_resource_claim_status # noqa: E501 + + partially update status of the specified ResourceClaim # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_namespaced_resource_claim_status_with_http_info(name, namespace, body, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceClaim (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1ResourceClaim, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'namespace', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation', + 'force' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method patch_namespaced_resource_claim_status" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_resource_claim_status`") # noqa: E501 + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_resource_claim_status`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_resource_claim_status`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 + query_params.append(('force', local_var_params['force'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # HTTP header `Content-Type` + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1ResourceClaim", + 201: "V1beta1ResourceClaim", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaims/{name}/status', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def patch_namespaced_resource_claim_template(self, name, namespace, body, **kwargs): # noqa: E501 + """patch_namespaced_resource_claim_template # noqa: E501 + + partially update the specified ResourceClaimTemplate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_namespaced_resource_claim_template(name, namespace, body, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceClaimTemplate (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1ResourceClaimTemplate + """ + kwargs['_return_http_data_only'] = True + return self.patch_namespaced_resource_claim_template_with_http_info(name, namespace, body, **kwargs) # noqa: E501 + + def patch_namespaced_resource_claim_template_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501 + """patch_namespaced_resource_claim_template # noqa: E501 + + partially update the specified ResourceClaimTemplate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_namespaced_resource_claim_template_with_http_info(name, namespace, body, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceClaimTemplate (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1ResourceClaimTemplate, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'namespace', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation', + 'force' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method patch_namespaced_resource_claim_template" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_resource_claim_template`") # noqa: E501 + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_resource_claim_template`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_resource_claim_template`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 + query_params.append(('force', local_var_params['force'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # HTTP header `Content-Type` + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1ResourceClaimTemplate", + 201: "V1beta1ResourceClaimTemplate", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaimtemplates/{name}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def patch_resource_slice(self, name, body, **kwargs): # noqa: E501 + """patch_resource_slice # noqa: E501 + + partially update the specified ResourceSlice # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_resource_slice(name, body, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceSlice (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1ResourceSlice + """ + kwargs['_return_http_data_only'] = True + return self.patch_resource_slice_with_http_info(name, body, **kwargs) # noqa: E501 + + def patch_resource_slice_with_http_info(self, name, body, **kwargs): # noqa: E501 + """patch_resource_slice # noqa: E501 + + partially update the specified ResourceSlice # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_resource_slice_with_http_info(name, body, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceSlice (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1ResourceSlice, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation', + 'force' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method patch_resource_slice" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `patch_resource_slice`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `patch_resource_slice`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 + query_params.append(('force', local_var_params['force'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # HTTP header `Content-Type` + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1ResourceSlice", + 201: "V1beta1ResourceSlice", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1beta1/resourceslices/{name}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def read_device_class(self, name, **kwargs): # noqa: E501 + """read_device_class # noqa: E501 + + read the specified DeviceClass # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.read_device_class(name, async_req=True) + >>> result = thread.get() + + :param name: name of the DeviceClass (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1DeviceClass + """ + kwargs['_return_http_data_only'] = True + return self.read_device_class_with_http_info(name, **kwargs) # noqa: E501 + + def read_device_class_with_http_info(self, name, **kwargs): # noqa: E501 + """read_device_class # noqa: E501 + + read the specified DeviceClass # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.read_device_class_with_http_info(name, async_req=True) + >>> result = thread.get() + + :param name: name of the DeviceClass (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1DeviceClass, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'pretty' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method read_device_class" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `read_device_class`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1DeviceClass", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1beta1/deviceclasses/{name}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def read_namespaced_resource_claim(self, name, namespace, **kwargs): # noqa: E501 + """read_namespaced_resource_claim # noqa: E501 + + read the specified ResourceClaim # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.read_namespaced_resource_claim(name, namespace, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceClaim (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1ResourceClaim + """ + kwargs['_return_http_data_only'] = True + return self.read_namespaced_resource_claim_with_http_info(name, namespace, **kwargs) # noqa: E501 + + def read_namespaced_resource_claim_with_http_info(self, name, namespace, **kwargs): # noqa: E501 + """read_namespaced_resource_claim # noqa: E501 + + read the specified ResourceClaim # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.read_namespaced_resource_claim_with_http_info(name, namespace, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceClaim (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1ResourceClaim, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'namespace', + 'pretty' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method read_namespaced_resource_claim" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_resource_claim`") # noqa: E501 + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_resource_claim`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1ResourceClaim", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaims/{name}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def read_namespaced_resource_claim_status(self, name, namespace, **kwargs): # noqa: E501 + """read_namespaced_resource_claim_status # noqa: E501 + + read status of the specified ResourceClaim # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.read_namespaced_resource_claim_status(name, namespace, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceClaim (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1ResourceClaim + """ + kwargs['_return_http_data_only'] = True + return self.read_namespaced_resource_claim_status_with_http_info(name, namespace, **kwargs) # noqa: E501 + + def read_namespaced_resource_claim_status_with_http_info(self, name, namespace, **kwargs): # noqa: E501 + """read_namespaced_resource_claim_status # noqa: E501 + + read status of the specified ResourceClaim # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.read_namespaced_resource_claim_status_with_http_info(name, namespace, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceClaim (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1ResourceClaim, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'namespace', + 'pretty' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method read_namespaced_resource_claim_status" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_resource_claim_status`") # noqa: E501 + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_resource_claim_status`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1ResourceClaim", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaims/{name}/status', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def read_namespaced_resource_claim_template(self, name, namespace, **kwargs): # noqa: E501 + """read_namespaced_resource_claim_template # noqa: E501 + + read the specified ResourceClaimTemplate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.read_namespaced_resource_claim_template(name, namespace, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceClaimTemplate (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1ResourceClaimTemplate + """ + kwargs['_return_http_data_only'] = True + return self.read_namespaced_resource_claim_template_with_http_info(name, namespace, **kwargs) # noqa: E501 + + def read_namespaced_resource_claim_template_with_http_info(self, name, namespace, **kwargs): # noqa: E501 + """read_namespaced_resource_claim_template # noqa: E501 + + read the specified ResourceClaimTemplate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.read_namespaced_resource_claim_template_with_http_info(name, namespace, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceClaimTemplate (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1ResourceClaimTemplate, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'namespace', + 'pretty' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method read_namespaced_resource_claim_template" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_resource_claim_template`") # noqa: E501 + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_resource_claim_template`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1ResourceClaimTemplate", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaimtemplates/{name}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def read_resource_slice(self, name, **kwargs): # noqa: E501 + """read_resource_slice # noqa: E501 + + read the specified ResourceSlice # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.read_resource_slice(name, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceSlice (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1ResourceSlice + """ + kwargs['_return_http_data_only'] = True + return self.read_resource_slice_with_http_info(name, **kwargs) # noqa: E501 + + def read_resource_slice_with_http_info(self, name, **kwargs): # noqa: E501 + """read_resource_slice # noqa: E501 + + read the specified ResourceSlice # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.read_resource_slice_with_http_info(name, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceSlice (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1ResourceSlice, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'pretty' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method read_resource_slice" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `read_resource_slice`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1ResourceSlice", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1beta1/resourceslices/{name}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def replace_device_class(self, name, body, **kwargs): # noqa: E501 + """replace_device_class # noqa: E501 + + replace the specified DeviceClass # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.replace_device_class(name, body, async_req=True) + >>> result = thread.get() + + :param name: name of the DeviceClass (required) + :type name: str + :param body: (required) + :type body: V1beta1DeviceClass + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1DeviceClass + """ + kwargs['_return_http_data_only'] = True + return self.replace_device_class_with_http_info(name, body, **kwargs) # noqa: E501 + + def replace_device_class_with_http_info(self, name, body, **kwargs): # noqa: E501 + """replace_device_class # noqa: E501 + + replace the specified DeviceClass # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.replace_device_class_with_http_info(name, body, async_req=True) + >>> result = thread.get() + + :param name: name of the DeviceClass (required) + :type name: str + :param body: (required) + :type body: V1beta1DeviceClass + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1DeviceClass, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method replace_device_class" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `replace_device_class`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `replace_device_class`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1DeviceClass", + 201: "V1beta1DeviceClass", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1beta1/deviceclasses/{name}', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def replace_namespaced_resource_claim(self, name, namespace, body, **kwargs): # noqa: E501 + """replace_namespaced_resource_claim # noqa: E501 + + replace the specified ResourceClaim # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.replace_namespaced_resource_claim(name, namespace, body, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceClaim (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1beta1ResourceClaim + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1ResourceClaim + """ + kwargs['_return_http_data_only'] = True + return self.replace_namespaced_resource_claim_with_http_info(name, namespace, body, **kwargs) # noqa: E501 + + def replace_namespaced_resource_claim_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501 + """replace_namespaced_resource_claim # noqa: E501 + + replace the specified ResourceClaim # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.replace_namespaced_resource_claim_with_http_info(name, namespace, body, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceClaim (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1beta1ResourceClaim + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1ResourceClaim, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'namespace', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method replace_namespaced_resource_claim" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_resource_claim`") # noqa: E501 + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_resource_claim`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_resource_claim`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1ResourceClaim", + 201: "V1beta1ResourceClaim", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaims/{name}', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def replace_namespaced_resource_claim_status(self, name, namespace, body, **kwargs): # noqa: E501 + """replace_namespaced_resource_claim_status # noqa: E501 + + replace status of the specified ResourceClaim # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.replace_namespaced_resource_claim_status(name, namespace, body, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceClaim (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1beta1ResourceClaim + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1ResourceClaim + """ + kwargs['_return_http_data_only'] = True + return self.replace_namespaced_resource_claim_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501 + + def replace_namespaced_resource_claim_status_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501 + """replace_namespaced_resource_claim_status # noqa: E501 + + replace status of the specified ResourceClaim # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.replace_namespaced_resource_claim_status_with_http_info(name, namespace, body, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceClaim (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1beta1ResourceClaim + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1ResourceClaim, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'namespace', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method replace_namespaced_resource_claim_status" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_resource_claim_status`") # noqa: E501 + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_resource_claim_status`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_resource_claim_status`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1ResourceClaim", + 201: "V1beta1ResourceClaim", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaims/{name}/status', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def replace_namespaced_resource_claim_template(self, name, namespace, body, **kwargs): # noqa: E501 + """replace_namespaced_resource_claim_template # noqa: E501 + + replace the specified ResourceClaimTemplate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.replace_namespaced_resource_claim_template(name, namespace, body, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceClaimTemplate (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1beta1ResourceClaimTemplate + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1ResourceClaimTemplate + """ + kwargs['_return_http_data_only'] = True + return self.replace_namespaced_resource_claim_template_with_http_info(name, namespace, body, **kwargs) # noqa: E501 + + def replace_namespaced_resource_claim_template_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501 + """replace_namespaced_resource_claim_template # noqa: E501 + + replace the specified ResourceClaimTemplate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.replace_namespaced_resource_claim_template_with_http_info(name, namespace, body, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceClaimTemplate (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1beta1ResourceClaimTemplate + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1ResourceClaimTemplate, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'namespace', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method replace_namespaced_resource_claim_template" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_resource_claim_template`") # noqa: E501 + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_resource_claim_template`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_resource_claim_template`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1ResourceClaimTemplate", + 201: "V1beta1ResourceClaimTemplate", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaimtemplates/{name}', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def replace_resource_slice(self, name, body, **kwargs): # noqa: E501 + """replace_resource_slice # noqa: E501 + + replace the specified ResourceSlice # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.replace_resource_slice(name, body, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceSlice (required) + :type name: str + :param body: (required) + :type body: V1beta1ResourceSlice + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1ResourceSlice + """ + kwargs['_return_http_data_only'] = True + return self.replace_resource_slice_with_http_info(name, body, **kwargs) # noqa: E501 + + def replace_resource_slice_with_http_info(self, name, body, **kwargs): # noqa: E501 + """replace_resource_slice # noqa: E501 + + replace the specified ResourceSlice # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.replace_resource_slice_with_http_info(name, body, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceSlice (required) + :type name: str + :param body: (required) + :type body: V1beta1ResourceSlice + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1ResourceSlice, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method replace_resource_slice" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `replace_resource_slice`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `replace_resource_slice`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1ResourceSlice", + 201: "V1beta1ResourceSlice", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1beta1/resourceslices/{name}', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) diff --git a/kubernetes/client/api/resource_v1beta2_api.py b/kubernetes/client/api/resource_v1beta2_api.py new file mode 100644 index 0000000000..a859864556 --- /dev/null +++ b/kubernetes/client/api/resource_v1beta2_api.py @@ -0,0 +1,6491 @@ +# coding: utf-8 + +""" + Kubernetes + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: release-1.35 + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from kubernetes.client.api_client import ApiClient +from kubernetes.client.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class ResourceV1beta2Api(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def create_device_class(self, body, **kwargs): # noqa: E501 + """create_device_class # noqa: E501 + + create a DeviceClass # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_device_class(body, async_req=True) + >>> result = thread.get() + + :param body: (required) + :type body: V1beta2DeviceClass + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta2DeviceClass + """ + kwargs['_return_http_data_only'] = True + return self.create_device_class_with_http_info(body, **kwargs) # noqa: E501 + + def create_device_class_with_http_info(self, body, **kwargs): # noqa: E501 + """create_device_class # noqa: E501 + + create a DeviceClass # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_device_class_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param body: (required) + :type body: V1beta2DeviceClass + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta2DeviceClass, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_device_class" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `create_device_class`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta2DeviceClass", + 201: "V1beta2DeviceClass", + 202: "V1beta2DeviceClass", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1beta2/deviceclasses', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def create_namespaced_resource_claim(self, namespace, body, **kwargs): # noqa: E501 + """create_namespaced_resource_claim # noqa: E501 + + create a ResourceClaim # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_namespaced_resource_claim(namespace, body, async_req=True) + >>> result = thread.get() + + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1beta2ResourceClaim + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta2ResourceClaim + """ + kwargs['_return_http_data_only'] = True + return self.create_namespaced_resource_claim_with_http_info(namespace, body, **kwargs) # noqa: E501 + + def create_namespaced_resource_claim_with_http_info(self, namespace, body, **kwargs): # noqa: E501 + """create_namespaced_resource_claim # noqa: E501 + + create a ResourceClaim # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_namespaced_resource_claim_with_http_info(namespace, body, async_req=True) + >>> result = thread.get() + + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1beta2ResourceClaim + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta2ResourceClaim, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'namespace', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_namespaced_resource_claim" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_resource_claim`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_resource_claim`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta2ResourceClaim", + 201: "V1beta2ResourceClaim", + 202: "V1beta2ResourceClaim", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaims', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def create_namespaced_resource_claim_template(self, namespace, body, **kwargs): # noqa: E501 + """create_namespaced_resource_claim_template # noqa: E501 + + create a ResourceClaimTemplate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_namespaced_resource_claim_template(namespace, body, async_req=True) + >>> result = thread.get() + + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1beta2ResourceClaimTemplate + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta2ResourceClaimTemplate + """ + kwargs['_return_http_data_only'] = True + return self.create_namespaced_resource_claim_template_with_http_info(namespace, body, **kwargs) # noqa: E501 + + def create_namespaced_resource_claim_template_with_http_info(self, namespace, body, **kwargs): # noqa: E501 + """create_namespaced_resource_claim_template # noqa: E501 + + create a ResourceClaimTemplate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_namespaced_resource_claim_template_with_http_info(namespace, body, async_req=True) + >>> result = thread.get() + + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1beta2ResourceClaimTemplate + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta2ResourceClaimTemplate, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'namespace', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_namespaced_resource_claim_template" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_resource_claim_template`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_resource_claim_template`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta2ResourceClaimTemplate", + 201: "V1beta2ResourceClaimTemplate", + 202: "V1beta2ResourceClaimTemplate", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaimtemplates', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def create_resource_slice(self, body, **kwargs): # noqa: E501 + """create_resource_slice # noqa: E501 + + create a ResourceSlice # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_resource_slice(body, async_req=True) + >>> result = thread.get() + + :param body: (required) + :type body: V1beta2ResourceSlice + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta2ResourceSlice + """ + kwargs['_return_http_data_only'] = True + return self.create_resource_slice_with_http_info(body, **kwargs) # noqa: E501 + + def create_resource_slice_with_http_info(self, body, **kwargs): # noqa: E501 + """create_resource_slice # noqa: E501 + + create a ResourceSlice # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_resource_slice_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param body: (required) + :type body: V1beta2ResourceSlice + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta2ResourceSlice, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_resource_slice" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `create_resource_slice`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta2ResourceSlice", + 201: "V1beta2ResourceSlice", + 202: "V1beta2ResourceSlice", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1beta2/resourceslices', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_collection_device_class(self, **kwargs): # noqa: E501 + """delete_collection_device_class # noqa: E501 + + delete collection of DeviceClass # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_collection_device_class(async_req=True) + >>> result = thread.get() + + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1Status + """ + kwargs['_return_http_data_only'] = True + return self.delete_collection_device_class_with_http_info(**kwargs) # noqa: E501 + + def delete_collection_device_class_with_http_info(self, **kwargs): # noqa: E501 + """delete_collection_device_class # noqa: E501 + + delete collection of DeviceClass # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_collection_device_class_with_http_info(async_req=True) + >>> result = thread.get() + + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'pretty', + '_continue', + 'dry_run', + 'field_selector', + 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', + 'label_selector', + 'limit', + 'orphan_dependents', + 'propagation_policy', + 'resource_version', + 'resource_version_match', + 'send_initial_events', + 'timeout_seconds', + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_collection_device_class" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 + query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 + query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 + query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 + query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 + query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 + query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 + query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 + query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 + query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 + query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1Status", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1beta2/deviceclasses', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_collection_namespaced_resource_claim(self, namespace, **kwargs): # noqa: E501 + """delete_collection_namespaced_resource_claim # noqa: E501 + + delete collection of ResourceClaim # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_collection_namespaced_resource_claim(namespace, async_req=True) + >>> result = thread.get() + + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1Status + """ + kwargs['_return_http_data_only'] = True + return self.delete_collection_namespaced_resource_claim_with_http_info(namespace, **kwargs) # noqa: E501 + + def delete_collection_namespaced_resource_claim_with_http_info(self, namespace, **kwargs): # noqa: E501 + """delete_collection_namespaced_resource_claim # noqa: E501 + + delete collection of ResourceClaim # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_collection_namespaced_resource_claim_with_http_info(namespace, async_req=True) + >>> result = thread.get() + + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'namespace', + 'pretty', + '_continue', + 'dry_run', + 'field_selector', + 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', + 'label_selector', + 'limit', + 'orphan_dependents', + 'propagation_policy', + 'resource_version', + 'resource_version_match', + 'send_initial_events', + 'timeout_seconds', + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_collection_namespaced_resource_claim" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_resource_claim`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 + query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 + query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 + query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 + query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 + query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 + query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 + query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 + query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 + query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 + query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1Status", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaims', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_collection_namespaced_resource_claim_template(self, namespace, **kwargs): # noqa: E501 + """delete_collection_namespaced_resource_claim_template # noqa: E501 + + delete collection of ResourceClaimTemplate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_collection_namespaced_resource_claim_template(namespace, async_req=True) + >>> result = thread.get() + + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1Status + """ + kwargs['_return_http_data_only'] = True + return self.delete_collection_namespaced_resource_claim_template_with_http_info(namespace, **kwargs) # noqa: E501 + + def delete_collection_namespaced_resource_claim_template_with_http_info(self, namespace, **kwargs): # noqa: E501 + """delete_collection_namespaced_resource_claim_template # noqa: E501 + + delete collection of ResourceClaimTemplate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_collection_namespaced_resource_claim_template_with_http_info(namespace, async_req=True) + >>> result = thread.get() + + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'namespace', + 'pretty', + '_continue', + 'dry_run', + 'field_selector', + 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', + 'label_selector', + 'limit', + 'orphan_dependents', + 'propagation_policy', + 'resource_version', + 'resource_version_match', + 'send_initial_events', + 'timeout_seconds', + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_collection_namespaced_resource_claim_template" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_resource_claim_template`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 + query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 + query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 + query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 + query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 + query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 + query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 + query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 + query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 + query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 + query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1Status", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaimtemplates', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_collection_resource_slice(self, **kwargs): # noqa: E501 + """delete_collection_resource_slice # noqa: E501 + + delete collection of ResourceSlice # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_collection_resource_slice(async_req=True) + >>> result = thread.get() + + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1Status + """ + kwargs['_return_http_data_only'] = True + return self.delete_collection_resource_slice_with_http_info(**kwargs) # noqa: E501 + + def delete_collection_resource_slice_with_http_info(self, **kwargs): # noqa: E501 + """delete_collection_resource_slice # noqa: E501 + + delete collection of ResourceSlice # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_collection_resource_slice_with_http_info(async_req=True) + >>> result = thread.get() + + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'pretty', + '_continue', + 'dry_run', + 'field_selector', + 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', + 'label_selector', + 'limit', + 'orphan_dependents', + 'propagation_policy', + 'resource_version', + 'resource_version_match', + 'send_initial_events', + 'timeout_seconds', + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_collection_resource_slice" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 + query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 + query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 + query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 + query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 + query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 + query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 + query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 + query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 + query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 + query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1Status", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1beta2/resourceslices', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_device_class(self, name, **kwargs): # noqa: E501 + """delete_device_class # noqa: E501 + + delete a DeviceClass # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_device_class(name, async_req=True) + >>> result = thread.get() + + :param name: name of the DeviceClass (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta2DeviceClass + """ + kwargs['_return_http_data_only'] = True + return self.delete_device_class_with_http_info(name, **kwargs) # noqa: E501 + + def delete_device_class_with_http_info(self, name, **kwargs): # noqa: E501 + """delete_device_class # noqa: E501 + + delete a DeviceClass # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_device_class_with_http_info(name, async_req=True) + >>> result = thread.get() + + :param name: name of the DeviceClass (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta2DeviceClass, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'pretty', + 'dry_run', + 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', + 'orphan_dependents', + 'propagation_policy', + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_device_class" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `delete_device_class`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 + query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 + query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 + query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta2DeviceClass", + 202: "V1beta2DeviceClass", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1beta2/deviceclasses/{name}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_namespaced_resource_claim(self, name, namespace, **kwargs): # noqa: E501 + """delete_namespaced_resource_claim # noqa: E501 + + delete a ResourceClaim # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_namespaced_resource_claim(name, namespace, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceClaim (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta2ResourceClaim + """ + kwargs['_return_http_data_only'] = True + return self.delete_namespaced_resource_claim_with_http_info(name, namespace, **kwargs) # noqa: E501 + + def delete_namespaced_resource_claim_with_http_info(self, name, namespace, **kwargs): # noqa: E501 + """delete_namespaced_resource_claim # noqa: E501 + + delete a ResourceClaim # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_namespaced_resource_claim_with_http_info(name, namespace, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceClaim (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta2ResourceClaim, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'namespace', + 'pretty', + 'dry_run', + 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', + 'orphan_dependents', + 'propagation_policy', + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_namespaced_resource_claim" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_resource_claim`") # noqa: E501 + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_resource_claim`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 + query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 + query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 + query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta2ResourceClaim", + 202: "V1beta2ResourceClaim", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaims/{name}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_namespaced_resource_claim_template(self, name, namespace, **kwargs): # noqa: E501 + """delete_namespaced_resource_claim_template # noqa: E501 + + delete a ResourceClaimTemplate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_namespaced_resource_claim_template(name, namespace, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceClaimTemplate (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta2ResourceClaimTemplate + """ + kwargs['_return_http_data_only'] = True + return self.delete_namespaced_resource_claim_template_with_http_info(name, namespace, **kwargs) # noqa: E501 + + def delete_namespaced_resource_claim_template_with_http_info(self, name, namespace, **kwargs): # noqa: E501 + """delete_namespaced_resource_claim_template # noqa: E501 + + delete a ResourceClaimTemplate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_namespaced_resource_claim_template_with_http_info(name, namespace, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceClaimTemplate (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta2ResourceClaimTemplate, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'namespace', + 'pretty', + 'dry_run', + 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', + 'orphan_dependents', + 'propagation_policy', + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_namespaced_resource_claim_template" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_resource_claim_template`") # noqa: E501 + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_resource_claim_template`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 + query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 + query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 + query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta2ResourceClaimTemplate", + 202: "V1beta2ResourceClaimTemplate", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaimtemplates/{name}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_resource_slice(self, name, **kwargs): # noqa: E501 + """delete_resource_slice # noqa: E501 + + delete a ResourceSlice # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_resource_slice(name, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceSlice (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta2ResourceSlice + """ + kwargs['_return_http_data_only'] = True + return self.delete_resource_slice_with_http_info(name, **kwargs) # noqa: E501 + + def delete_resource_slice_with_http_info(self, name, **kwargs): # noqa: E501 + """delete_resource_slice # noqa: E501 + + delete a ResourceSlice # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_resource_slice_with_http_info(name, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceSlice (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta2ResourceSlice, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'pretty', + 'dry_run', + 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', + 'orphan_dependents', + 'propagation_policy', + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_resource_slice" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `delete_resource_slice`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 + query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 + query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 + query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta2ResourceSlice", + 202: "V1beta2ResourceSlice", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1beta2/resourceslices/{name}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_api_resources(self, **kwargs): # noqa: E501 + """get_api_resources # noqa: E501 + + get available resources # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_api_resources(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1APIResourceList + """ + kwargs['_return_http_data_only'] = True + return self.get_api_resources_with_http_info(**kwargs) # noqa: E501 + + def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 + """get_api_resources # noqa: E501 + + get available resources # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_api_resources_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_api_resources" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1APIResourceList", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1beta2/', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def list_device_class(self, **kwargs): # noqa: E501 + """list_device_class # noqa: E501 + + list or watch objects of kind DeviceClass # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_device_class(async_req=True) + >>> result = thread.get() + + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta2DeviceClassList + """ + kwargs['_return_http_data_only'] = True + return self.list_device_class_with_http_info(**kwargs) # noqa: E501 + + def list_device_class_with_http_info(self, **kwargs): # noqa: E501 + """list_device_class # noqa: E501 + + list or watch objects of kind DeviceClass # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_device_class_with_http_info(async_req=True) + >>> result = thread.get() + + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta2DeviceClassList, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'pretty', + 'allow_watch_bookmarks', + '_continue', + 'field_selector', + 'label_selector', + 'limit', + 'resource_version', + 'resource_version_match', + 'send_initial_events', + 'timeout_seconds', + 'watch' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_device_class" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 + query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 + query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 + query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 + query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 + query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 + query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 + query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 + query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 + query_params.append(('watch', local_var_params['watch'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta2DeviceClassList", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1beta2/deviceclasses', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def list_namespaced_resource_claim(self, namespace, **kwargs): # noqa: E501 + """list_namespaced_resource_claim # noqa: E501 + + list or watch objects of kind ResourceClaim # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_namespaced_resource_claim(namespace, async_req=True) + >>> result = thread.get() + + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta2ResourceClaimList + """ + kwargs['_return_http_data_only'] = True + return self.list_namespaced_resource_claim_with_http_info(namespace, **kwargs) # noqa: E501 + + def list_namespaced_resource_claim_with_http_info(self, namespace, **kwargs): # noqa: E501 + """list_namespaced_resource_claim # noqa: E501 + + list or watch objects of kind ResourceClaim # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_namespaced_resource_claim_with_http_info(namespace, async_req=True) + >>> result = thread.get() + + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta2ResourceClaimList, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'namespace', + 'pretty', + 'allow_watch_bookmarks', + '_continue', + 'field_selector', + 'label_selector', + 'limit', + 'resource_version', + 'resource_version_match', + 'send_initial_events', + 'timeout_seconds', + 'watch' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_namespaced_resource_claim" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_resource_claim`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 + query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 + query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 + query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 + query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 + query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 + query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 + query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 + query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 + query_params.append(('watch', local_var_params['watch'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta2ResourceClaimList", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaims', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def list_namespaced_resource_claim_template(self, namespace, **kwargs): # noqa: E501 + """list_namespaced_resource_claim_template # noqa: E501 + + list or watch objects of kind ResourceClaimTemplate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_namespaced_resource_claim_template(namespace, async_req=True) + >>> result = thread.get() + + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta2ResourceClaimTemplateList + """ + kwargs['_return_http_data_only'] = True + return self.list_namespaced_resource_claim_template_with_http_info(namespace, **kwargs) # noqa: E501 + + def list_namespaced_resource_claim_template_with_http_info(self, namespace, **kwargs): # noqa: E501 + """list_namespaced_resource_claim_template # noqa: E501 + + list or watch objects of kind ResourceClaimTemplate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_namespaced_resource_claim_template_with_http_info(namespace, async_req=True) + >>> result = thread.get() + + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta2ResourceClaimTemplateList, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'namespace', + 'pretty', + 'allow_watch_bookmarks', + '_continue', + 'field_selector', + 'label_selector', + 'limit', + 'resource_version', + 'resource_version_match', + 'send_initial_events', + 'timeout_seconds', + 'watch' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_namespaced_resource_claim_template" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_resource_claim_template`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 + query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 + query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 + query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 + query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 + query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 + query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 + query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 + query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 + query_params.append(('watch', local_var_params['watch'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta2ResourceClaimTemplateList", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaimtemplates', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def list_resource_claim_for_all_namespaces(self, **kwargs): # noqa: E501 + """list_resource_claim_for_all_namespaces # noqa: E501 + + list or watch objects of kind ResourceClaim # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_resource_claim_for_all_namespaces(async_req=True) + >>> result = thread.get() + + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta2ResourceClaimList + """ + kwargs['_return_http_data_only'] = True + return self.list_resource_claim_for_all_namespaces_with_http_info(**kwargs) # noqa: E501 + + def list_resource_claim_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501 + """list_resource_claim_for_all_namespaces # noqa: E501 + + list or watch objects of kind ResourceClaim # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_resource_claim_for_all_namespaces_with_http_info(async_req=True) + >>> result = thread.get() + + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta2ResourceClaimList, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'allow_watch_bookmarks', + '_continue', + 'field_selector', + 'label_selector', + 'limit', + 'pretty', + 'resource_version', + 'resource_version_match', + 'send_initial_events', + 'timeout_seconds', + 'watch' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_resource_claim_for_all_namespaces" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 + query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 + query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 + query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 + query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 + query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 + query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 + query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 + query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 + query_params.append(('watch', local_var_params['watch'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta2ResourceClaimList", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1beta2/resourceclaims', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def list_resource_claim_template_for_all_namespaces(self, **kwargs): # noqa: E501 + """list_resource_claim_template_for_all_namespaces # noqa: E501 + + list or watch objects of kind ResourceClaimTemplate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_resource_claim_template_for_all_namespaces(async_req=True) + >>> result = thread.get() + + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta2ResourceClaimTemplateList + """ + kwargs['_return_http_data_only'] = True + return self.list_resource_claim_template_for_all_namespaces_with_http_info(**kwargs) # noqa: E501 + + def list_resource_claim_template_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501 + """list_resource_claim_template_for_all_namespaces # noqa: E501 + + list or watch objects of kind ResourceClaimTemplate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_resource_claim_template_for_all_namespaces_with_http_info(async_req=True) + >>> result = thread.get() + + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta2ResourceClaimTemplateList, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'allow_watch_bookmarks', + '_continue', + 'field_selector', + 'label_selector', + 'limit', + 'pretty', + 'resource_version', + 'resource_version_match', + 'send_initial_events', + 'timeout_seconds', + 'watch' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_resource_claim_template_for_all_namespaces" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 + query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 + query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 + query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 + query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 + query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 + query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 + query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 + query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 + query_params.append(('watch', local_var_params['watch'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta2ResourceClaimTemplateList", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1beta2/resourceclaimtemplates', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def list_resource_slice(self, **kwargs): # noqa: E501 + """list_resource_slice # noqa: E501 + + list or watch objects of kind ResourceSlice # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_resource_slice(async_req=True) + >>> result = thread.get() + + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta2ResourceSliceList + """ + kwargs['_return_http_data_only'] = True + return self.list_resource_slice_with_http_info(**kwargs) # noqa: E501 + + def list_resource_slice_with_http_info(self, **kwargs): # noqa: E501 + """list_resource_slice # noqa: E501 + + list or watch objects of kind ResourceSlice # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_resource_slice_with_http_info(async_req=True) + >>> result = thread.get() + + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta2ResourceSliceList, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'pretty', + 'allow_watch_bookmarks', + '_continue', + 'field_selector', + 'label_selector', + 'limit', + 'resource_version', + 'resource_version_match', + 'send_initial_events', + 'timeout_seconds', + 'watch' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_resource_slice" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 + query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 + query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 + query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 + query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 + query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 + query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 + query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 + query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 + query_params.append(('watch', local_var_params['watch'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta2ResourceSliceList", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1beta2/resourceslices', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def patch_device_class(self, name, body, **kwargs): # noqa: E501 + """patch_device_class # noqa: E501 + + partially update the specified DeviceClass # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_device_class(name, body, async_req=True) + >>> result = thread.get() + + :param name: name of the DeviceClass (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta2DeviceClass + """ + kwargs['_return_http_data_only'] = True + return self.patch_device_class_with_http_info(name, body, **kwargs) # noqa: E501 + + def patch_device_class_with_http_info(self, name, body, **kwargs): # noqa: E501 + """patch_device_class # noqa: E501 + + partially update the specified DeviceClass # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_device_class_with_http_info(name, body, async_req=True) + >>> result = thread.get() + + :param name: name of the DeviceClass (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta2DeviceClass, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation', + 'force' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method patch_device_class" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `patch_device_class`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `patch_device_class`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 + query_params.append(('force', local_var_params['force'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # HTTP header `Content-Type` + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta2DeviceClass", + 201: "V1beta2DeviceClass", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1beta2/deviceclasses/{name}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def patch_namespaced_resource_claim(self, name, namespace, body, **kwargs): # noqa: E501 + """patch_namespaced_resource_claim # noqa: E501 + + partially update the specified ResourceClaim # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_namespaced_resource_claim(name, namespace, body, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceClaim (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta2ResourceClaim + """ + kwargs['_return_http_data_only'] = True + return self.patch_namespaced_resource_claim_with_http_info(name, namespace, body, **kwargs) # noqa: E501 + + def patch_namespaced_resource_claim_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501 + """patch_namespaced_resource_claim # noqa: E501 + + partially update the specified ResourceClaim # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_namespaced_resource_claim_with_http_info(name, namespace, body, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceClaim (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta2ResourceClaim, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'namespace', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation', + 'force' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method patch_namespaced_resource_claim" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_resource_claim`") # noqa: E501 + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_resource_claim`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_resource_claim`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 + query_params.append(('force', local_var_params['force'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # HTTP header `Content-Type` + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta2ResourceClaim", + 201: "V1beta2ResourceClaim", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaims/{name}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def patch_namespaced_resource_claim_status(self, name, namespace, body, **kwargs): # noqa: E501 + """patch_namespaced_resource_claim_status # noqa: E501 + + partially update status of the specified ResourceClaim # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_namespaced_resource_claim_status(name, namespace, body, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceClaim (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta2ResourceClaim + """ + kwargs['_return_http_data_only'] = True + return self.patch_namespaced_resource_claim_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501 + + def patch_namespaced_resource_claim_status_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501 + """patch_namespaced_resource_claim_status # noqa: E501 + + partially update status of the specified ResourceClaim # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_namespaced_resource_claim_status_with_http_info(name, namespace, body, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceClaim (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta2ResourceClaim, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'namespace', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation', + 'force' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method patch_namespaced_resource_claim_status" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_resource_claim_status`") # noqa: E501 + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_resource_claim_status`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_resource_claim_status`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 + query_params.append(('force', local_var_params['force'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # HTTP header `Content-Type` + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta2ResourceClaim", + 201: "V1beta2ResourceClaim", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaims/{name}/status', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def patch_namespaced_resource_claim_template(self, name, namespace, body, **kwargs): # noqa: E501 + """patch_namespaced_resource_claim_template # noqa: E501 + + partially update the specified ResourceClaimTemplate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_namespaced_resource_claim_template(name, namespace, body, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceClaimTemplate (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta2ResourceClaimTemplate + """ + kwargs['_return_http_data_only'] = True + return self.patch_namespaced_resource_claim_template_with_http_info(name, namespace, body, **kwargs) # noqa: E501 + + def patch_namespaced_resource_claim_template_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501 + """patch_namespaced_resource_claim_template # noqa: E501 + + partially update the specified ResourceClaimTemplate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_namespaced_resource_claim_template_with_http_info(name, namespace, body, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceClaimTemplate (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta2ResourceClaimTemplate, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'namespace', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation', + 'force' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method patch_namespaced_resource_claim_template" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_resource_claim_template`") # noqa: E501 + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_resource_claim_template`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_resource_claim_template`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 + query_params.append(('force', local_var_params['force'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # HTTP header `Content-Type` + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta2ResourceClaimTemplate", + 201: "V1beta2ResourceClaimTemplate", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaimtemplates/{name}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def patch_resource_slice(self, name, body, **kwargs): # noqa: E501 + """patch_resource_slice # noqa: E501 + + partially update the specified ResourceSlice # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_resource_slice(name, body, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceSlice (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta2ResourceSlice + """ + kwargs['_return_http_data_only'] = True + return self.patch_resource_slice_with_http_info(name, body, **kwargs) # noqa: E501 + + def patch_resource_slice_with_http_info(self, name, body, **kwargs): # noqa: E501 + """patch_resource_slice # noqa: E501 + + partially update the specified ResourceSlice # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_resource_slice_with_http_info(name, body, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceSlice (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta2ResourceSlice, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation', + 'force' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method patch_resource_slice" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `patch_resource_slice`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `patch_resource_slice`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 + query_params.append(('force', local_var_params['force'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # HTTP header `Content-Type` + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta2ResourceSlice", + 201: "V1beta2ResourceSlice", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1beta2/resourceslices/{name}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def read_device_class(self, name, **kwargs): # noqa: E501 + """read_device_class # noqa: E501 + + read the specified DeviceClass # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.read_device_class(name, async_req=True) + >>> result = thread.get() + + :param name: name of the DeviceClass (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta2DeviceClass + """ + kwargs['_return_http_data_only'] = True + return self.read_device_class_with_http_info(name, **kwargs) # noqa: E501 + + def read_device_class_with_http_info(self, name, **kwargs): # noqa: E501 + """read_device_class # noqa: E501 + + read the specified DeviceClass # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.read_device_class_with_http_info(name, async_req=True) + >>> result = thread.get() + + :param name: name of the DeviceClass (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta2DeviceClass, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'pretty' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method read_device_class" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `read_device_class`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta2DeviceClass", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1beta2/deviceclasses/{name}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def read_namespaced_resource_claim(self, name, namespace, **kwargs): # noqa: E501 + """read_namespaced_resource_claim # noqa: E501 + + read the specified ResourceClaim # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.read_namespaced_resource_claim(name, namespace, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceClaim (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta2ResourceClaim + """ + kwargs['_return_http_data_only'] = True + return self.read_namespaced_resource_claim_with_http_info(name, namespace, **kwargs) # noqa: E501 + + def read_namespaced_resource_claim_with_http_info(self, name, namespace, **kwargs): # noqa: E501 + """read_namespaced_resource_claim # noqa: E501 + + read the specified ResourceClaim # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.read_namespaced_resource_claim_with_http_info(name, namespace, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceClaim (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta2ResourceClaim, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'namespace', + 'pretty' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method read_namespaced_resource_claim" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_resource_claim`") # noqa: E501 + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_resource_claim`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta2ResourceClaim", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaims/{name}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def read_namespaced_resource_claim_status(self, name, namespace, **kwargs): # noqa: E501 + """read_namespaced_resource_claim_status # noqa: E501 + + read status of the specified ResourceClaim # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.read_namespaced_resource_claim_status(name, namespace, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceClaim (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta2ResourceClaim + """ + kwargs['_return_http_data_only'] = True + return self.read_namespaced_resource_claim_status_with_http_info(name, namespace, **kwargs) # noqa: E501 + + def read_namespaced_resource_claim_status_with_http_info(self, name, namespace, **kwargs): # noqa: E501 + """read_namespaced_resource_claim_status # noqa: E501 + + read status of the specified ResourceClaim # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.read_namespaced_resource_claim_status_with_http_info(name, namespace, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceClaim (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta2ResourceClaim, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'namespace', + 'pretty' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method read_namespaced_resource_claim_status" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_resource_claim_status`") # noqa: E501 + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_resource_claim_status`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta2ResourceClaim", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaims/{name}/status', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def read_namespaced_resource_claim_template(self, name, namespace, **kwargs): # noqa: E501 + """read_namespaced_resource_claim_template # noqa: E501 + + read the specified ResourceClaimTemplate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.read_namespaced_resource_claim_template(name, namespace, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceClaimTemplate (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta2ResourceClaimTemplate + """ + kwargs['_return_http_data_only'] = True + return self.read_namespaced_resource_claim_template_with_http_info(name, namespace, **kwargs) # noqa: E501 + + def read_namespaced_resource_claim_template_with_http_info(self, name, namespace, **kwargs): # noqa: E501 + """read_namespaced_resource_claim_template # noqa: E501 + + read the specified ResourceClaimTemplate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.read_namespaced_resource_claim_template_with_http_info(name, namespace, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceClaimTemplate (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta2ResourceClaimTemplate, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'namespace', + 'pretty' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method read_namespaced_resource_claim_template" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_resource_claim_template`") # noqa: E501 + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_resource_claim_template`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta2ResourceClaimTemplate", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaimtemplates/{name}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def read_resource_slice(self, name, **kwargs): # noqa: E501 + """read_resource_slice # noqa: E501 + + read the specified ResourceSlice # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.read_resource_slice(name, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceSlice (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta2ResourceSlice + """ + kwargs['_return_http_data_only'] = True + return self.read_resource_slice_with_http_info(name, **kwargs) # noqa: E501 + + def read_resource_slice_with_http_info(self, name, **kwargs): # noqa: E501 + """read_resource_slice # noqa: E501 + + read the specified ResourceSlice # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.read_resource_slice_with_http_info(name, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceSlice (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta2ResourceSlice, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'pretty' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method read_resource_slice" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `read_resource_slice`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta2ResourceSlice", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1beta2/resourceslices/{name}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def replace_device_class(self, name, body, **kwargs): # noqa: E501 + """replace_device_class # noqa: E501 + + replace the specified DeviceClass # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.replace_device_class(name, body, async_req=True) + >>> result = thread.get() + + :param name: name of the DeviceClass (required) + :type name: str + :param body: (required) + :type body: V1beta2DeviceClass + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta2DeviceClass + """ + kwargs['_return_http_data_only'] = True + return self.replace_device_class_with_http_info(name, body, **kwargs) # noqa: E501 + + def replace_device_class_with_http_info(self, name, body, **kwargs): # noqa: E501 + """replace_device_class # noqa: E501 + + replace the specified DeviceClass # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.replace_device_class_with_http_info(name, body, async_req=True) + >>> result = thread.get() + + :param name: name of the DeviceClass (required) + :type name: str + :param body: (required) + :type body: V1beta2DeviceClass + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta2DeviceClass, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method replace_device_class" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `replace_device_class`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `replace_device_class`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta2DeviceClass", + 201: "V1beta2DeviceClass", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1beta2/deviceclasses/{name}', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def replace_namespaced_resource_claim(self, name, namespace, body, **kwargs): # noqa: E501 + """replace_namespaced_resource_claim # noqa: E501 + + replace the specified ResourceClaim # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.replace_namespaced_resource_claim(name, namespace, body, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceClaim (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1beta2ResourceClaim + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta2ResourceClaim + """ + kwargs['_return_http_data_only'] = True + return self.replace_namespaced_resource_claim_with_http_info(name, namespace, body, **kwargs) # noqa: E501 + + def replace_namespaced_resource_claim_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501 + """replace_namespaced_resource_claim # noqa: E501 + + replace the specified ResourceClaim # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.replace_namespaced_resource_claim_with_http_info(name, namespace, body, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceClaim (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1beta2ResourceClaim + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta2ResourceClaim, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'namespace', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method replace_namespaced_resource_claim" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_resource_claim`") # noqa: E501 + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_resource_claim`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_resource_claim`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta2ResourceClaim", + 201: "V1beta2ResourceClaim", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaims/{name}', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def replace_namespaced_resource_claim_status(self, name, namespace, body, **kwargs): # noqa: E501 + """replace_namespaced_resource_claim_status # noqa: E501 + + replace status of the specified ResourceClaim # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.replace_namespaced_resource_claim_status(name, namespace, body, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceClaim (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1beta2ResourceClaim + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta2ResourceClaim + """ + kwargs['_return_http_data_only'] = True + return self.replace_namespaced_resource_claim_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501 + + def replace_namespaced_resource_claim_status_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501 + """replace_namespaced_resource_claim_status # noqa: E501 + + replace status of the specified ResourceClaim # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.replace_namespaced_resource_claim_status_with_http_info(name, namespace, body, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceClaim (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1beta2ResourceClaim + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta2ResourceClaim, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'namespace', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method replace_namespaced_resource_claim_status" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_resource_claim_status`") # noqa: E501 + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_resource_claim_status`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_resource_claim_status`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta2ResourceClaim", + 201: "V1beta2ResourceClaim", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaims/{name}/status', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def replace_namespaced_resource_claim_template(self, name, namespace, body, **kwargs): # noqa: E501 + """replace_namespaced_resource_claim_template # noqa: E501 + + replace the specified ResourceClaimTemplate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.replace_namespaced_resource_claim_template(name, namespace, body, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceClaimTemplate (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1beta2ResourceClaimTemplate + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta2ResourceClaimTemplate + """ + kwargs['_return_http_data_only'] = True + return self.replace_namespaced_resource_claim_template_with_http_info(name, namespace, body, **kwargs) # noqa: E501 + + def replace_namespaced_resource_claim_template_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501 + """replace_namespaced_resource_claim_template # noqa: E501 + + replace the specified ResourceClaimTemplate # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.replace_namespaced_resource_claim_template_with_http_info(name, namespace, body, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceClaimTemplate (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1beta2ResourceClaimTemplate + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta2ResourceClaimTemplate, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'namespace', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method replace_namespaced_resource_claim_template" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_resource_claim_template`") # noqa: E501 + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_resource_claim_template`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_resource_claim_template`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta2ResourceClaimTemplate", + 201: "V1beta2ResourceClaimTemplate", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaimtemplates/{name}', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def replace_resource_slice(self, name, body, **kwargs): # noqa: E501 + """replace_resource_slice # noqa: E501 + + replace the specified ResourceSlice # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.replace_resource_slice(name, body, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceSlice (required) + :type name: str + :param body: (required) + :type body: V1beta2ResourceSlice + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta2ResourceSlice + """ + kwargs['_return_http_data_only'] = True + return self.replace_resource_slice_with_http_info(name, body, **kwargs) # noqa: E501 + + def replace_resource_slice_with_http_info(self, name, body, **kwargs): # noqa: E501 + """replace_resource_slice # noqa: E501 + + replace the specified ResourceSlice # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.replace_resource_slice_with_http_info(name, body, async_req=True) + >>> result = thread.get() + + :param name: name of the ResourceSlice (required) + :type name: str + :param body: (required) + :type body: V1beta2ResourceSlice + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta2ResourceSlice, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method replace_resource_slice" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `replace_resource_slice`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `replace_resource_slice`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta2ResourceSlice", + 201: "V1beta2ResourceSlice", + 401: None, + } + + return self.api_client.call_api( + '/apis/resource.k8s.io/v1beta2/resourceslices/{name}', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) diff --git a/kubernetes/client/api/scheduling_api.py b/kubernetes/client/api/scheduling_api.py index eac6594d75..51e7bd0994 100644 --- a/kubernetes/client/api/scheduling_api.py +++ b/kubernetes/client/api/scheduling_api.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ @@ -42,20 +42,24 @@ def get_api_group(self, **kwargs): # noqa: E501 get information of a group # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_group(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1APIGroup + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1APIGroup """ kwargs['_return_http_data_only'] = True return self.get_api_group_with_http_info(**kwargs) # noqa: E501 @@ -66,22 +70,32 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 get information of a group # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_group_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1APIGroup, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1APIGroup, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -93,7 +107,10 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -112,7 +129,7 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -125,6 +142,11 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1APIGroup", + 401: None, + } + return self.api_client.call_api( '/apis/scheduling.k8s.io/', 'GET', path_params, @@ -133,10 +155,11 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1APIGroup', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) diff --git a/kubernetes/client/api/scheduling_v1_api.py b/kubernetes/client/api/scheduling_v1_api.py index 5d3429339b..53611c8255 100644 --- a/kubernetes/client/api/scheduling_v1_api.py +++ b/kubernetes/client/api/scheduling_v1_api.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ @@ -42,25 +42,34 @@ def create_priority_class(self, body, **kwargs): # noqa: E501 create a PriorityClass # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_priority_class(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param V1PriorityClass body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param body: (required) + :type body: V1PriorityClass + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1PriorityClass + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1PriorityClass """ kwargs['_return_http_data_only'] = True return self.create_priority_class_with_http_info(body, **kwargs) # noqa: E501 @@ -71,27 +80,42 @@ def create_priority_class_with_http_info(self, body, **kwargs): # noqa: E501 create a PriorityClass # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_priority_class_with_http_info(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param V1PriorityClass body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param body: (required) + :type body: V1PriorityClass + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1PriorityClass, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1PriorityClass, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -108,7 +132,10 @@ def create_priority_class_with_http_info(self, body, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -121,8 +148,7 @@ def create_priority_class_with_http_info(self, body, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_priority_class`") # noqa: E501 collection_formats = {} @@ -130,16 +156,16 @@ def create_priority_class_with_http_info(self, body, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -149,11 +175,18 @@ def create_priority_class_with_http_info(self, body, **kwargs): # noqa: E501 body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1PriorityClass", + 201: "V1PriorityClass", + 202: "V1PriorityClass", + 401: None, + } + return self.api_client.call_api( '/apis/scheduling.k8s.io/v1/priorityclasses', 'POST', path_params, @@ -162,13 +195,14 @@ def create_priority_class_with_http_info(self, body, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1PriorityClass', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_collection_priority_class(self, **kwargs): # noqa: E501 """delete_collection_priority_class # noqa: E501 @@ -176,34 +210,54 @@ def delete_collection_priority_class(self, **kwargs): # noqa: E501 delete collection of PriorityClass # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_priority_class(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_collection_priority_class_with_http_info(**kwargs) # noqa: E501 @@ -214,36 +268,62 @@ def delete_collection_priority_class_with_http_info(self, **kwargs): # noqa: E5 delete collection of PriorityClass # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_priority_class_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -254,6 +334,7 @@ def delete_collection_priority_class_with_http_info(self, **kwargs): # noqa: E5 'dry_run', 'field_selector', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'label_selector', 'limit', 'orphan_dependents', @@ -269,7 +350,10 @@ def delete_collection_priority_class_with_http_info(self, **kwargs): # noqa: E5 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -287,34 +371,36 @@ def delete_collection_priority_class_with_http_info(self, **kwargs): # noqa: E5 path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -324,11 +410,16 @@ def delete_collection_priority_class_with_http_info(self, **kwargs): # noqa: E5 body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 401: None, + } + return self.api_client.call_api( '/apis/scheduling.k8s.io/v1/priorityclasses', 'DELETE', path_params, @@ -337,13 +428,14 @@ def delete_collection_priority_class_with_http_info(self, **kwargs): # noqa: E5 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_priority_class(self, name, **kwargs): # noqa: E501 """delete_priority_class # noqa: E501 @@ -351,27 +443,40 @@ def delete_priority_class(self, name, **kwargs): # noqa: E501 delete a PriorityClass # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_priority_class(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PriorityClass (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the PriorityClass (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_priority_class_with_http_info(name, **kwargs) # noqa: E501 @@ -382,29 +487,48 @@ def delete_priority_class_with_http_info(self, name, **kwargs): # noqa: E501 delete a PriorityClass # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_priority_class_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PriorityClass (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the PriorityClass (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -414,6 +538,7 @@ def delete_priority_class_with_http_info(self, name, **kwargs): # noqa: E501 'pretty', 'dry_run', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'orphan_dependents', 'propagation_policy', 'body' @@ -423,7 +548,10 @@ def delete_priority_class_with_http_info(self, name, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -436,8 +564,7 @@ def delete_priority_class_with_http_info(self, name, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `delete_priority_class`") # noqa: E501 collection_formats = {} @@ -447,18 +574,20 @@ def delete_priority_class_with_http_info(self, name, **kwargs): # noqa: E501 path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -468,11 +597,17 @@ def delete_priority_class_with_http_info(self, name, **kwargs): # noqa: E501 body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 202: "V1Status", + 401: None, + } + return self.api_client.call_api( '/apis/scheduling.k8s.io/v1/priorityclasses/{name}', 'DELETE', path_params, @@ -481,13 +616,14 @@ def delete_priority_class_with_http_info(self, name, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def get_api_resources(self, **kwargs): # noqa: E501 """get_api_resources # noqa: E501 @@ -495,20 +631,24 @@ def get_api_resources(self, **kwargs): # noqa: E501 get available resources # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_resources(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1APIResourceList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1APIResourceList """ kwargs['_return_http_data_only'] = True return self.get_api_resources_with_http_info(**kwargs) # noqa: E501 @@ -519,22 +659,32 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 get available resources # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_resources_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -546,7 +696,10 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -565,7 +718,7 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -573,11 +726,16 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1APIResourceList", + 401: None, + } + return self.api_client.call_api( '/apis/scheduling.k8s.io/v1/', 'GET', path_params, @@ -586,13 +744,14 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1APIResourceList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_priority_class(self, **kwargs): # noqa: E501 """list_priority_class # noqa: E501 @@ -600,31 +759,46 @@ def list_priority_class(self, **kwargs): # noqa: E501 list or watch objects of kind PriorityClass # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_priority_class(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1PriorityClassList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1PriorityClassList """ kwargs['_return_http_data_only'] = True return self.list_priority_class_with_http_info(**kwargs) # noqa: E501 @@ -635,33 +809,54 @@ def list_priority_class_with_http_info(self, **kwargs): # noqa: E501 list or watch objects of kind PriorityClass # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_priority_class_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1PriorityClassList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1PriorityClassList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -684,7 +879,10 @@ def list_priority_class_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -702,30 +900,30 @@ def list_priority_class_with_http_info(self, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -733,11 +931,16 @@ def list_priority_class_with_http_info(self, **kwargs): # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1PriorityClassList", + 401: None, + } + return self.api_client.call_api( '/apis/scheduling.k8s.io/v1/priorityclasses', 'GET', path_params, @@ -746,13 +949,14 @@ def list_priority_class_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1PriorityClassList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_priority_class(self, name, body, **kwargs): # noqa: E501 """patch_priority_class # noqa: E501 @@ -760,27 +964,38 @@ def patch_priority_class(self, name, body, **kwargs): # noqa: E501 partially update the specified PriorityClass # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_priority_class(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PriorityClass (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the PriorityClass (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1PriorityClass + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1PriorityClass """ kwargs['_return_http_data_only'] = True return self.patch_priority_class_with_http_info(name, body, **kwargs) # noqa: E501 @@ -791,29 +1006,46 @@ def patch_priority_class_with_http_info(self, name, body, **kwargs): # noqa: E5 partially update the specified PriorityClass # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_priority_class_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PriorityClass (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the PriorityClass (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1PriorityClass, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1PriorityClass, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -832,7 +1064,10 @@ def patch_priority_class_with_http_info(self, name, body, **kwargs): # noqa: E5 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -845,12 +1080,10 @@ def patch_priority_class_with_http_info(self, name, body, **kwargs): # noqa: E5 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_priority_class`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_priority_class`") # noqa: E501 collection_formats = {} @@ -860,18 +1093,18 @@ def patch_priority_class_with_http_info(self, name, body, **kwargs): # noqa: E5 path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -881,15 +1114,25 @@ def patch_priority_class_with_http_info(self, name, body, **kwargs): # noqa: E5 body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1PriorityClass", + 201: "V1PriorityClass", + 401: None, + } + return self.api_client.call_api( '/apis/scheduling.k8s.io/v1/priorityclasses/{name}', 'PATCH', path_params, @@ -898,13 +1141,14 @@ def patch_priority_class_with_http_info(self, name, body, **kwargs): # noqa: E5 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1PriorityClass', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_priority_class(self, name, **kwargs): # noqa: E501 """read_priority_class # noqa: E501 @@ -912,22 +1156,28 @@ def read_priority_class(self, name, **kwargs): # noqa: E501 read the specified PriorityClass # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_priority_class(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PriorityClass (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the PriorityClass (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1PriorityClass + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1PriorityClass """ kwargs['_return_http_data_only'] = True return self.read_priority_class_with_http_info(name, **kwargs) # noqa: E501 @@ -938,24 +1188,36 @@ def read_priority_class_with_http_info(self, name, **kwargs): # noqa: E501 read the specified PriorityClass # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_priority_class_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PriorityClass (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the PriorityClass (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1PriorityClass, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1PriorityClass, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -969,7 +1231,10 @@ def read_priority_class_with_http_info(self, name, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -982,8 +1247,7 @@ def read_priority_class_with_http_info(self, name, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_priority_class`") # noqa: E501 collection_formats = {} @@ -993,10 +1257,10 @@ def read_priority_class_with_http_info(self, name, **kwargs): # noqa: E501 path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1004,11 +1268,16 @@ def read_priority_class_with_http_info(self, name, **kwargs): # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1PriorityClass", + 401: None, + } + return self.api_client.call_api( '/apis/scheduling.k8s.io/v1/priorityclasses/{name}', 'GET', path_params, @@ -1017,13 +1286,14 @@ def read_priority_class_with_http_info(self, name, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1PriorityClass', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_priority_class(self, name, body, **kwargs): # noqa: E501 """replace_priority_class # noqa: E501 @@ -1031,26 +1301,36 @@ def replace_priority_class(self, name, body, **kwargs): # noqa: E501 replace the specified PriorityClass # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_priority_class(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PriorityClass (required) - :param V1PriorityClass body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the PriorityClass (required) + :type name: str + :param body: (required) + :type body: V1PriorityClass + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1PriorityClass + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1PriorityClass """ kwargs['_return_http_data_only'] = True return self.replace_priority_class_with_http_info(name, body, **kwargs) # noqa: E501 @@ -1061,28 +1341,44 @@ def replace_priority_class_with_http_info(self, name, body, **kwargs): # noqa: replace the specified PriorityClass # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_priority_class_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PriorityClass (required) - :param V1PriorityClass body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the PriorityClass (required) + :type name: str + :param body: (required) + :type body: V1PriorityClass + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1PriorityClass, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1PriorityClass, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1100,7 +1396,10 @@ def replace_priority_class_with_http_info(self, name, body, **kwargs): # noqa: 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1113,12 +1412,10 @@ def replace_priority_class_with_http_info(self, name, body, **kwargs): # noqa: local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_priority_class`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_priority_class`") # noqa: E501 collection_formats = {} @@ -1128,16 +1425,16 @@ def replace_priority_class_with_http_info(self, name, body, **kwargs): # noqa: path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1147,11 +1444,17 @@ def replace_priority_class_with_http_info(self, name, body, **kwargs): # noqa: body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1PriorityClass", + 201: "V1PriorityClass", + 401: None, + } + return self.api_client.call_api( '/apis/scheduling.k8s.io/v1/priorityclasses/{name}', 'PUT', path_params, @@ -1160,10 +1463,11 @@ def replace_priority_class_with_http_info(self, name, body, **kwargs): # noqa: body=body_params, post_params=form_params, files=local_var_files, - response_type='V1PriorityClass', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) diff --git a/kubernetes/client/api/scheduling_v1alpha1_api.py b/kubernetes/client/api/scheduling_v1alpha1_api.py new file mode 100644 index 0000000000..c74806f057 --- /dev/null +++ b/kubernetes/client/api/scheduling_v1alpha1_api.py @@ -0,0 +1,1748 @@ +# coding: utf-8 + +""" + Kubernetes + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: release-1.35 + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from kubernetes.client.api_client import ApiClient +from kubernetes.client.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class SchedulingV1alpha1Api(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def create_namespaced_workload(self, namespace, body, **kwargs): # noqa: E501 + """create_namespaced_workload # noqa: E501 + + create a Workload # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_namespaced_workload(namespace, body, async_req=True) + >>> result = thread.get() + + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1alpha1Workload + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1alpha1Workload + """ + kwargs['_return_http_data_only'] = True + return self.create_namespaced_workload_with_http_info(namespace, body, **kwargs) # noqa: E501 + + def create_namespaced_workload_with_http_info(self, namespace, body, **kwargs): # noqa: E501 + """create_namespaced_workload # noqa: E501 + + create a Workload # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_namespaced_workload_with_http_info(namespace, body, async_req=True) + >>> result = thread.get() + + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1alpha1Workload + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1alpha1Workload, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'namespace', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_namespaced_workload" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_workload`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_workload`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1alpha1Workload", + 201: "V1alpha1Workload", + 202: "V1alpha1Workload", + 401: None, + } + + return self.api_client.call_api( + '/apis/scheduling.k8s.io/v1alpha1/namespaces/{namespace}/workloads', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_collection_namespaced_workload(self, namespace, **kwargs): # noqa: E501 + """delete_collection_namespaced_workload # noqa: E501 + + delete collection of Workload # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_collection_namespaced_workload(namespace, async_req=True) + >>> result = thread.get() + + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1Status + """ + kwargs['_return_http_data_only'] = True + return self.delete_collection_namespaced_workload_with_http_info(namespace, **kwargs) # noqa: E501 + + def delete_collection_namespaced_workload_with_http_info(self, namespace, **kwargs): # noqa: E501 + """delete_collection_namespaced_workload # noqa: E501 + + delete collection of Workload # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_collection_namespaced_workload_with_http_info(namespace, async_req=True) + >>> result = thread.get() + + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'namespace', + 'pretty', + '_continue', + 'dry_run', + 'field_selector', + 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', + 'label_selector', + 'limit', + 'orphan_dependents', + 'propagation_policy', + 'resource_version', + 'resource_version_match', + 'send_initial_events', + 'timeout_seconds', + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_collection_namespaced_workload" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_workload`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 + query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 + query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 + query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 + query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 + query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 + query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 + query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 + query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 + query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 + query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1Status", + 401: None, + } + + return self.api_client.call_api( + '/apis/scheduling.k8s.io/v1alpha1/namespaces/{namespace}/workloads', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_namespaced_workload(self, name, namespace, **kwargs): # noqa: E501 + """delete_namespaced_workload # noqa: E501 + + delete a Workload # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_namespaced_workload(name, namespace, async_req=True) + >>> result = thread.get() + + :param name: name of the Workload (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1Status + """ + kwargs['_return_http_data_only'] = True + return self.delete_namespaced_workload_with_http_info(name, namespace, **kwargs) # noqa: E501 + + def delete_namespaced_workload_with_http_info(self, name, namespace, **kwargs): # noqa: E501 + """delete_namespaced_workload # noqa: E501 + + delete a Workload # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_namespaced_workload_with_http_info(name, namespace, async_req=True) + >>> result = thread.get() + + :param name: name of the Workload (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'namespace', + 'pretty', + 'dry_run', + 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', + 'orphan_dependents', + 'propagation_policy', + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_namespaced_workload" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_workload`") # noqa: E501 + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_workload`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 + query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 + query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 + query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1Status", + 202: "V1Status", + 401: None, + } + + return self.api_client.call_api( + '/apis/scheduling.k8s.io/v1alpha1/namespaces/{namespace}/workloads/{name}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_api_resources(self, **kwargs): # noqa: E501 + """get_api_resources # noqa: E501 + + get available resources # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_api_resources(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1APIResourceList + """ + kwargs['_return_http_data_only'] = True + return self.get_api_resources_with_http_info(**kwargs) # noqa: E501 + + def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 + """get_api_resources # noqa: E501 + + get available resources # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_api_resources_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_api_resources" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1APIResourceList", + 401: None, + } + + return self.api_client.call_api( + '/apis/scheduling.k8s.io/v1alpha1/', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def list_namespaced_workload(self, namespace, **kwargs): # noqa: E501 + """list_namespaced_workload # noqa: E501 + + list or watch objects of kind Workload # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_namespaced_workload(namespace, async_req=True) + >>> result = thread.get() + + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1alpha1WorkloadList + """ + kwargs['_return_http_data_only'] = True + return self.list_namespaced_workload_with_http_info(namespace, **kwargs) # noqa: E501 + + def list_namespaced_workload_with_http_info(self, namespace, **kwargs): # noqa: E501 + """list_namespaced_workload # noqa: E501 + + list or watch objects of kind Workload # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_namespaced_workload_with_http_info(namespace, async_req=True) + >>> result = thread.get() + + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1alpha1WorkloadList, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'namespace', + 'pretty', + 'allow_watch_bookmarks', + '_continue', + 'field_selector', + 'label_selector', + 'limit', + 'resource_version', + 'resource_version_match', + 'send_initial_events', + 'timeout_seconds', + 'watch' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_namespaced_workload" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_workload`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 + query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 + query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 + query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 + query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 + query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 + query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 + query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 + query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 + query_params.append(('watch', local_var_params['watch'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1alpha1WorkloadList", + 401: None, + } + + return self.api_client.call_api( + '/apis/scheduling.k8s.io/v1alpha1/namespaces/{namespace}/workloads', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def list_workload_for_all_namespaces(self, **kwargs): # noqa: E501 + """list_workload_for_all_namespaces # noqa: E501 + + list or watch objects of kind Workload # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_workload_for_all_namespaces(async_req=True) + >>> result = thread.get() + + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1alpha1WorkloadList + """ + kwargs['_return_http_data_only'] = True + return self.list_workload_for_all_namespaces_with_http_info(**kwargs) # noqa: E501 + + def list_workload_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E501 + """list_workload_for_all_namespaces # noqa: E501 + + list or watch objects of kind Workload # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_workload_for_all_namespaces_with_http_info(async_req=True) + >>> result = thread.get() + + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1alpha1WorkloadList, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'allow_watch_bookmarks', + '_continue', + 'field_selector', + 'label_selector', + 'limit', + 'pretty', + 'resource_version', + 'resource_version_match', + 'send_initial_events', + 'timeout_seconds', + 'watch' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_workload_for_all_namespaces" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 + query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 + query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 + query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 + query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 + query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 + query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 + query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 + query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 + query_params.append(('watch', local_var_params['watch'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1alpha1WorkloadList", + 401: None, + } + + return self.api_client.call_api( + '/apis/scheduling.k8s.io/v1alpha1/workloads', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def patch_namespaced_workload(self, name, namespace, body, **kwargs): # noqa: E501 + """patch_namespaced_workload # noqa: E501 + + partially update the specified Workload # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_namespaced_workload(name, namespace, body, async_req=True) + >>> result = thread.get() + + :param name: name of the Workload (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1alpha1Workload + """ + kwargs['_return_http_data_only'] = True + return self.patch_namespaced_workload_with_http_info(name, namespace, body, **kwargs) # noqa: E501 + + def patch_namespaced_workload_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501 + """patch_namespaced_workload # noqa: E501 + + partially update the specified Workload # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_namespaced_workload_with_http_info(name, namespace, body, async_req=True) + >>> result = thread.get() + + :param name: name of the Workload (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1alpha1Workload, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'namespace', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation', + 'force' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method patch_namespaced_workload" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_workload`") # noqa: E501 + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_workload`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_workload`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 + query_params.append(('force', local_var_params['force'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # HTTP header `Content-Type` + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1alpha1Workload", + 201: "V1alpha1Workload", + 401: None, + } + + return self.api_client.call_api( + '/apis/scheduling.k8s.io/v1alpha1/namespaces/{namespace}/workloads/{name}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def read_namespaced_workload(self, name, namespace, **kwargs): # noqa: E501 + """read_namespaced_workload # noqa: E501 + + read the specified Workload # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.read_namespaced_workload(name, namespace, async_req=True) + >>> result = thread.get() + + :param name: name of the Workload (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1alpha1Workload + """ + kwargs['_return_http_data_only'] = True + return self.read_namespaced_workload_with_http_info(name, namespace, **kwargs) # noqa: E501 + + def read_namespaced_workload_with_http_info(self, name, namespace, **kwargs): # noqa: E501 + """read_namespaced_workload # noqa: E501 + + read the specified Workload # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.read_namespaced_workload_with_http_info(name, namespace, async_req=True) + >>> result = thread.get() + + :param name: name of the Workload (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1alpha1Workload, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'namespace', + 'pretty' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method read_namespaced_workload" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_workload`") # noqa: E501 + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_workload`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1alpha1Workload", + 401: None, + } + + return self.api_client.call_api( + '/apis/scheduling.k8s.io/v1alpha1/namespaces/{namespace}/workloads/{name}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def replace_namespaced_workload(self, name, namespace, body, **kwargs): # noqa: E501 + """replace_namespaced_workload # noqa: E501 + + replace the specified Workload # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.replace_namespaced_workload(name, namespace, body, async_req=True) + >>> result = thread.get() + + :param name: name of the Workload (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1alpha1Workload + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1alpha1Workload + """ + kwargs['_return_http_data_only'] = True + return self.replace_namespaced_workload_with_http_info(name, namespace, body, **kwargs) # noqa: E501 + + def replace_namespaced_workload_with_http_info(self, name, namespace, body, **kwargs): # noqa: E501 + """replace_namespaced_workload # noqa: E501 + + replace the specified Workload # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.replace_namespaced_workload_with_http_info(name, namespace, body, async_req=True) + >>> result = thread.get() + + :param name: name of the Workload (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1alpha1Workload + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1alpha1Workload, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'namespace', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method replace_namespaced_workload" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_workload`") # noqa: E501 + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_workload`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_workload`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1alpha1Workload", + 201: "V1alpha1Workload", + 401: None, + } + + return self.api_client.call_api( + '/apis/scheduling.k8s.io/v1alpha1/namespaces/{namespace}/workloads/{name}', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) diff --git a/kubernetes/client/api/storage_api.py b/kubernetes/client/api/storage_api.py index 9b7735a8fd..9cfa0b385c 100644 --- a/kubernetes/client/api/storage_api.py +++ b/kubernetes/client/api/storage_api.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ @@ -42,20 +42,24 @@ def get_api_group(self, **kwargs): # noqa: E501 get information of a group # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_group(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1APIGroup + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1APIGroup """ kwargs['_return_http_data_only'] = True return self.get_api_group_with_http_info(**kwargs) # noqa: E501 @@ -66,22 +70,32 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 get information of a group # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_group_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1APIGroup, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1APIGroup, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -93,7 +107,10 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -112,7 +129,7 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -125,6 +142,11 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1APIGroup", + 401: None, + } + return self.api_client.call_api( '/apis/storage.k8s.io/', 'GET', path_params, @@ -133,10 +155,11 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1APIGroup', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) diff --git a/kubernetes/client/api/storage_v1_api.py b/kubernetes/client/api/storage_v1_api.py index ca99c332ea..549ef72d24 100644 --- a/kubernetes/client/api/storage_v1_api.py +++ b/kubernetes/client/api/storage_v1_api.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ @@ -42,25 +42,34 @@ def create_csi_driver(self, body, **kwargs): # noqa: E501 create a CSIDriver # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_csi_driver(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param V1CSIDriver body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param body: (required) + :type body: V1CSIDriver + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1CSIDriver + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1CSIDriver """ kwargs['_return_http_data_only'] = True return self.create_csi_driver_with_http_info(body, **kwargs) # noqa: E501 @@ -71,27 +80,42 @@ def create_csi_driver_with_http_info(self, body, **kwargs): # noqa: E501 create a CSIDriver # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_csi_driver_with_http_info(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param V1CSIDriver body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param body: (required) + :type body: V1CSIDriver + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1CSIDriver, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1CSIDriver, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -108,7 +132,10 @@ def create_csi_driver_with_http_info(self, body, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -121,8 +148,7 @@ def create_csi_driver_with_http_info(self, body, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_csi_driver`") # noqa: E501 collection_formats = {} @@ -130,16 +156,16 @@ def create_csi_driver_with_http_info(self, body, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -149,11 +175,18 @@ def create_csi_driver_with_http_info(self, body, **kwargs): # noqa: E501 body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1CSIDriver", + 201: "V1CSIDriver", + 202: "V1CSIDriver", + 401: None, + } + return self.api_client.call_api( '/apis/storage.k8s.io/v1/csidrivers', 'POST', path_params, @@ -162,13 +195,14 @@ def create_csi_driver_with_http_info(self, body, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1CSIDriver', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def create_csi_node(self, body, **kwargs): # noqa: E501 """create_csi_node # noqa: E501 @@ -176,25 +210,34 @@ def create_csi_node(self, body, **kwargs): # noqa: E501 create a CSINode # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_csi_node(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param V1CSINode body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param body: (required) + :type body: V1CSINode + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1CSINode + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1CSINode """ kwargs['_return_http_data_only'] = True return self.create_csi_node_with_http_info(body, **kwargs) # noqa: E501 @@ -205,27 +248,42 @@ def create_csi_node_with_http_info(self, body, **kwargs): # noqa: E501 create a CSINode # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_csi_node_with_http_info(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param V1CSINode body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param body: (required) + :type body: V1CSINode + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1CSINode, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1CSINode, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -242,7 +300,10 @@ def create_csi_node_with_http_info(self, body, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -255,8 +316,7 @@ def create_csi_node_with_http_info(self, body, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_csi_node`") # noqa: E501 collection_formats = {} @@ -264,16 +324,16 @@ def create_csi_node_with_http_info(self, body, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -283,11 +343,18 @@ def create_csi_node_with_http_info(self, body, **kwargs): # noqa: E501 body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1CSINode", + 201: "V1CSINode", + 202: "V1CSINode", + 401: None, + } + return self.api_client.call_api( '/apis/storage.k8s.io/v1/csinodes', 'POST', path_params, @@ -296,13 +363,14 @@ def create_csi_node_with_http_info(self, body, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1CSINode', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def create_namespaced_csi_storage_capacity(self, namespace, body, **kwargs): # noqa: E501 """create_namespaced_csi_storage_capacity # noqa: E501 @@ -310,26 +378,36 @@ def create_namespaced_csi_storage_capacity(self, namespace, body, **kwargs): # create a CSIStorageCapacity # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_namespaced_csi_storage_capacity(namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1CSIStorageCapacity body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1CSIStorageCapacity + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1CSIStorageCapacity + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1CSIStorageCapacity """ kwargs['_return_http_data_only'] = True return self.create_namespaced_csi_storage_capacity_with_http_info(namespace, body, **kwargs) # noqa: E501 @@ -340,28 +418,44 @@ def create_namespaced_csi_storage_capacity_with_http_info(self, namespace, body, create a CSIStorageCapacity # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_namespaced_csi_storage_capacity_with_http_info(namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1CSIStorageCapacity body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1CSIStorageCapacity + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1CSIStorageCapacity, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1CSIStorageCapacity, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -379,7 +473,10 @@ def create_namespaced_csi_storage_capacity_with_http_info(self, namespace, body, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -392,12 +489,10 @@ def create_namespaced_csi_storage_capacity_with_http_info(self, namespace, body, local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `create_namespaced_csi_storage_capacity`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_namespaced_csi_storage_capacity`") # noqa: E501 collection_formats = {} @@ -407,16 +502,16 @@ def create_namespaced_csi_storage_capacity_with_http_info(self, namespace, body, path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -426,11 +521,18 @@ def create_namespaced_csi_storage_capacity_with_http_info(self, namespace, body, body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1CSIStorageCapacity", + 201: "V1CSIStorageCapacity", + 202: "V1CSIStorageCapacity", + 401: None, + } + return self.api_client.call_api( '/apis/storage.k8s.io/v1/namespaces/{namespace}/csistoragecapacities', 'POST', path_params, @@ -439,13 +541,14 @@ def create_namespaced_csi_storage_capacity_with_http_info(self, namespace, body, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1CSIStorageCapacity', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def create_storage_class(self, body, **kwargs): # noqa: E501 """create_storage_class # noqa: E501 @@ -453,25 +556,34 @@ def create_storage_class(self, body, **kwargs): # noqa: E501 create a StorageClass # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_storage_class(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param V1StorageClass body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param body: (required) + :type body: V1StorageClass + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1StorageClass + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1StorageClass """ kwargs['_return_http_data_only'] = True return self.create_storage_class_with_http_info(body, **kwargs) # noqa: E501 @@ -482,27 +594,42 @@ def create_storage_class_with_http_info(self, body, **kwargs): # noqa: E501 create a StorageClass # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_storage_class_with_http_info(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param V1StorageClass body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param body: (required) + :type body: V1StorageClass + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1StorageClass, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1StorageClass, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -519,7 +646,10 @@ def create_storage_class_with_http_info(self, body, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -532,8 +662,7 @@ def create_storage_class_with_http_info(self, body, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_storage_class`") # noqa: E501 collection_formats = {} @@ -541,16 +670,16 @@ def create_storage_class_with_http_info(self, body, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -560,11 +689,18 @@ def create_storage_class_with_http_info(self, body, **kwargs): # noqa: E501 body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1StorageClass", + 201: "V1StorageClass", + 202: "V1StorageClass", + 401: None, + } + return self.api_client.call_api( '/apis/storage.k8s.io/v1/storageclasses', 'POST', path_params, @@ -573,13 +709,14 @@ def create_storage_class_with_http_info(self, body, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1StorageClass', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def create_volume_attachment(self, body, **kwargs): # noqa: E501 """create_volume_attachment # noqa: E501 @@ -587,25 +724,34 @@ def create_volume_attachment(self, body, **kwargs): # noqa: E501 create a VolumeAttachment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_volume_attachment(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param V1VolumeAttachment body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param body: (required) + :type body: V1VolumeAttachment + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1VolumeAttachment + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1VolumeAttachment """ kwargs['_return_http_data_only'] = True return self.create_volume_attachment_with_http_info(body, **kwargs) # noqa: E501 @@ -616,27 +762,42 @@ def create_volume_attachment_with_http_info(self, body, **kwargs): # noqa: E501 create a VolumeAttachment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_volume_attachment_with_http_info(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param V1VolumeAttachment body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param body: (required) + :type body: V1VolumeAttachment + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1VolumeAttachment, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1VolumeAttachment, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -653,7 +814,10 @@ def create_volume_attachment_with_http_info(self, body, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -666,8 +830,7 @@ def create_volume_attachment_with_http_info(self, body, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `create_volume_attachment`") # noqa: E501 collection_formats = {} @@ -675,16 +838,16 @@ def create_volume_attachment_with_http_info(self, body, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -694,11 +857,18 @@ def create_volume_attachment_with_http_info(self, body, **kwargs): # noqa: E501 body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1VolumeAttachment", + 201: "V1VolumeAttachment", + 202: "V1VolumeAttachment", + 401: None, + } + return self.api_client.call_api( '/apis/storage.k8s.io/v1/volumeattachments', 'POST', path_params, @@ -707,13 +877,182 @@ def create_volume_attachment_with_http_info(self, body, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1VolumeAttachment', # noqa: E501 + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def create_volume_attributes_class(self, body, **kwargs): # noqa: E501 + """create_volume_attributes_class # noqa: E501 + + create a VolumeAttributesClass # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_volume_attributes_class(body, async_req=True) + >>> result = thread.get() + + :param body: (required) + :type body: V1VolumeAttributesClass + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1VolumeAttributesClass + """ + kwargs['_return_http_data_only'] = True + return self.create_volume_attributes_class_with_http_info(body, **kwargs) # noqa: E501 + + def create_volume_attributes_class_with_http_info(self, body, **kwargs): # noqa: E501 + """create_volume_attributes_class # noqa: E501 + + create a VolumeAttributesClass # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_volume_attributes_class_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param body: (required) + :type body: V1VolumeAttributesClass + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1VolumeAttributesClass, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_volume_attributes_class" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `create_volume_attributes_class`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1VolumeAttributesClass", + 201: "V1VolumeAttributesClass", + 202: "V1VolumeAttributesClass", + 401: None, + } + + return self.api_client.call_api( + '/apis/storage.k8s.io/v1/volumeattributesclasses', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_collection_csi_driver(self, **kwargs): # noqa: E501 """delete_collection_csi_driver # noqa: E501 @@ -721,34 +1060,54 @@ def delete_collection_csi_driver(self, **kwargs): # noqa: E501 delete collection of CSIDriver # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_csi_driver(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_collection_csi_driver_with_http_info(**kwargs) # noqa: E501 @@ -759,36 +1118,62 @@ def delete_collection_csi_driver_with_http_info(self, **kwargs): # noqa: E501 delete collection of CSIDriver # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_csi_driver_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -799,6 +1184,7 @@ def delete_collection_csi_driver_with_http_info(self, **kwargs): # noqa: E501 'dry_run', 'field_selector', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'label_selector', 'limit', 'orphan_dependents', @@ -814,7 +1200,10 @@ def delete_collection_csi_driver_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -832,34 +1221,36 @@ def delete_collection_csi_driver_with_http_info(self, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -869,11 +1260,16 @@ def delete_collection_csi_driver_with_http_info(self, **kwargs): # noqa: E501 body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 401: None, + } + return self.api_client.call_api( '/apis/storage.k8s.io/v1/csidrivers', 'DELETE', path_params, @@ -882,13 +1278,14 @@ def delete_collection_csi_driver_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_collection_csi_node(self, **kwargs): # noqa: E501 """delete_collection_csi_node # noqa: E501 @@ -896,34 +1293,54 @@ def delete_collection_csi_node(self, **kwargs): # noqa: E501 delete collection of CSINode # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_csi_node(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_collection_csi_node_with_http_info(**kwargs) # noqa: E501 @@ -934,36 +1351,62 @@ def delete_collection_csi_node_with_http_info(self, **kwargs): # noqa: E501 delete collection of CSINode # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_csi_node_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -974,6 +1417,7 @@ def delete_collection_csi_node_with_http_info(self, **kwargs): # noqa: E501 'dry_run', 'field_selector', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'label_selector', 'limit', 'orphan_dependents', @@ -989,7 +1433,10 @@ def delete_collection_csi_node_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1007,34 +1454,36 @@ def delete_collection_csi_node_with_http_info(self, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1044,11 +1493,16 @@ def delete_collection_csi_node_with_http_info(self, **kwargs): # noqa: E501 body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 401: None, + } + return self.api_client.call_api( '/apis/storage.k8s.io/v1/csinodes', 'DELETE', path_params, @@ -1057,13 +1511,14 @@ def delete_collection_csi_node_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_collection_namespaced_csi_storage_capacity(self, namespace, **kwargs): # noqa: E501 """delete_collection_namespaced_csi_storage_capacity # noqa: E501 @@ -1071,35 +1526,56 @@ def delete_collection_namespaced_csi_storage_capacity(self, namespace, **kwargs) delete collection of CSIStorageCapacity # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_namespaced_csi_storage_capacity(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_collection_namespaced_csi_storage_capacity_with_http_info(namespace, **kwargs) # noqa: E501 @@ -1110,37 +1586,64 @@ def delete_collection_namespaced_csi_storage_capacity_with_http_info(self, names delete collection of CSIStorageCapacity # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_namespaced_csi_storage_capacity_with_http_info(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1152,6 +1655,7 @@ def delete_collection_namespaced_csi_storage_capacity_with_http_info(self, names 'dry_run', 'field_selector', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'label_selector', 'limit', 'orphan_dependents', @@ -1167,7 +1671,10 @@ def delete_collection_namespaced_csi_storage_capacity_with_http_info(self, names 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1180,8 +1687,7 @@ def delete_collection_namespaced_csi_storage_capacity_with_http_info(self, names local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `delete_collection_namespaced_csi_storage_capacity`") # noqa: E501 collection_formats = {} @@ -1191,34 +1697,36 @@ def delete_collection_namespaced_csi_storage_capacity_with_http_info(self, names path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1228,11 +1736,16 @@ def delete_collection_namespaced_csi_storage_capacity_with_http_info(self, names body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 401: None, + } + return self.api_client.call_api( '/apis/storage.k8s.io/v1/namespaces/{namespace}/csistoragecapacities', 'DELETE', path_params, @@ -1241,13 +1754,14 @@ def delete_collection_namespaced_csi_storage_capacity_with_http_info(self, names body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_collection_storage_class(self, **kwargs): # noqa: E501 """delete_collection_storage_class # noqa: E501 @@ -1255,34 +1769,54 @@ def delete_collection_storage_class(self, **kwargs): # noqa: E501 delete collection of StorageClass # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_storage_class(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_collection_storage_class_with_http_info(**kwargs) # noqa: E501 @@ -1293,36 +1827,62 @@ def delete_collection_storage_class_with_http_info(self, **kwargs): # noqa: E50 delete collection of StorageClass # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_storage_class_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1333,6 +1893,7 @@ def delete_collection_storage_class_with_http_info(self, **kwargs): # noqa: E50 'dry_run', 'field_selector', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'label_selector', 'limit', 'orphan_dependents', @@ -1348,7 +1909,10 @@ def delete_collection_storage_class_with_http_info(self, **kwargs): # noqa: E50 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1366,34 +1930,36 @@ def delete_collection_storage_class_with_http_info(self, **kwargs): # noqa: E50 path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1403,11 +1969,16 @@ def delete_collection_storage_class_with_http_info(self, **kwargs): # noqa: E50 body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 401: None, + } + return self.api_client.call_api( '/apis/storage.k8s.io/v1/storageclasses', 'DELETE', path_params, @@ -1416,13 +1987,14 @@ def delete_collection_storage_class_with_http_info(self, **kwargs): # noqa: E50 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_collection_volume_attachment(self, **kwargs): # noqa: E501 """delete_collection_volume_attachment # noqa: E501 @@ -1430,34 +2002,54 @@ def delete_collection_volume_attachment(self, **kwargs): # noqa: E501 delete collection of VolumeAttachment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_volume_attachment(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True return self.delete_collection_volume_attachment_with_http_info(**kwargs) # noqa: E501 @@ -1468,36 +2060,62 @@ def delete_collection_volume_attachment_with_http_info(self, **kwargs): # noqa: delete collection of VolumeAttachment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_collection_volume_attachment_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1508,6 +2126,7 @@ def delete_collection_volume_attachment_with_http_info(self, **kwargs): # noqa: 'dry_run', 'field_selector', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'label_selector', 'limit', 'orphan_dependents', @@ -1523,7 +2142,10 @@ def delete_collection_volume_attachment_with_http_info(self, **kwargs): # noqa: 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1541,34 +2163,36 @@ def delete_collection_volume_attachment_with_http_info(self, **kwargs): # noqa: path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1578,11 +2202,16 @@ def delete_collection_volume_attachment_with_http_info(self, **kwargs): # noqa: body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 401: None, + } + return self.api_client.call_api( '/apis/storage.k8s.io/v1/volumeattachments', 'DELETE', path_params, @@ -1591,85 +2220,154 @@ def delete_collection_volume_attachment_with_http_info(self, **kwargs): # noqa: body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) - def delete_csi_driver(self, name, **kwargs): # noqa: E501 - """delete_csi_driver # noqa: E501 + def delete_collection_volume_attributes_class(self, **kwargs): # noqa: E501 + """delete_collection_volume_attributes_class # noqa: E501 - delete a CSIDriver # noqa: E501 + delete collection of VolumeAttributesClass # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_csi_driver(name, async_req=True) + + >>> thread = api.delete_collection_volume_attributes_class(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the CSIDriver (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1CSIDriver + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True - return self.delete_csi_driver_with_http_info(name, **kwargs) # noqa: E501 + return self.delete_collection_volume_attributes_class_with_http_info(**kwargs) # noqa: E501 - def delete_csi_driver_with_http_info(self, name, **kwargs): # noqa: E501 - """delete_csi_driver # noqa: E501 + def delete_collection_volume_attributes_class_with_http_info(self, **kwargs): # noqa: E501 + """delete_collection_volume_attributes_class # noqa: E501 - delete a CSIDriver # noqa: E501 + delete collection of VolumeAttributesClass # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_csi_driver_with_http_info(name, async_req=True) + + >>> thread = api.delete_collection_volume_attributes_class_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the CSIDriver (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1CSIDriver, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ - 'name', 'pretty', + '_continue', 'dry_run', + 'field_selector', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', + 'label_selector', + 'limit', 'orphan_dependents', 'propagation_policy', + 'resource_version', + 'resource_version_match', + 'send_initial_events', + 'timeout_seconds', 'body' ] all_params.extend( @@ -1677,7 +2375,10 @@ def delete_csi_driver_with_http_info(self, name, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1685,34 +2386,46 @@ def delete_csi_driver_with_http_info(self, name, **kwargs): # noqa: E501 if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method delete_csi_driver" % key + " to method delete_collection_volume_attributes_class" % key ) local_var_params[key] = val del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `delete_csi_driver`") # noqa: E501 collection_formats = {} path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 + query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 + query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 + query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 + query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 + query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 + query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 + query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1722,87 +2435,125 @@ def delete_csi_driver_with_http_info(self, name, **kwargs): # noqa: E501 body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 401: None, + } + return self.api_client.call_api( - '/apis/storage.k8s.io/v1/csidrivers/{name}', 'DELETE', + '/apis/storage.k8s.io/v1/volumeattributesclasses', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1CSIDriver', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) - def delete_csi_node(self, name, **kwargs): # noqa: E501 - """delete_csi_node # noqa: E501 + def delete_csi_driver(self, name, **kwargs): # noqa: E501 + """delete_csi_driver # noqa: E501 - delete a CSINode # noqa: E501 + delete a CSIDriver # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_csi_node(name, async_req=True) + + >>> thread = api.delete_csi_driver(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the CSINode (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the CSIDriver (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1CSINode + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1CSIDriver """ kwargs['_return_http_data_only'] = True - return self.delete_csi_node_with_http_info(name, **kwargs) # noqa: E501 + return self.delete_csi_driver_with_http_info(name, **kwargs) # noqa: E501 - def delete_csi_node_with_http_info(self, name, **kwargs): # noqa: E501 - """delete_csi_node # noqa: E501 + def delete_csi_driver_with_http_info(self, name, **kwargs): # noqa: E501 + """delete_csi_driver # noqa: E501 - delete a CSINode # noqa: E501 + delete a CSIDriver # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_csi_node_with_http_info(name, async_req=True) + + >>> thread = api.delete_csi_driver_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the CSINode (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the CSIDriver (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1CSINode, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1CSIDriver, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -1812,6 +2563,7 @@ def delete_csi_node_with_http_info(self, name, **kwargs): # noqa: E501 'pretty', 'dry_run', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'orphan_dependents', 'propagation_policy', 'body' @@ -1821,7 +2573,10 @@ def delete_csi_node_with_http_info(self, name, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1829,14 +2584,13 @@ def delete_csi_node_with_http_info(self, name, **kwargs): # noqa: E501 if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method delete_csi_node" % key + " to method delete_csi_driver" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `delete_csi_node`") # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `delete_csi_driver`") # noqa: E501 collection_formats = {} @@ -1845,18 +2599,20 @@ def delete_csi_node_with_http_info(self, name, **kwargs): # noqa: E501 path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1866,99 +2622,136 @@ def delete_csi_node_with_http_info(self, name, **kwargs): # noqa: E501 body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1CSIDriver", + 202: "V1CSIDriver", + 401: None, + } + return self.api_client.call_api( - '/apis/storage.k8s.io/v1/csinodes/{name}', 'DELETE', + '/apis/storage.k8s.io/v1/csidrivers/{name}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1CSINode', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) - def delete_namespaced_csi_storage_capacity(self, name, namespace, **kwargs): # noqa: E501 - """delete_namespaced_csi_storage_capacity # noqa: E501 + def delete_csi_node(self, name, **kwargs): # noqa: E501 + """delete_csi_node # noqa: E501 - delete a CSIStorageCapacity # noqa: E501 + delete a CSINode # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_namespaced_csi_storage_capacity(name, namespace, async_req=True) + + >>> thread = api.delete_csi_node(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the CSIStorageCapacity (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the CSINode (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1Status + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1CSINode """ kwargs['_return_http_data_only'] = True - return self.delete_namespaced_csi_storage_capacity_with_http_info(name, namespace, **kwargs) # noqa: E501 + return self.delete_csi_node_with_http_info(name, **kwargs) # noqa: E501 - def delete_namespaced_csi_storage_capacity_with_http_info(self, name, namespace, **kwargs): # noqa: E501 - """delete_namespaced_csi_storage_capacity # noqa: E501 + def delete_csi_node_with_http_info(self, name, **kwargs): # noqa: E501 + """delete_csi_node # noqa: E501 - delete a CSIStorageCapacity # noqa: E501 + delete a CSINode # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_namespaced_csi_storage_capacity_with_http_info(name, namespace, async_req=True) + + >>> thread = api.delete_csi_node_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the CSIStorageCapacity (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the CSINode (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1CSINode, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'name', - 'namespace', 'pretty', 'dry_run', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'orphan_dependents', 'propagation_policy', 'body' @@ -1968,7 +2761,10 @@ def delete_namespaced_csi_storage_capacity_with_http_info(self, name, namespace, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1976,40 +2772,35 @@ def delete_namespaced_csi_storage_capacity_with_http_info(self, name, namespace, if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method delete_namespaced_csi_storage_capacity" % key + " to method delete_csi_node" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_csi_storage_capacity`") # noqa: E501 - # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_csi_storage_capacity`") # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `delete_csi_node`") # noqa: E501 collection_formats = {} path_params = {} if 'name' in local_var_params: path_params['name'] = local_var_params['name'] # noqa: E501 - if 'namespace' in local_var_params: - path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2019,96 +2810,141 @@ def delete_namespaced_csi_storage_capacity_with_http_info(self, name, namespace, body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1CSINode", + 202: "V1CSINode", + 401: None, + } + return self.api_client.call_api( - '/apis/storage.k8s.io/v1/namespaces/{namespace}/csistoragecapacities/{name}', 'DELETE', + '/apis/storage.k8s.io/v1/csinodes/{name}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1Status', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) - def delete_storage_class(self, name, **kwargs): # noqa: E501 - """delete_storage_class # noqa: E501 + def delete_namespaced_csi_storage_capacity(self, name, namespace, **kwargs): # noqa: E501 + """delete_namespaced_csi_storage_capacity # noqa: E501 - delete a StorageClass # noqa: E501 + delete a CSIStorageCapacity # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_storage_class(name, async_req=True) + + >>> thread = api.delete_namespaced_csi_storage_capacity(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the StorageClass (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the CSIStorageCapacity (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1StorageClass + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1Status """ kwargs['_return_http_data_only'] = True - return self.delete_storage_class_with_http_info(name, **kwargs) # noqa: E501 + return self.delete_namespaced_csi_storage_capacity_with_http_info(name, namespace, **kwargs) # noqa: E501 - def delete_storage_class_with_http_info(self, name, **kwargs): # noqa: E501 - """delete_storage_class # noqa: E501 + def delete_namespaced_csi_storage_capacity_with_http_info(self, name, namespace, **kwargs): # noqa: E501 + """delete_namespaced_csi_storage_capacity # noqa: E501 - delete a StorageClass # noqa: E501 + delete a CSIStorageCapacity # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_storage_class_with_http_info(name, async_req=True) + + >>> thread = api.delete_namespaced_csi_storage_capacity_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the StorageClass (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the CSIStorageCapacity (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1StorageClass, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'name', + 'namespace', 'pretty', 'dry_run', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'orphan_dependents', 'propagation_policy', 'body' @@ -2118,7 +2954,10 @@ def delete_storage_class_with_http_info(self, name, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2126,34 +2965,40 @@ def delete_storage_class_with_http_info(self, name, **kwargs): # noqa: E501 if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method delete_storage_class" % key + " to method delete_namespaced_csi_storage_capacity" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `delete_storage_class`") # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `delete_namespaced_csi_storage_capacity`") # noqa: E501 + # verify the required parameter 'namespace' is set + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `namespace` when calling `delete_namespaced_csi_storage_capacity`") # noqa: E501 collection_formats = {} path_params = {} if 'name' in local_var_params: path_params['name'] = local_var_params['name'] # noqa: E501 + if 'namespace' in local_var_params: + path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2163,26 +3008,221 @@ def delete_storage_class_with_http_info(self, name, **kwargs): # noqa: E501 body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1Status", + 202: "V1Status", + 401: None, + } + return self.api_client.call_api( - '/apis/storage.k8s.io/v1/storageclasses/{name}', 'DELETE', + '/apis/storage.k8s.io/v1/namespaces/{namespace}/csistoragecapacities/{name}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1StorageClass', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_storage_class(self, name, **kwargs): # noqa: E501 + """delete_storage_class # noqa: E501 + + delete a StorageClass # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_storage_class(name, async_req=True) + >>> result = thread.get() + + :param name: name of the StorageClass (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1StorageClass + """ + kwargs['_return_http_data_only'] = True + return self.delete_storage_class_with_http_info(name, **kwargs) # noqa: E501 + + def delete_storage_class_with_http_info(self, name, **kwargs): # noqa: E501 + """delete_storage_class # noqa: E501 + + delete a StorageClass # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_storage_class_with_http_info(name, async_req=True) + >>> result = thread.get() + + :param name: name of the StorageClass (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1StorageClass, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'pretty', + 'dry_run', + 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', + 'orphan_dependents', + 'propagation_policy', + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_storage_class" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `delete_storage_class`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 + query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 + query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 + query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1StorageClass", + 202: "V1StorageClass", + 401: None, + } + + return self.api_client.call_api( + '/apis/storage.k8s.io/v1/storageclasses/{name}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def delete_volume_attachment(self, name, **kwargs): # noqa: E501 """delete_volume_attachment # noqa: E501 @@ -2190,27 +3230,40 @@ def delete_volume_attachment(self, name, **kwargs): # noqa: E501 delete a VolumeAttachment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_volume_attachment(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the VolumeAttachment (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the VolumeAttachment (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1VolumeAttachment + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1VolumeAttachment """ kwargs['_return_http_data_only'] = True return self.delete_volume_attachment_with_http_info(name, **kwargs) # noqa: E501 @@ -2221,29 +3274,48 @@ def delete_volume_attachment_with_http_info(self, name, **kwargs): # noqa: E501 delete a VolumeAttachment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_volume_attachment_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the VolumeAttachment (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: + :param name: name of the VolumeAttachment (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1VolumeAttachment, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1VolumeAttachment, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -2253,6 +3325,7 @@ def delete_volume_attachment_with_http_info(self, name, **kwargs): # noqa: E501 'pretty', 'dry_run', 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', 'orphan_dependents', 'propagation_policy', 'body' @@ -2262,7 +3335,10 @@ def delete_volume_attachment_with_http_info(self, name, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2275,8 +3351,7 @@ def delete_volume_attachment_with_http_info(self, name, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `delete_volume_attachment`") # noqa: E501 collection_formats = {} @@ -2286,18 +3361,20 @@ def delete_volume_attachment_with_http_info(self, name, **kwargs): # noqa: E501 path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2307,11 +3384,17 @@ def delete_volume_attachment_with_http_info(self, name, **kwargs): # noqa: E501 body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1VolumeAttachment", + 202: "V1VolumeAttachment", + 401: None, + } + return self.api_client.call_api( '/apis/storage.k8s.io/v1/volumeattachments/{name}', 'DELETE', path_params, @@ -2320,13 +3403,202 @@ def delete_volume_attachment_with_http_info(self, name, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1VolumeAttachment', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_volume_attributes_class(self, name, **kwargs): # noqa: E501 + """delete_volume_attributes_class # noqa: E501 + + delete a VolumeAttributesClass # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_volume_attributes_class(name, async_req=True) + >>> result = thread.get() + + :param name: name of the VolumeAttributesClass (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1VolumeAttributesClass + """ + kwargs['_return_http_data_only'] = True + return self.delete_volume_attributes_class_with_http_info(name, **kwargs) # noqa: E501 + + def delete_volume_attributes_class_with_http_info(self, name, **kwargs): # noqa: E501 + """delete_volume_attributes_class # noqa: E501 + + delete a VolumeAttributesClass # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_volume_attributes_class_with_http_info(name, async_req=True) + >>> result = thread.get() + + :param name: name of the VolumeAttributesClass (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1VolumeAttributesClass, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'pretty', + 'dry_run', + 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', + 'orphan_dependents', + 'propagation_policy', + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_volume_attributes_class" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `delete_volume_attributes_class`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 + query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 + query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 + query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1VolumeAttributesClass", + 202: "V1VolumeAttributesClass", + 401: None, + } + + return self.api_client.call_api( + '/apis/storage.k8s.io/v1/volumeattributesclasses/{name}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def get_api_resources(self, **kwargs): # noqa: E501 """get_api_resources # noqa: E501 @@ -2334,20 +3606,24 @@ def get_api_resources(self, **kwargs): # noqa: E501 get available resources # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_resources(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1APIResourceList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1APIResourceList """ kwargs['_return_http_data_only'] = True return self.get_api_resources_with_http_info(**kwargs) # noqa: E501 @@ -2358,22 +3634,32 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 get available resources # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_resources_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -2385,7 +3671,10 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2404,7 +3693,7 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2412,11 +3701,16 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1APIResourceList", + 401: None, + } + return self.api_client.call_api( '/apis/storage.k8s.io/v1/', 'GET', path_params, @@ -2425,13 +3719,14 @@ def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1APIResourceList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_csi_driver(self, **kwargs): # noqa: E501 """list_csi_driver # noqa: E501 @@ -2439,31 +3734,46 @@ def list_csi_driver(self, **kwargs): # noqa: E501 list or watch objects of kind CSIDriver # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_csi_driver(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1CSIDriverList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1CSIDriverList """ kwargs['_return_http_data_only'] = True return self.list_csi_driver_with_http_info(**kwargs) # noqa: E501 @@ -2474,33 +3784,54 @@ def list_csi_driver_with_http_info(self, **kwargs): # noqa: E501 list or watch objects of kind CSIDriver # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_csi_driver_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1CSIDriverList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1CSIDriverList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -2523,7 +3854,10 @@ def list_csi_driver_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2541,30 +3875,30 @@ def list_csi_driver_with_http_info(self, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2572,11 +3906,16 @@ def list_csi_driver_with_http_info(self, **kwargs): # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1CSIDriverList", + 401: None, + } + return self.api_client.call_api( '/apis/storage.k8s.io/v1/csidrivers', 'GET', path_params, @@ -2585,13 +3924,14 @@ def list_csi_driver_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1CSIDriverList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_csi_node(self, **kwargs): # noqa: E501 """list_csi_node # noqa: E501 @@ -2599,31 +3939,46 @@ def list_csi_node(self, **kwargs): # noqa: E501 list or watch objects of kind CSINode # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_csi_node(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1CSINodeList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1CSINodeList """ kwargs['_return_http_data_only'] = True return self.list_csi_node_with_http_info(**kwargs) # noqa: E501 @@ -2634,33 +3989,54 @@ def list_csi_node_with_http_info(self, **kwargs): # noqa: E501 list or watch objects of kind CSINode # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_csi_node_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1CSINodeList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1CSINodeList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -2683,7 +4059,10 @@ def list_csi_node_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2701,30 +4080,30 @@ def list_csi_node_with_http_info(self, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2732,11 +4111,16 @@ def list_csi_node_with_http_info(self, **kwargs): # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1CSINodeList", + 401: None, + } + return self.api_client.call_api( '/apis/storage.k8s.io/v1/csinodes', 'GET', path_params, @@ -2745,13 +4129,14 @@ def list_csi_node_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1CSINodeList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_csi_storage_capacity_for_all_namespaces(self, **kwargs): # noqa: E501 """list_csi_storage_capacity_for_all_namespaces # noqa: E501 @@ -2759,31 +4144,46 @@ def list_csi_storage_capacity_for_all_namespaces(self, **kwargs): # noqa: E501 list or watch objects of kind CSIStorageCapacity # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_csi_storage_capacity_for_all_namespaces(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1CSIStorageCapacityList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1CSIStorageCapacityList """ kwargs['_return_http_data_only'] = True return self.list_csi_storage_capacity_for_all_namespaces_with_http_info(**kwargs) # noqa: E501 @@ -2794,33 +4194,54 @@ def list_csi_storage_capacity_for_all_namespaces_with_http_info(self, **kwargs): list or watch objects of kind CSIStorageCapacity # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_csi_storage_capacity_for_all_namespaces_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1CSIStorageCapacityList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1CSIStorageCapacityList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -2843,7 +4264,10 @@ def list_csi_storage_capacity_for_all_namespaces_with_http_info(self, **kwargs): 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2861,30 +4285,30 @@ def list_csi_storage_capacity_for_all_namespaces_with_http_info(self, **kwargs): path_params = {} query_params = [] - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2892,11 +4316,16 @@ def list_csi_storage_capacity_for_all_namespaces_with_http_info(self, **kwargs): body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1CSIStorageCapacityList", + 401: None, + } + return self.api_client.call_api( '/apis/storage.k8s.io/v1/csistoragecapacities', 'GET', path_params, @@ -2905,13 +4334,14 @@ def list_csi_storage_capacity_for_all_namespaces_with_http_info(self, **kwargs): body=body_params, post_params=form_params, files=local_var_files, - response_type='V1CSIStorageCapacityList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_namespaced_csi_storage_capacity(self, namespace, **kwargs): # noqa: E501 """list_namespaced_csi_storage_capacity # noqa: E501 @@ -2919,32 +4349,48 @@ def list_namespaced_csi_storage_capacity(self, namespace, **kwargs): # noqa: E5 list or watch objects of kind CSIStorageCapacity # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_namespaced_csi_storage_capacity(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1CSIStorageCapacityList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1CSIStorageCapacityList """ kwargs['_return_http_data_only'] = True return self.list_namespaced_csi_storage_capacity_with_http_info(namespace, **kwargs) # noqa: E501 @@ -2955,34 +4401,56 @@ def list_namespaced_csi_storage_capacity_with_http_info(self, namespace, **kwarg list or watch objects of kind CSIStorageCapacity # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_namespaced_csi_storage_capacity_with_http_info(namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1CSIStorageCapacityList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1CSIStorageCapacityList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -3006,7 +4474,10 @@ def list_namespaced_csi_storage_capacity_with_http_info(self, namespace, **kwarg 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -3019,8 +4490,7 @@ def list_namespaced_csi_storage_capacity_with_http_info(self, namespace, **kwarg local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `list_namespaced_csi_storage_capacity`") # noqa: E501 collection_formats = {} @@ -3030,30 +4500,30 @@ def list_namespaced_csi_storage_capacity_with_http_info(self, namespace, **kwarg path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -3061,11 +4531,16 @@ def list_namespaced_csi_storage_capacity_with_http_info(self, namespace, **kwarg body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1CSIStorageCapacityList", + 401: None, + } + return self.api_client.call_api( '/apis/storage.k8s.io/v1/namespaces/{namespace}/csistoragecapacities', 'GET', path_params, @@ -3074,13 +4549,14 @@ def list_namespaced_csi_storage_capacity_with_http_info(self, namespace, **kwarg body=body_params, post_params=form_params, files=local_var_files, - response_type='V1CSIStorageCapacityList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_storage_class(self, **kwargs): # noqa: E501 """list_storage_class # noqa: E501 @@ -3088,31 +4564,46 @@ def list_storage_class(self, **kwargs): # noqa: E501 list or watch objects of kind StorageClass # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_storage_class(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1StorageClassList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1StorageClassList """ kwargs['_return_http_data_only'] = True return self.list_storage_class_with_http_info(**kwargs) # noqa: E501 @@ -3123,33 +4614,54 @@ def list_storage_class_with_http_info(self, **kwargs): # noqa: E501 list or watch objects of kind StorageClass # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_storage_class_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1StorageClassList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1StorageClassList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -3172,7 +4684,10 @@ def list_storage_class_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -3190,30 +4705,30 @@ def list_storage_class_with_http_info(self, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -3221,11 +4736,16 @@ def list_storage_class_with_http_info(self, **kwargs): # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1StorageClassList", + 401: None, + } + return self.api_client.call_api( '/apis/storage.k8s.io/v1/storageclasses', 'GET', path_params, @@ -3234,13 +4754,14 @@ def list_storage_class_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1StorageClassList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def list_volume_attachment(self, **kwargs): # noqa: E501 """list_volume_attachment # noqa: E501 @@ -3248,31 +4769,46 @@ def list_volume_attachment(self, **kwargs): # noqa: E501 list or watch objects of kind VolumeAttachment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_volume_attachment(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1VolumeAttachmentList + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1VolumeAttachmentList """ kwargs['_return_http_data_only'] = True return self.list_volume_attachment_with_http_info(**kwargs) # noqa: E501 @@ -3283,33 +4819,54 @@ def list_volume_attachment_with_http_info(self, **kwargs): # noqa: E501 list or watch objects of kind VolumeAttachment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_volume_attachment_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1VolumeAttachmentList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1VolumeAttachmentList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -3332,7 +4889,10 @@ def list_volume_attachment_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -3350,30 +4910,30 @@ def list_volume_attachment_with_http_info(self, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -3381,11 +4941,16 @@ def list_volume_attachment_with_http_info(self, **kwargs): # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1VolumeAttachmentList", + 401: None, + } + return self.api_client.call_api( '/apis/storage.k8s.io/v1/volumeattachments', 'GET', path_params, @@ -3394,13 +4959,219 @@ def list_volume_attachment_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1VolumeAttachmentList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def list_volume_attributes_class(self, **kwargs): # noqa: E501 + """list_volume_attributes_class # noqa: E501 + + list or watch objects of kind VolumeAttributesClass # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_volume_attributes_class(async_req=True) + >>> result = thread.get() + + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1VolumeAttributesClassList + """ + kwargs['_return_http_data_only'] = True + return self.list_volume_attributes_class_with_http_info(**kwargs) # noqa: E501 + + def list_volume_attributes_class_with_http_info(self, **kwargs): # noqa: E501 + """list_volume_attributes_class # noqa: E501 + + list or watch objects of kind VolumeAttributesClass # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_volume_attributes_class_with_http_info(async_req=True) + >>> result = thread.get() + + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1VolumeAttributesClassList, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'pretty', + 'allow_watch_bookmarks', + '_continue', + 'field_selector', + 'label_selector', + 'limit', + 'resource_version', + 'resource_version_match', + 'send_initial_events', + 'timeout_seconds', + 'watch' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_volume_attributes_class" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 + query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 + query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 + query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 + query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 + query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 + query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 + query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 + query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 + query_params.append(('watch', local_var_params['watch'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1VolumeAttributesClassList", + 401: None, + } + + return self.api_client.call_api( + '/apis/storage.k8s.io/v1/volumeattributesclasses', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_csi_driver(self, name, body, **kwargs): # noqa: E501 """patch_csi_driver # noqa: E501 @@ -3408,27 +5179,38 @@ def patch_csi_driver(self, name, body, **kwargs): # noqa: E501 partially update the specified CSIDriver # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_csi_driver(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the CSIDriver (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the CSIDriver (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1CSIDriver + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1CSIDriver """ kwargs['_return_http_data_only'] = True return self.patch_csi_driver_with_http_info(name, body, **kwargs) # noqa: E501 @@ -3439,29 +5221,46 @@ def patch_csi_driver_with_http_info(self, name, body, **kwargs): # noqa: E501 partially update the specified CSIDriver # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_csi_driver_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the CSIDriver (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the CSIDriver (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1CSIDriver, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1CSIDriver, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -3480,7 +5279,10 @@ def patch_csi_driver_with_http_info(self, name, body, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -3493,12 +5295,10 @@ def patch_csi_driver_with_http_info(self, name, body, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_csi_driver`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_csi_driver`") # noqa: E501 collection_formats = {} @@ -3508,18 +5308,18 @@ def patch_csi_driver_with_http_info(self, name, body, **kwargs): # noqa: E501 path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -3529,15 +5329,25 @@ def patch_csi_driver_with_http_info(self, name, body, **kwargs): # noqa: E501 body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1CSIDriver", + 201: "V1CSIDriver", + 401: None, + } + return self.api_client.call_api( '/apis/storage.k8s.io/v1/csidrivers/{name}', 'PATCH', path_params, @@ -3546,13 +5356,14 @@ def patch_csi_driver_with_http_info(self, name, body, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1CSIDriver', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_csi_node(self, name, body, **kwargs): # noqa: E501 """patch_csi_node # noqa: E501 @@ -3560,27 +5371,38 @@ def patch_csi_node(self, name, body, **kwargs): # noqa: E501 partially update the specified CSINode # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_csi_node(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the CSINode (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the CSINode (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1CSINode + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1CSINode """ kwargs['_return_http_data_only'] = True return self.patch_csi_node_with_http_info(name, body, **kwargs) # noqa: E501 @@ -3591,29 +5413,46 @@ def patch_csi_node_with_http_info(self, name, body, **kwargs): # noqa: E501 partially update the specified CSINode # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_csi_node_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the CSINode (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the CSINode (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1CSINode, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1CSINode, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -3632,7 +5471,10 @@ def patch_csi_node_with_http_info(self, name, body, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -3645,12 +5487,10 @@ def patch_csi_node_with_http_info(self, name, body, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_csi_node`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_csi_node`") # noqa: E501 collection_formats = {} @@ -3660,18 +5500,18 @@ def patch_csi_node_with_http_info(self, name, body, **kwargs): # noqa: E501 path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -3681,15 +5521,25 @@ def patch_csi_node_with_http_info(self, name, body, **kwargs): # noqa: E501 body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1CSINode", + 201: "V1CSINode", + 401: None, + } + return self.api_client.call_api( '/apis/storage.k8s.io/v1/csinodes/{name}', 'PATCH', path_params, @@ -3698,13 +5548,14 @@ def patch_csi_node_with_http_info(self, name, body, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1CSINode', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_namespaced_csi_storage_capacity(self, name, namespace, body, **kwargs): # noqa: E501 """patch_namespaced_csi_storage_capacity # noqa: E501 @@ -3712,28 +5563,40 @@ def patch_namespaced_csi_storage_capacity(self, name, namespace, body, **kwargs) partially update the specified CSIStorageCapacity # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_csi_storage_capacity(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the CSIStorageCapacity (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the CSIStorageCapacity (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1CSIStorageCapacity + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1CSIStorageCapacity """ kwargs['_return_http_data_only'] = True return self.patch_namespaced_csi_storage_capacity_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -3744,30 +5607,48 @@ def patch_namespaced_csi_storage_capacity_with_http_info(self, name, namespace, partially update the specified CSIStorageCapacity # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_namespaced_csi_storage_capacity_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the CSIStorageCapacity (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the CSIStorageCapacity (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1CSIStorageCapacity, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1CSIStorageCapacity, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -3787,7 +5668,10 @@ def patch_namespaced_csi_storage_capacity_with_http_info(self, name, namespace, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -3800,16 +5684,13 @@ def patch_namespaced_csi_storage_capacity_with_http_info(self, name, namespace, local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_namespaced_csi_storage_capacity`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `patch_namespaced_csi_storage_capacity`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_csi_storage_capacity`") # noqa: E501 collection_formats = {} @@ -3821,18 +5702,18 @@ def patch_namespaced_csi_storage_capacity_with_http_info(self, name, namespace, path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -3842,15 +5723,25 @@ def patch_namespaced_csi_storage_capacity_with_http_info(self, name, namespace, body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1CSIStorageCapacity", + 201: "V1CSIStorageCapacity", + 401: None, + } + return self.api_client.call_api( '/apis/storage.k8s.io/v1/namespaces/{namespace}/csistoragecapacities/{name}', 'PATCH', path_params, @@ -3859,13 +5750,14 @@ def patch_namespaced_csi_storage_capacity_with_http_info(self, name, namespace, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1CSIStorageCapacity', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_storage_class(self, name, body, **kwargs): # noqa: E501 """patch_storage_class # noqa: E501 @@ -3873,27 +5765,38 @@ def patch_storage_class(self, name, body, **kwargs): # noqa: E501 partially update the specified StorageClass # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_storage_class(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the StorageClass (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the StorageClass (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1StorageClass + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1StorageClass """ kwargs['_return_http_data_only'] = True return self.patch_storage_class_with_http_info(name, body, **kwargs) # noqa: E501 @@ -3904,29 +5807,46 @@ def patch_storage_class_with_http_info(self, name, body, **kwargs): # noqa: E50 partially update the specified StorageClass # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_storage_class_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the StorageClass (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the StorageClass (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1StorageClass, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1StorageClass, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -3945,7 +5865,10 @@ def patch_storage_class_with_http_info(self, name, body, **kwargs): # noqa: E50 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -3958,12 +5881,10 @@ def patch_storage_class_with_http_info(self, name, body, **kwargs): # noqa: E50 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_storage_class`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `patch_storage_class`") # noqa: E501 collection_formats = {} @@ -3973,18 +5894,18 @@ def patch_storage_class_with_http_info(self, name, body, **kwargs): # noqa: E50 path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -3994,15 +5915,25 @@ def patch_storage_class_with_http_info(self, name, body, **kwargs): # noqa: E50 body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1StorageClass", + 201: "V1StorageClass", + 401: None, + } + return self.api_client.call_api( '/apis/storage.k8s.io/v1/storageclasses/{name}', 'PATCH', path_params, @@ -4011,13 +5942,14 @@ def patch_storage_class_with_http_info(self, name, body, **kwargs): # noqa: E50 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1StorageClass', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def patch_volume_attachment(self, name, body, **kwargs): # noqa: E501 """patch_volume_attachment # noqa: E501 @@ -4025,27 +5957,38 @@ def patch_volume_attachment(self, name, body, **kwargs): # noqa: E501 partially update the specified VolumeAttachment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_volume_attachment(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the VolumeAttachment (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the VolumeAttachment (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1VolumeAttachment + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1VolumeAttachment """ kwargs['_return_http_data_only'] = True return self.patch_volume_attachment_with_http_info(name, body, **kwargs) # noqa: E501 @@ -4056,29 +5999,46 @@ def patch_volume_attachment_with_http_info(self, name, body, **kwargs): # noqa: partially update the specified VolumeAttachment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_volume_attachment_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the VolumeAttachment (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the VolumeAttachment (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1VolumeAttachment, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1VolumeAttachment, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -4097,7 +6057,10 @@ def patch_volume_attachment_with_http_info(self, name, body, **kwargs): # noqa: 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -4110,13 +6073,203 @@ def patch_volume_attachment_with_http_info(self, name, body, **kwargs): # noqa: local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `patch_volume_attachment`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `patch_volume_attachment`") # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `patch_volume_attachment`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 + query_params.append(('force', local_var_params['force'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # HTTP header `Content-Type` + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1VolumeAttachment", + 201: "V1VolumeAttachment", + 401: None, + } + + return self.api_client.call_api( + '/apis/storage.k8s.io/v1/volumeattachments/{name}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def patch_volume_attachment_status(self, name, body, **kwargs): # noqa: E501 + """patch_volume_attachment_status # noqa: E501 + + partially update status of the specified VolumeAttachment # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_volume_attachment_status(name, body, async_req=True) + >>> result = thread.get() + + :param name: name of the VolumeAttachment (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1VolumeAttachment + """ + kwargs['_return_http_data_only'] = True + return self.patch_volume_attachment_status_with_http_info(name, body, **kwargs) # noqa: E501 + + def patch_volume_attachment_status_with_http_info(self, name, body, **kwargs): # noqa: E501 + """patch_volume_attachment_status # noqa: E501 + + partially update status of the specified VolumeAttachment # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_volume_attachment_status_with_http_info(name, body, async_req=True) + >>> result = thread.get() + + :param name: name of the VolumeAttachment (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1VolumeAttachment, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation', + 'force' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method patch_volume_attachment_status" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `patch_volume_attachment_status`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `patch_volume_attachment_status`") # noqa: E501 collection_formats = {} @@ -4125,18 +6278,18 @@ def patch_volume_attachment_with_http_info(self, name, body, **kwargs): # noqa: path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -4146,91 +6299,130 @@ def patch_volume_attachment_with_http_info(self, name, body, **kwargs): # noqa: body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1VolumeAttachment", + 201: "V1VolumeAttachment", + 401: None, + } + return self.api_client.call_api( - '/apis/storage.k8s.io/v1/volumeattachments/{name}', 'PATCH', + '/apis/storage.k8s.io/v1/volumeattachments/{name}/status', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1VolumeAttachment', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) - def patch_volume_attachment_status(self, name, body, **kwargs): # noqa: E501 - """patch_volume_attachment_status # noqa: E501 + def patch_volume_attributes_class(self, name, body, **kwargs): # noqa: E501 + """patch_volume_attributes_class # noqa: E501 - partially update status of the specified VolumeAttachment # noqa: E501 + partially update the specified VolumeAttributesClass # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_volume_attachment_status(name, body, async_req=True) + + >>> thread = api.patch_volume_attributes_class(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the VolumeAttachment (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the VolumeAttributesClass (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1VolumeAttachment + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1VolumeAttributesClass """ kwargs['_return_http_data_only'] = True - return self.patch_volume_attachment_status_with_http_info(name, body, **kwargs) # noqa: E501 + return self.patch_volume_attributes_class_with_http_info(name, body, **kwargs) # noqa: E501 - def patch_volume_attachment_status_with_http_info(self, name, body, **kwargs): # noqa: E501 - """patch_volume_attachment_status # noqa: E501 + def patch_volume_attributes_class_with_http_info(self, name, body, **kwargs): # noqa: E501 + """patch_volume_attributes_class # noqa: E501 - partially update status of the specified VolumeAttachment # noqa: E501 + partially update the specified VolumeAttributesClass # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_volume_attachment_status_with_http_info(name, body, async_req=True) + + >>> thread = api.patch_volume_attributes_class_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the VolumeAttachment (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :param name: name of the VolumeAttributesClass (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1VolumeAttachment, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1VolumeAttributesClass, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -4249,7 +6441,10 @@ def patch_volume_attachment_status_with_http_info(self, name, body, **kwargs): 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -4257,18 +6452,16 @@ def patch_volume_attachment_status_with_http_info(self, name, body, **kwargs): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method patch_volume_attachment_status" % key + " to method patch_volume_attributes_class" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `patch_volume_attachment_status`") # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `patch_volume_attributes_class`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `patch_volume_attachment_status`") # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `patch_volume_attributes_class`") # noqa: E501 collection_formats = {} @@ -4277,18 +6470,18 @@ def patch_volume_attachment_status_with_http_info(self, name, body, **kwargs): path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 query_params.append(('force', local_var_params['force'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -4298,30 +6491,41 @@ def patch_volume_attachment_status_with_http_info(self, name, body, **kwargs): body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1VolumeAttributesClass", + 201: "V1VolumeAttributesClass", + 401: None, + } + return self.api_client.call_api( - '/apis/storage.k8s.io/v1/volumeattachments/{name}/status', 'PATCH', + '/apis/storage.k8s.io/v1/volumeattributesclasses/{name}', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1VolumeAttachment', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_csi_driver(self, name, **kwargs): # noqa: E501 """read_csi_driver # noqa: E501 @@ -4329,22 +6533,28 @@ def read_csi_driver(self, name, **kwargs): # noqa: E501 read the specified CSIDriver # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_csi_driver(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the CSIDriver (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the CSIDriver (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1CSIDriver + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1CSIDriver """ kwargs['_return_http_data_only'] = True return self.read_csi_driver_with_http_info(name, **kwargs) # noqa: E501 @@ -4355,24 +6565,36 @@ def read_csi_driver_with_http_info(self, name, **kwargs): # noqa: E501 read the specified CSIDriver # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_csi_driver_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the CSIDriver (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the CSIDriver (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1CSIDriver, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1CSIDriver, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -4386,7 +6608,10 @@ def read_csi_driver_with_http_info(self, name, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -4399,8 +6624,7 @@ def read_csi_driver_with_http_info(self, name, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_csi_driver`") # noqa: E501 collection_formats = {} @@ -4410,10 +6634,10 @@ def read_csi_driver_with_http_info(self, name, **kwargs): # noqa: E501 path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -4421,11 +6645,16 @@ def read_csi_driver_with_http_info(self, name, **kwargs): # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1CSIDriver", + 401: None, + } + return self.api_client.call_api( '/apis/storage.k8s.io/v1/csidrivers/{name}', 'GET', path_params, @@ -4434,13 +6663,14 @@ def read_csi_driver_with_http_info(self, name, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1CSIDriver', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_csi_node(self, name, **kwargs): # noqa: E501 """read_csi_node # noqa: E501 @@ -4448,22 +6678,28 @@ def read_csi_node(self, name, **kwargs): # noqa: E501 read the specified CSINode # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_csi_node(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the CSINode (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the CSINode (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1CSINode + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1CSINode """ kwargs['_return_http_data_only'] = True return self.read_csi_node_with_http_info(name, **kwargs) # noqa: E501 @@ -4474,24 +6710,36 @@ def read_csi_node_with_http_info(self, name, **kwargs): # noqa: E501 read the specified CSINode # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_csi_node_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the CSINode (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the CSINode (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1CSINode, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1CSINode, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -4505,7 +6753,10 @@ def read_csi_node_with_http_info(self, name, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -4518,8 +6769,7 @@ def read_csi_node_with_http_info(self, name, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_csi_node`") # noqa: E501 collection_formats = {} @@ -4529,10 +6779,10 @@ def read_csi_node_with_http_info(self, name, **kwargs): # noqa: E501 path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -4540,11 +6790,16 @@ def read_csi_node_with_http_info(self, name, **kwargs): # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1CSINode", + 401: None, + } + return self.api_client.call_api( '/apis/storage.k8s.io/v1/csinodes/{name}', 'GET', path_params, @@ -4553,13 +6808,14 @@ def read_csi_node_with_http_info(self, name, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1CSINode', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_namespaced_csi_storage_capacity(self, name, namespace, **kwargs): # noqa: E501 """read_namespaced_csi_storage_capacity # noqa: E501 @@ -4567,23 +6823,30 @@ def read_namespaced_csi_storage_capacity(self, name, namespace, **kwargs): # no read the specified CSIStorageCapacity # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_csi_storage_capacity(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the CSIStorageCapacity (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the CSIStorageCapacity (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1CSIStorageCapacity + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1CSIStorageCapacity """ kwargs['_return_http_data_only'] = True return self.read_namespaced_csi_storage_capacity_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -4594,25 +6857,38 @@ def read_namespaced_csi_storage_capacity_with_http_info(self, name, namespace, * read the specified CSIStorageCapacity # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_namespaced_csi_storage_capacity_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the CSIStorageCapacity (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the CSIStorageCapacity (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1CSIStorageCapacity, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1CSIStorageCapacity, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -4627,7 +6903,10 @@ def read_namespaced_csi_storage_capacity_with_http_info(self, name, namespace, * 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -4640,12 +6919,10 @@ def read_namespaced_csi_storage_capacity_with_http_info(self, name, namespace, * local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_namespaced_csi_storage_capacity`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `read_namespaced_csi_storage_capacity`") # noqa: E501 collection_formats = {} @@ -4657,10 +6934,10 @@ def read_namespaced_csi_storage_capacity_with_http_info(self, name, namespace, * path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -4668,11 +6945,16 @@ def read_namespaced_csi_storage_capacity_with_http_info(self, name, namespace, * body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1CSIStorageCapacity", + 401: None, + } + return self.api_client.call_api( '/apis/storage.k8s.io/v1/namespaces/{namespace}/csistoragecapacities/{name}', 'GET', path_params, @@ -4681,13 +6963,14 @@ def read_namespaced_csi_storage_capacity_with_http_info(self, name, namespace, * body=body_params, post_params=form_params, files=local_var_files, - response_type='V1CSIStorageCapacity', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_storage_class(self, name, **kwargs): # noqa: E501 """read_storage_class # noqa: E501 @@ -4695,22 +6978,28 @@ def read_storage_class(self, name, **kwargs): # noqa: E501 read the specified StorageClass # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_storage_class(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the StorageClass (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the StorageClass (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1StorageClass + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1StorageClass """ kwargs['_return_http_data_only'] = True return self.read_storage_class_with_http_info(name, **kwargs) # noqa: E501 @@ -4721,24 +7010,36 @@ def read_storage_class_with_http_info(self, name, **kwargs): # noqa: E501 read the specified StorageClass # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_storage_class_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the StorageClass (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the StorageClass (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1StorageClass, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1StorageClass, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -4752,7 +7053,10 @@ def read_storage_class_with_http_info(self, name, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -4765,8 +7069,7 @@ def read_storage_class_with_http_info(self, name, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_storage_class`") # noqa: E501 collection_formats = {} @@ -4776,10 +7079,10 @@ def read_storage_class_with_http_info(self, name, **kwargs): # noqa: E501 path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -4787,11 +7090,16 @@ def read_storage_class_with_http_info(self, name, **kwargs): # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1StorageClass", + 401: None, + } + return self.api_client.call_api( '/apis/storage.k8s.io/v1/storageclasses/{name}', 'GET', path_params, @@ -4800,13 +7108,14 @@ def read_storage_class_with_http_info(self, name, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1StorageClass', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_volume_attachment(self, name, **kwargs): # noqa: E501 """read_volume_attachment # noqa: E501 @@ -4814,22 +7123,28 @@ def read_volume_attachment(self, name, **kwargs): # noqa: E501 read the specified VolumeAttachment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_volume_attachment(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the VolumeAttachment (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the VolumeAttachment (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1VolumeAttachment + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1VolumeAttachment """ kwargs['_return_http_data_only'] = True return self.read_volume_attachment_with_http_info(name, **kwargs) # noqa: E501 @@ -4840,24 +7155,36 @@ def read_volume_attachment_with_http_info(self, name, **kwargs): # noqa: E501 read the specified VolumeAttachment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_volume_attachment_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the VolumeAttachment (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the VolumeAttachment (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1VolumeAttachment, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1VolumeAttachment, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -4871,7 +7198,10 @@ def read_volume_attachment_with_http_info(self, name, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -4884,8 +7214,7 @@ def read_volume_attachment_with_http_info(self, name, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_volume_attachment`") # noqa: E501 collection_formats = {} @@ -4895,10 +7224,10 @@ def read_volume_attachment_with_http_info(self, name, **kwargs): # noqa: E501 path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -4906,11 +7235,16 @@ def read_volume_attachment_with_http_info(self, name, **kwargs): # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1VolumeAttachment", + 401: None, + } + return self.api_client.call_api( '/apis/storage.k8s.io/v1/volumeattachments/{name}', 'GET', path_params, @@ -4919,13 +7253,14 @@ def read_volume_attachment_with_http_info(self, name, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1VolumeAttachment', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def read_volume_attachment_status(self, name, **kwargs): # noqa: E501 """read_volume_attachment_status # noqa: E501 @@ -4933,22 +7268,28 @@ def read_volume_attachment_status(self, name, **kwargs): # noqa: E501 read status of the specified VolumeAttachment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_volume_attachment_status(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the VolumeAttachment (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the VolumeAttachment (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1VolumeAttachment + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1VolumeAttachment """ kwargs['_return_http_data_only'] = True return self.read_volume_attachment_status_with_http_info(name, **kwargs) # noqa: E501 @@ -4959,24 +7300,36 @@ def read_volume_attachment_status_with_http_info(self, name, **kwargs): # noqa: read status of the specified VolumeAttachment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.read_volume_attachment_status_with_http_info(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the VolumeAttachment (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :param name: name of the VolumeAttachment (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1VolumeAttachment, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1VolumeAttachment, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -4990,7 +7343,10 @@ def read_volume_attachment_status_with_http_info(self, name, **kwargs): # noqa: 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -5003,8 +7359,7 @@ def read_volume_attachment_status_with_http_info(self, name, **kwargs): # noqa: local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `read_volume_attachment_status`") # noqa: E501 collection_formats = {} @@ -5014,10 +7369,10 @@ def read_volume_attachment_status_with_http_info(self, name, **kwargs): # noqa: path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -5025,11 +7380,16 @@ def read_volume_attachment_status_with_http_info(self, name, **kwargs): # noqa: body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1VolumeAttachment", + 401: None, + } + return self.api_client.call_api( '/apis/storage.k8s.io/v1/volumeattachments/{name}/status', 'GET', path_params, @@ -5038,13 +7398,159 @@ def read_volume_attachment_status_with_http_info(self, name, **kwargs): # noqa: body=body_params, post_params=form_params, files=local_var_files, - response_type='V1VolumeAttachment', # noqa: E501 + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def read_volume_attributes_class(self, name, **kwargs): # noqa: E501 + """read_volume_attributes_class # noqa: E501 + + read the specified VolumeAttributesClass # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.read_volume_attributes_class(name, async_req=True) + >>> result = thread.get() + + :param name: name of the VolumeAttributesClass (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1VolumeAttributesClass + """ + kwargs['_return_http_data_only'] = True + return self.read_volume_attributes_class_with_http_info(name, **kwargs) # noqa: E501 + + def read_volume_attributes_class_with_http_info(self, name, **kwargs): # noqa: E501 + """read_volume_attributes_class # noqa: E501 + + read the specified VolumeAttributesClass # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.read_volume_attributes_class_with_http_info(name, async_req=True) + >>> result = thread.get() + + :param name: name of the VolumeAttributesClass (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1VolumeAttributesClass, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'pretty' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method read_volume_attributes_class" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `read_volume_attributes_class`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1VolumeAttributesClass", + 401: None, + } + + return self.api_client.call_api( + '/apis/storage.k8s.io/v1/volumeattributesclasses/{name}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_csi_driver(self, name, body, **kwargs): # noqa: E501 """replace_csi_driver # noqa: E501 @@ -5052,26 +7558,36 @@ def replace_csi_driver(self, name, body, **kwargs): # noqa: E501 replace the specified CSIDriver # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_csi_driver(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the CSIDriver (required) - :param V1CSIDriver body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the CSIDriver (required) + :type name: str + :param body: (required) + :type body: V1CSIDriver + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1CSIDriver + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1CSIDriver """ kwargs['_return_http_data_only'] = True return self.replace_csi_driver_with_http_info(name, body, **kwargs) # noqa: E501 @@ -5082,28 +7598,44 @@ def replace_csi_driver_with_http_info(self, name, body, **kwargs): # noqa: E501 replace the specified CSIDriver # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_csi_driver_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the CSIDriver (required) - :param V1CSIDriver body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the CSIDriver (required) + :type name: str + :param body: (required) + :type body: V1CSIDriver + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1CSIDriver, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1CSIDriver, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -5121,7 +7653,10 @@ def replace_csi_driver_with_http_info(self, name, body, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -5134,12 +7669,10 @@ def replace_csi_driver_with_http_info(self, name, body, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_csi_driver`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_csi_driver`") # noqa: E501 collection_formats = {} @@ -5149,16 +7682,16 @@ def replace_csi_driver_with_http_info(self, name, body, **kwargs): # noqa: E501 path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -5168,11 +7701,17 @@ def replace_csi_driver_with_http_info(self, name, body, **kwargs): # noqa: E501 body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1CSIDriver", + 201: "V1CSIDriver", + 401: None, + } + return self.api_client.call_api( '/apis/storage.k8s.io/v1/csidrivers/{name}', 'PUT', path_params, @@ -5181,13 +7720,14 @@ def replace_csi_driver_with_http_info(self, name, body, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1CSIDriver', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_csi_node(self, name, body, **kwargs): # noqa: E501 """replace_csi_node # noqa: E501 @@ -5195,26 +7735,36 @@ def replace_csi_node(self, name, body, **kwargs): # noqa: E501 replace the specified CSINode # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_csi_node(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the CSINode (required) - :param V1CSINode body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the CSINode (required) + :type name: str + :param body: (required) + :type body: V1CSINode + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1CSINode + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1CSINode """ kwargs['_return_http_data_only'] = True return self.replace_csi_node_with_http_info(name, body, **kwargs) # noqa: E501 @@ -5225,28 +7775,44 @@ def replace_csi_node_with_http_info(self, name, body, **kwargs): # noqa: E501 replace the specified CSINode # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_csi_node_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the CSINode (required) - :param V1CSINode body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the CSINode (required) + :type name: str + :param body: (required) + :type body: V1CSINode + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1CSINode, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1CSINode, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -5264,7 +7830,10 @@ def replace_csi_node_with_http_info(self, name, body, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -5277,12 +7846,10 @@ def replace_csi_node_with_http_info(self, name, body, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_csi_node`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_csi_node`") # noqa: E501 collection_formats = {} @@ -5292,16 +7859,16 @@ def replace_csi_node_with_http_info(self, name, body, **kwargs): # noqa: E501 path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -5311,11 +7878,17 @@ def replace_csi_node_with_http_info(self, name, body, **kwargs): # noqa: E501 body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1CSINode", + 201: "V1CSINode", + 401: None, + } + return self.api_client.call_api( '/apis/storage.k8s.io/v1/csinodes/{name}', 'PUT', path_params, @@ -5324,13 +7897,14 @@ def replace_csi_node_with_http_info(self, name, body, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1CSINode', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_namespaced_csi_storage_capacity(self, name, namespace, body, **kwargs): # noqa: E501 """replace_namespaced_csi_storage_capacity # noqa: E501 @@ -5338,27 +7912,38 @@ def replace_namespaced_csi_storage_capacity(self, name, namespace, body, **kwarg replace the specified CSIStorageCapacity # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_csi_storage_capacity(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the CSIStorageCapacity (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1CSIStorageCapacity body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the CSIStorageCapacity (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1CSIStorageCapacity + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1CSIStorageCapacity + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1CSIStorageCapacity """ kwargs['_return_http_data_only'] = True return self.replace_namespaced_csi_storage_capacity_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -5369,29 +7954,46 @@ def replace_namespaced_csi_storage_capacity_with_http_info(self, name, namespace replace the specified CSIStorageCapacity # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_namespaced_csi_storage_capacity_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the CSIStorageCapacity (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1CSIStorageCapacity body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the CSIStorageCapacity (required) + :type name: str + :param namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param body: (required) + :type body: V1CSIStorageCapacity + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1CSIStorageCapacity, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1CSIStorageCapacity, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -5410,7 +8012,10 @@ def replace_namespaced_csi_storage_capacity_with_http_info(self, name, namespace 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -5423,16 +8028,13 @@ def replace_namespaced_csi_storage_capacity_with_http_info(self, name, namespace local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_namespaced_csi_storage_capacity`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('namespace') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `namespace` when calling `replace_namespaced_csi_storage_capacity`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_csi_storage_capacity`") # noqa: E501 collection_formats = {} @@ -5444,16 +8046,16 @@ def replace_namespaced_csi_storage_capacity_with_http_info(self, name, namespace path_params['namespace'] = local_var_params['namespace'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -5463,11 +8065,17 @@ def replace_namespaced_csi_storage_capacity_with_http_info(self, name, namespace body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1CSIStorageCapacity", + 201: "V1CSIStorageCapacity", + 401: None, + } + return self.api_client.call_api( '/apis/storage.k8s.io/v1/namespaces/{namespace}/csistoragecapacities/{name}', 'PUT', path_params, @@ -5476,13 +8084,14 @@ def replace_namespaced_csi_storage_capacity_with_http_info(self, name, namespace body=body_params, post_params=form_params, files=local_var_files, - response_type='V1CSIStorageCapacity', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_storage_class(self, name, body, **kwargs): # noqa: E501 """replace_storage_class # noqa: E501 @@ -5490,26 +8099,36 @@ def replace_storage_class(self, name, body, **kwargs): # noqa: E501 replace the specified StorageClass # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_storage_class(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the StorageClass (required) - :param V1StorageClass body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the StorageClass (required) + :type name: str + :param body: (required) + :type body: V1StorageClass + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1StorageClass + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1StorageClass """ kwargs['_return_http_data_only'] = True return self.replace_storage_class_with_http_info(name, body, **kwargs) # noqa: E501 @@ -5520,28 +8139,44 @@ def replace_storage_class_with_http_info(self, name, body, **kwargs): # noqa: E replace the specified StorageClass # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_storage_class_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the StorageClass (required) - :param V1StorageClass body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the StorageClass (required) + :type name: str + :param body: (required) + :type body: V1StorageClass + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1StorageClass, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1StorageClass, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -5559,7 +8194,10 @@ def replace_storage_class_with_http_info(self, name, body, **kwargs): # noqa: E 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -5572,12 +8210,10 @@ def replace_storage_class_with_http_info(self, name, body, **kwargs): # noqa: E local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_storage_class`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_storage_class`") # noqa: E501 collection_formats = {} @@ -5587,16 +8223,16 @@ def replace_storage_class_with_http_info(self, name, body, **kwargs): # noqa: E path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -5606,11 +8242,17 @@ def replace_storage_class_with_http_info(self, name, body, **kwargs): # noqa: E body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1StorageClass", + 201: "V1StorageClass", + 401: None, + } + return self.api_client.call_api( '/apis/storage.k8s.io/v1/storageclasses/{name}', 'PUT', path_params, @@ -5619,13 +8261,14 @@ def replace_storage_class_with_http_info(self, name, body, **kwargs): # noqa: E body=body_params, post_params=form_params, files=local_var_files, - response_type='V1StorageClass', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_volume_attachment(self, name, body, **kwargs): # noqa: E501 """replace_volume_attachment # noqa: E501 @@ -5633,26 +8276,36 @@ def replace_volume_attachment(self, name, body, **kwargs): # noqa: E501 replace the specified VolumeAttachment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_volume_attachment(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the VolumeAttachment (required) - :param V1VolumeAttachment body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the VolumeAttachment (required) + :type name: str + :param body: (required) + :type body: V1VolumeAttachment + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1VolumeAttachment + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1VolumeAttachment """ kwargs['_return_http_data_only'] = True return self.replace_volume_attachment_with_http_info(name, body, **kwargs) # noqa: E501 @@ -5663,28 +8316,44 @@ def replace_volume_attachment_with_http_info(self, name, body, **kwargs): # noq replace the specified VolumeAttachment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_volume_attachment_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the VolumeAttachment (required) - :param V1VolumeAttachment body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the VolumeAttachment (required) + :type name: str + :param body: (required) + :type body: V1VolumeAttachment + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1VolumeAttachment, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1VolumeAttachment, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -5702,7 +8371,10 @@ def replace_volume_attachment_with_http_info(self, name, body, **kwargs): # noq 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -5715,12 +8387,10 @@ def replace_volume_attachment_with_http_info(self, name, body, **kwargs): # noq local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_volume_attachment`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_volume_attachment`") # noqa: E501 collection_formats = {} @@ -5730,16 +8400,16 @@ def replace_volume_attachment_with_http_info(self, name, body, **kwargs): # noq path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -5749,11 +8419,17 @@ def replace_volume_attachment_with_http_info(self, name, body, **kwargs): # noq body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1VolumeAttachment", + 201: "V1VolumeAttachment", + 401: None, + } + return self.api_client.call_api( '/apis/storage.k8s.io/v1/volumeattachments/{name}', 'PUT', path_params, @@ -5762,13 +8438,14 @@ def replace_volume_attachment_with_http_info(self, name, body, **kwargs): # noq body=body_params, post_params=form_params, files=local_var_files, - response_type='V1VolumeAttachment', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) def replace_volume_attachment_status(self, name, body, **kwargs): # noqa: E501 """replace_volume_attachment_status # noqa: E501 @@ -5776,26 +8453,36 @@ def replace_volume_attachment_status(self, name, body, **kwargs): # noqa: E501 replace status of the specified VolumeAttachment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_volume_attachment_status(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the VolumeAttachment (required) - :param V1VolumeAttachment body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the VolumeAttachment (required) + :type name: str + :param body: (required) + :type body: V1VolumeAttachment + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1VolumeAttachment + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1VolumeAttachment """ kwargs['_return_http_data_only'] = True return self.replace_volume_attachment_status_with_http_info(name, body, **kwargs) # noqa: E501 @@ -5806,28 +8493,44 @@ def replace_volume_attachment_status_with_http_info(self, name, body, **kwargs): replace status of the specified VolumeAttachment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.replace_volume_attachment_status_with_http_info(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the VolumeAttachment (required) - :param V1VolumeAttachment body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :param name: name of the VolumeAttachment (required) + :type name: str + :param body: (required) + :type body: V1VolumeAttachment + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1VolumeAttachment, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1VolumeAttachment, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -5845,7 +8548,10 @@ def replace_volume_attachment_status_with_http_info(self, name, body, **kwargs): 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -5858,12 +8564,10 @@ def replace_volume_attachment_status_with_http_info(self, name, body, **kwargs): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `name` when calling `replace_volume_attachment_status`") # noqa: E501 # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 raise ApiValueError("Missing the required parameter `body` when calling `replace_volume_attachment_status`") # noqa: E501 collection_formats = {} @@ -5873,16 +8577,16 @@ def replace_volume_attachment_status_with_http_info(self, name, body, **kwargs): path_params['name'] = local_var_params['name'] # noqa: E501 query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -5892,11 +8596,17 @@ def replace_volume_attachment_status_with_http_info(self, name, body, **kwargs): body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1VolumeAttachment", + 201: "V1VolumeAttachment", + 401: None, + } + return self.api_client.call_api( '/apis/storage.k8s.io/v1/volumeattachments/{name}/status', 'PUT', path_params, @@ -5905,10 +8615,188 @@ def replace_volume_attachment_status_with_http_info(self, name, body, **kwargs): body=body_params, post_params=form_params, files=local_var_files, - response_type='V1VolumeAttachment', # noqa: E501 + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def replace_volume_attributes_class(self, name, body, **kwargs): # noqa: E501 + """replace_volume_attributes_class # noqa: E501 + + replace the specified VolumeAttributesClass # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.replace_volume_attributes_class(name, body, async_req=True) + >>> result = thread.get() + + :param name: name of the VolumeAttributesClass (required) + :type name: str + :param body: (required) + :type body: V1VolumeAttributesClass + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1VolumeAttributesClass + """ + kwargs['_return_http_data_only'] = True + return self.replace_volume_attributes_class_with_http_info(name, body, **kwargs) # noqa: E501 + + def replace_volume_attributes_class_with_http_info(self, name, body, **kwargs): # noqa: E501 + """replace_volume_attributes_class # noqa: E501 + + replace the specified VolumeAttributesClass # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.replace_volume_attributes_class_with_http_info(name, body, async_req=True) + >>> result = thread.get() + + :param name: name of the VolumeAttributesClass (required) + :type name: str + :param body: (required) + :type body: V1VolumeAttributesClass + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1VolumeAttributesClass, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method replace_volume_attributes_class" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `replace_volume_attributes_class`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `replace_volume_attributes_class`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1VolumeAttributesClass", + 201: "V1VolumeAttributesClass", + 401: None, + } + + return self.api_client.call_api( + '/apis/storage.k8s.io/v1/volumeattributesclasses/{name}', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) diff --git a/kubernetes/client/api/storage_v1alpha1_api.py b/kubernetes/client/api/storage_v1alpha1_api.py deleted file mode 100644 index 1be111f7bb..0000000000 --- a/kubernetes/client/api/storage_v1alpha1_api.py +++ /dev/null @@ -1,1169 +0,0 @@ -# coding: utf-8 - -""" - Kubernetes - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - - The version of the OpenAPI document: release-1.30 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from kubernetes.client.api_client import ApiClient -from kubernetes.client.exceptions import ( # noqa: F401 - ApiTypeError, - ApiValueError -) - - -class StorageV1alpha1Api(object): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def create_volume_attributes_class(self, body, **kwargs): # noqa: E501 - """create_volume_attributes_class # noqa: E501 - - create a VolumeAttributesClass # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_volume_attributes_class(body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param V1alpha1VolumeAttributesClass body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha1VolumeAttributesClass - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.create_volume_attributes_class_with_http_info(body, **kwargs) # noqa: E501 - - def create_volume_attributes_class_with_http_info(self, body, **kwargs): # noqa: E501 - """create_volume_attributes_class # noqa: E501 - - create a VolumeAttributesClass # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_volume_attributes_class_with_http_info(body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param V1alpha1VolumeAttributesClass body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha1VolumeAttributesClass, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'body', - 'pretty', - 'dry_run', - 'field_manager', - 'field_validation' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method create_volume_attributes_class" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `create_volume_attributes_class`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 - query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 - query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/storage.k8s.io/v1alpha1/volumeattributesclasses', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha1VolumeAttributesClass', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def delete_collection_volume_attributes_class(self, **kwargs): # noqa: E501 - """delete_collection_volume_attributes_class # noqa: E501 - - delete collection of VolumeAttributesClass # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_collection_volume_attributes_class(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1Status - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.delete_collection_volume_attributes_class_with_http_info(**kwargs) # noqa: E501 - - def delete_collection_volume_attributes_class_with_http_info(self, **kwargs): # noqa: E501 - """delete_collection_volume_attributes_class # noqa: E501 - - delete collection of VolumeAttributesClass # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_collection_volume_attributes_class_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'pretty', - '_continue', - 'dry_run', - 'field_selector', - 'grace_period_seconds', - 'label_selector', - 'limit', - 'orphan_dependents', - 'propagation_policy', - 'resource_version', - 'resource_version_match', - 'send_initial_events', - 'timeout_seconds', - 'body' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method delete_collection_volume_attributes_class" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 - query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 - query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 - query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 - query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 - query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 - query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 - query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 - query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 - query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 - query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/storage.k8s.io/v1alpha1/volumeattributesclasses', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1Status', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def delete_volume_attributes_class(self, name, **kwargs): # noqa: E501 - """delete_volume_attributes_class # noqa: E501 - - delete a VolumeAttributesClass # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_volume_attributes_class(name, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the VolumeAttributesClass (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha1VolumeAttributesClass - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.delete_volume_attributes_class_with_http_info(name, **kwargs) # noqa: E501 - - def delete_volume_attributes_class_with_http_info(self, name, **kwargs): # noqa: E501 - """delete_volume_attributes_class # noqa: E501 - - delete a VolumeAttributesClass # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_volume_attributes_class_with_http_info(name, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the VolumeAttributesClass (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha1VolumeAttributesClass, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'pretty', - 'dry_run', - 'grace_period_seconds', - 'orphan_dependents', - 'propagation_policy', - 'body' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method delete_volume_attributes_class" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `delete_volume_attributes_class`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 - query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 - query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 - query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/storage.k8s.io/v1alpha1/volumeattributesclasses/{name}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha1VolumeAttributesClass', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_api_resources(self, **kwargs): # noqa: E501 - """get_api_resources # noqa: E501 - - get available resources # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_api_resources(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1APIResourceList - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_api_resources_with_http_info(**kwargs) # noqa: E501 - - def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 - """get_api_resources # noqa: E501 - - get available resources # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_api_resources_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_api_resources" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/storage.k8s.io/v1alpha1/', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1APIResourceList', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_volume_attributes_class(self, **kwargs): # noqa: E501 - """list_volume_attributes_class # noqa: E501 - - list or watch objects of kind VolumeAttributesClass # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_volume_attributes_class(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha1VolumeAttributesClassList - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_volume_attributes_class_with_http_info(**kwargs) # noqa: E501 - - def list_volume_attributes_class_with_http_info(self, **kwargs): # noqa: E501 - """list_volume_attributes_class # noqa: E501 - - list or watch objects of kind VolumeAttributesClass # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_volume_attributes_class_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha1VolumeAttributesClassList, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'pretty', - 'allow_watch_bookmarks', - '_continue', - 'field_selector', - 'label_selector', - 'limit', - 'resource_version', - 'resource_version_match', - 'send_initial_events', - 'timeout_seconds', - 'watch' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_volume_attributes_class" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 - query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 - query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 - query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 - query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 - query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 - query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 - query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 - query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 - query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/storage.k8s.io/v1alpha1/volumeattributesclasses', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha1VolumeAttributesClassList', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def patch_volume_attributes_class(self, name, body, **kwargs): # noqa: E501 - """patch_volume_attributes_class # noqa: E501 - - partially update the specified VolumeAttributesClass # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_volume_attributes_class(name, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the VolumeAttributesClass (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha1VolumeAttributesClass - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.patch_volume_attributes_class_with_http_info(name, body, **kwargs) # noqa: E501 - - def patch_volume_attributes_class_with_http_info(self, name, body, **kwargs): # noqa: E501 - """patch_volume_attributes_class # noqa: E501 - - partially update the specified VolumeAttributesClass # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_volume_attributes_class_with_http_info(name, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the VolumeAttributesClass (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha1VolumeAttributesClass, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'body', - 'pretty', - 'dry_run', - 'field_manager', - 'field_validation', - 'force' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method patch_volume_attributes_class" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `patch_volume_attributes_class`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `patch_volume_attributes_class`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 - query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 - query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 - query_params.append(('force', local_var_params['force'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/storage.k8s.io/v1alpha1/volumeattributesclasses/{name}', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha1VolumeAttributesClass', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def read_volume_attributes_class(self, name, **kwargs): # noqa: E501 - """read_volume_attributes_class # noqa: E501 - - read the specified VolumeAttributesClass # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.read_volume_attributes_class(name, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the VolumeAttributesClass (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha1VolumeAttributesClass - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.read_volume_attributes_class_with_http_info(name, **kwargs) # noqa: E501 - - def read_volume_attributes_class_with_http_info(self, name, **kwargs): # noqa: E501 - """read_volume_attributes_class # noqa: E501 - - read the specified VolumeAttributesClass # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.read_volume_attributes_class_with_http_info(name, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the VolumeAttributesClass (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha1VolumeAttributesClass, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'pretty' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method read_volume_attributes_class" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `read_volume_attributes_class`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/storage.k8s.io/v1alpha1/volumeattributesclasses/{name}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha1VolumeAttributesClass', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def replace_volume_attributes_class(self, name, body, **kwargs): # noqa: E501 - """replace_volume_attributes_class # noqa: E501 - - replace the specified VolumeAttributesClass # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.replace_volume_attributes_class(name, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the VolumeAttributesClass (required) - :param V1alpha1VolumeAttributesClass body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha1VolumeAttributesClass - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.replace_volume_attributes_class_with_http_info(name, body, **kwargs) # noqa: E501 - - def replace_volume_attributes_class_with_http_info(self, name, body, **kwargs): # noqa: E501 - """replace_volume_attributes_class # noqa: E501 - - replace the specified VolumeAttributesClass # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.replace_volume_attributes_class_with_http_info(name, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the VolumeAttributesClass (required) - :param V1alpha1VolumeAttributesClass body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha1VolumeAttributesClass, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'body', - 'pretty', - 'dry_run', - 'field_manager', - 'field_validation' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method replace_volume_attributes_class" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `replace_volume_attributes_class`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `replace_volume_attributes_class`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 - query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 - query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/storage.k8s.io/v1alpha1/volumeattributesclasses/{name}', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha1VolumeAttributesClass', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) diff --git a/kubernetes/client/api/storage_v1beta1_api.py b/kubernetes/client/api/storage_v1beta1_api.py new file mode 100644 index 0000000000..cdb8197d4b --- /dev/null +++ b/kubernetes/client/api/storage_v1beta1_api.py @@ -0,0 +1,1473 @@ +# coding: utf-8 + +""" + Kubernetes + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: release-1.35 + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from kubernetes.client.api_client import ApiClient +from kubernetes.client.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class StorageV1beta1Api(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def create_volume_attributes_class(self, body, **kwargs): # noqa: E501 + """create_volume_attributes_class # noqa: E501 + + create a VolumeAttributesClass # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_volume_attributes_class(body, async_req=True) + >>> result = thread.get() + + :param body: (required) + :type body: V1beta1VolumeAttributesClass + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1VolumeAttributesClass + """ + kwargs['_return_http_data_only'] = True + return self.create_volume_attributes_class_with_http_info(body, **kwargs) # noqa: E501 + + def create_volume_attributes_class_with_http_info(self, body, **kwargs): # noqa: E501 + """create_volume_attributes_class # noqa: E501 + + create a VolumeAttributesClass # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_volume_attributes_class_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param body: (required) + :type body: V1beta1VolumeAttributesClass + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1VolumeAttributesClass, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_volume_attributes_class" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `create_volume_attributes_class`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1VolumeAttributesClass", + 201: "V1beta1VolumeAttributesClass", + 202: "V1beta1VolumeAttributesClass", + 401: None, + } + + return self.api_client.call_api( + '/apis/storage.k8s.io/v1beta1/volumeattributesclasses', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_collection_volume_attributes_class(self, **kwargs): # noqa: E501 + """delete_collection_volume_attributes_class # noqa: E501 + + delete collection of VolumeAttributesClass # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_collection_volume_attributes_class(async_req=True) + >>> result = thread.get() + + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1Status + """ + kwargs['_return_http_data_only'] = True + return self.delete_collection_volume_attributes_class_with_http_info(**kwargs) # noqa: E501 + + def delete_collection_volume_attributes_class_with_http_info(self, **kwargs): # noqa: E501 + """delete_collection_volume_attributes_class # noqa: E501 + + delete collection of VolumeAttributesClass # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_collection_volume_attributes_class_with_http_info(async_req=True) + >>> result = thread.get() + + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'pretty', + '_continue', + 'dry_run', + 'field_selector', + 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', + 'label_selector', + 'limit', + 'orphan_dependents', + 'propagation_policy', + 'resource_version', + 'resource_version_match', + 'send_initial_events', + 'timeout_seconds', + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_collection_volume_attributes_class" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 + query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 + query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 + query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 + query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 + query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 + query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 + query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 + query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 + query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 + query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1Status", + 401: None, + } + + return self.api_client.call_api( + '/apis/storage.k8s.io/v1beta1/volumeattributesclasses', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_volume_attributes_class(self, name, **kwargs): # noqa: E501 + """delete_volume_attributes_class # noqa: E501 + + delete a VolumeAttributesClass # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_volume_attributes_class(name, async_req=True) + >>> result = thread.get() + + :param name: name of the VolumeAttributesClass (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1VolumeAttributesClass + """ + kwargs['_return_http_data_only'] = True + return self.delete_volume_attributes_class_with_http_info(name, **kwargs) # noqa: E501 + + def delete_volume_attributes_class_with_http_info(self, name, **kwargs): # noqa: E501 + """delete_volume_attributes_class # noqa: E501 + + delete a VolumeAttributesClass # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_volume_attributes_class_with_http_info(name, async_req=True) + >>> result = thread.get() + + :param name: name of the VolumeAttributesClass (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1VolumeAttributesClass, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'pretty', + 'dry_run', + 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', + 'orphan_dependents', + 'propagation_policy', + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_volume_attributes_class" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `delete_volume_attributes_class`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 + query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 + query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 + query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1VolumeAttributesClass", + 202: "V1beta1VolumeAttributesClass", + 401: None, + } + + return self.api_client.call_api( + '/apis/storage.k8s.io/v1beta1/volumeattributesclasses/{name}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_api_resources(self, **kwargs): # noqa: E501 + """get_api_resources # noqa: E501 + + get available resources # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_api_resources(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1APIResourceList + """ + kwargs['_return_http_data_only'] = True + return self.get_api_resources_with_http_info(**kwargs) # noqa: E501 + + def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 + """get_api_resources # noqa: E501 + + get available resources # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_api_resources_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_api_resources" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1APIResourceList", + 401: None, + } + + return self.api_client.call_api( + '/apis/storage.k8s.io/v1beta1/', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def list_volume_attributes_class(self, **kwargs): # noqa: E501 + """list_volume_attributes_class # noqa: E501 + + list or watch objects of kind VolumeAttributesClass # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_volume_attributes_class(async_req=True) + >>> result = thread.get() + + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1VolumeAttributesClassList + """ + kwargs['_return_http_data_only'] = True + return self.list_volume_attributes_class_with_http_info(**kwargs) # noqa: E501 + + def list_volume_attributes_class_with_http_info(self, **kwargs): # noqa: E501 + """list_volume_attributes_class # noqa: E501 + + list or watch objects of kind VolumeAttributesClass # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_volume_attributes_class_with_http_info(async_req=True) + >>> result = thread.get() + + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1VolumeAttributesClassList, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'pretty', + 'allow_watch_bookmarks', + '_continue', + 'field_selector', + 'label_selector', + 'limit', + 'resource_version', + 'resource_version_match', + 'send_initial_events', + 'timeout_seconds', + 'watch' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_volume_attributes_class" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 + query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 + query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 + query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 + query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 + query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 + query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 + query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 + query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 + query_params.append(('watch', local_var_params['watch'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1VolumeAttributesClassList", + 401: None, + } + + return self.api_client.call_api( + '/apis/storage.k8s.io/v1beta1/volumeattributesclasses', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def patch_volume_attributes_class(self, name, body, **kwargs): # noqa: E501 + """patch_volume_attributes_class # noqa: E501 + + partially update the specified VolumeAttributesClass # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_volume_attributes_class(name, body, async_req=True) + >>> result = thread.get() + + :param name: name of the VolumeAttributesClass (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1VolumeAttributesClass + """ + kwargs['_return_http_data_only'] = True + return self.patch_volume_attributes_class_with_http_info(name, body, **kwargs) # noqa: E501 + + def patch_volume_attributes_class_with_http_info(self, name, body, **kwargs): # noqa: E501 + """patch_volume_attributes_class # noqa: E501 + + partially update the specified VolumeAttributesClass # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_volume_attributes_class_with_http_info(name, body, async_req=True) + >>> result = thread.get() + + :param name: name of the VolumeAttributesClass (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1VolumeAttributesClass, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation', + 'force' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method patch_volume_attributes_class" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `patch_volume_attributes_class`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `patch_volume_attributes_class`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 + query_params.append(('force', local_var_params['force'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # HTTP header `Content-Type` + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1VolumeAttributesClass", + 201: "V1beta1VolumeAttributesClass", + 401: None, + } + + return self.api_client.call_api( + '/apis/storage.k8s.io/v1beta1/volumeattributesclasses/{name}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def read_volume_attributes_class(self, name, **kwargs): # noqa: E501 + """read_volume_attributes_class # noqa: E501 + + read the specified VolumeAttributesClass # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.read_volume_attributes_class(name, async_req=True) + >>> result = thread.get() + + :param name: name of the VolumeAttributesClass (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1VolumeAttributesClass + """ + kwargs['_return_http_data_only'] = True + return self.read_volume_attributes_class_with_http_info(name, **kwargs) # noqa: E501 + + def read_volume_attributes_class_with_http_info(self, name, **kwargs): # noqa: E501 + """read_volume_attributes_class # noqa: E501 + + read the specified VolumeAttributesClass # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.read_volume_attributes_class_with_http_info(name, async_req=True) + >>> result = thread.get() + + :param name: name of the VolumeAttributesClass (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1VolumeAttributesClass, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'pretty' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method read_volume_attributes_class" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `read_volume_attributes_class`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1VolumeAttributesClass", + 401: None, + } + + return self.api_client.call_api( + '/apis/storage.k8s.io/v1beta1/volumeattributesclasses/{name}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def replace_volume_attributes_class(self, name, body, **kwargs): # noqa: E501 + """replace_volume_attributes_class # noqa: E501 + + replace the specified VolumeAttributesClass # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.replace_volume_attributes_class(name, body, async_req=True) + >>> result = thread.get() + + :param name: name of the VolumeAttributesClass (required) + :type name: str + :param body: (required) + :type body: V1beta1VolumeAttributesClass + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1VolumeAttributesClass + """ + kwargs['_return_http_data_only'] = True + return self.replace_volume_attributes_class_with_http_info(name, body, **kwargs) # noqa: E501 + + def replace_volume_attributes_class_with_http_info(self, name, body, **kwargs): # noqa: E501 + """replace_volume_attributes_class # noqa: E501 + + replace the specified VolumeAttributesClass # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.replace_volume_attributes_class_with_http_info(name, body, async_req=True) + >>> result = thread.get() + + :param name: name of the VolumeAttributesClass (required) + :type name: str + :param body: (required) + :type body: V1beta1VolumeAttributesClass + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1VolumeAttributesClass, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method replace_volume_attributes_class" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `replace_volume_attributes_class`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `replace_volume_attributes_class`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1VolumeAttributesClass", + 201: "V1beta1VolumeAttributesClass", + 401: None, + } + + return self.api_client.call_api( + '/apis/storage.k8s.io/v1beta1/volumeattributesclasses/{name}', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) diff --git a/kubernetes/client/api/storagemigration_api.py b/kubernetes/client/api/storagemigration_api.py index b1d4653e3f..26f147553e 100644 --- a/kubernetes/client/api/storagemigration_api.py +++ b/kubernetes/client/api/storagemigration_api.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ @@ -42,20 +42,24 @@ def get_api_group(self, **kwargs): # noqa: E501 get information of a group # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_group(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1APIGroup + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: V1APIGroup """ kwargs['_return_http_data_only'] = True return self.get_api_group_with_http_info(**kwargs) # noqa: E501 @@ -66,22 +70,32 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 get information of a group # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_group_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1APIGroup, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(V1APIGroup, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -93,7 +107,10 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -112,7 +129,7 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -125,6 +142,11 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "V1APIGroup", + 401: None, + } + return self.api_client.call_api( '/apis/storagemigration.k8s.io/', 'GET', path_params, @@ -133,10 +155,11 @@ def get_api_group_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1APIGroup', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) diff --git a/kubernetes/client/api/storagemigration_v1alpha1_api.py b/kubernetes/client/api/storagemigration_v1alpha1_api.py deleted file mode 100644 index 3e3fd85965..0000000000 --- a/kubernetes/client/api/storagemigration_v1alpha1_api.py +++ /dev/null @@ -1,1583 +0,0 @@ -# coding: utf-8 - -""" - Kubernetes - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - - The version of the OpenAPI document: release-1.30 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from kubernetes.client.api_client import ApiClient -from kubernetes.client.exceptions import ( # noqa: F401 - ApiTypeError, - ApiValueError -) - - -class StoragemigrationV1alpha1Api(object): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def create_storage_version_migration(self, body, **kwargs): # noqa: E501 - """create_storage_version_migration # noqa: E501 - - create a StorageVersionMigration # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_storage_version_migration(body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param V1alpha1StorageVersionMigration body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha1StorageVersionMigration - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.create_storage_version_migration_with_http_info(body, **kwargs) # noqa: E501 - - def create_storage_version_migration_with_http_info(self, body, **kwargs): # noqa: E501 - """create_storage_version_migration # noqa: E501 - - create a StorageVersionMigration # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_storage_version_migration_with_http_info(body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param V1alpha1StorageVersionMigration body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha1StorageVersionMigration, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'body', - 'pretty', - 'dry_run', - 'field_manager', - 'field_validation' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method create_storage_version_migration" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `create_storage_version_migration`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 - query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 - query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha1StorageVersionMigration', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def delete_collection_storage_version_migration(self, **kwargs): # noqa: E501 - """delete_collection_storage_version_migration # noqa: E501 - - delete collection of StorageVersionMigration # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_collection_storage_version_migration(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1Status - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.delete_collection_storage_version_migration_with_http_info(**kwargs) # noqa: E501 - - def delete_collection_storage_version_migration_with_http_info(self, **kwargs): # noqa: E501 - """delete_collection_storage_version_migration # noqa: E501 - - delete collection of StorageVersionMigration # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_collection_storage_version_migration_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param V1DeleteOptions body: - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'pretty', - '_continue', - 'dry_run', - 'field_selector', - 'grace_period_seconds', - 'label_selector', - 'limit', - 'orphan_dependents', - 'propagation_policy', - 'resource_version', - 'resource_version_match', - 'send_initial_events', - 'timeout_seconds', - 'body' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method delete_collection_storage_version_migration" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 - query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 - query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 - query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 - query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 - query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 - query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 - query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 - query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 - query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 - query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1Status', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def delete_storage_version_migration(self, name, **kwargs): # noqa: E501 - """delete_storage_version_migration # noqa: E501 - - delete a StorageVersionMigration # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_storage_version_migration(name, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the StorageVersionMigration (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1Status - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.delete_storage_version_migration_with_http_info(name, **kwargs) # noqa: E501 - - def delete_storage_version_migration_with_http_info(self, name, **kwargs): # noqa: E501 - """delete_storage_version_migration # noqa: E501 - - delete a StorageVersionMigration # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_storage_version_migration_with_http_info(name, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the StorageVersionMigration (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. - :param V1DeleteOptions body: - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'pretty', - 'dry_run', - 'grace_period_seconds', - 'orphan_dependents', - 'propagation_policy', - 'body' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method delete_storage_version_migration" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `delete_storage_version_migration`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'grace_period_seconds' in local_var_params and local_var_params['grace_period_seconds'] is not None: # noqa: E501 - query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'orphan_dependents' in local_var_params and local_var_params['orphan_dependents'] is not None: # noqa: E501 - query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 - if 'propagation_policy' in local_var_params and local_var_params['propagation_policy'] is not None: # noqa: E501 - query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations/{name}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1Status', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_api_resources(self, **kwargs): # noqa: E501 - """get_api_resources # noqa: E501 - - get available resources # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_api_resources(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1APIResourceList - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.get_api_resources_with_http_info(**kwargs) # noqa: E501 - - def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 - """get_api_resources # noqa: E501 - - get available resources # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_api_resources_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method get_api_resources" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/storagemigration.k8s.io/v1alpha1/', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1APIResourceList', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_storage_version_migration(self, **kwargs): # noqa: E501 - """list_storage_version_migration # noqa: E501 - - list or watch objects of kind StorageVersionMigration # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_storage_version_migration(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha1StorageVersionMigrationList - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.list_storage_version_migration_with_http_info(**kwargs) # noqa: E501 - - def list_storage_version_migration_with_http_info(self, **kwargs): # noqa: E501 - """list_storage_version_migration # noqa: E501 - - list or watch objects of kind StorageVersionMigration # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_storage_version_migration_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. - :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. - :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. - :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset - :param bool send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. - :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. - :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha1StorageVersionMigrationList, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'pretty', - 'allow_watch_bookmarks', - '_continue', - 'field_selector', - 'label_selector', - 'limit', - 'resource_version', - 'resource_version_match', - 'send_initial_events', - 'timeout_seconds', - 'watch' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method list_storage_version_migration" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'allow_watch_bookmarks' in local_var_params and local_var_params['allow_watch_bookmarks'] is not None: # noqa: E501 - query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 - if '_continue' in local_var_params and local_var_params['_continue'] is not None: # noqa: E501 - query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 - if 'field_selector' in local_var_params and local_var_params['field_selector'] is not None: # noqa: E501 - query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 - if 'label_selector' in local_var_params and local_var_params['label_selector'] is not None: # noqa: E501 - query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'resource_version' in local_var_params and local_var_params['resource_version'] is not None: # noqa: E501 - query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 - if 'resource_version_match' in local_var_params and local_var_params['resource_version_match'] is not None: # noqa: E501 - query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 - if 'send_initial_events' in local_var_params and local_var_params['send_initial_events'] is not None: # noqa: E501 - query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 - if 'timeout_seconds' in local_var_params and local_var_params['timeout_seconds'] is not None: # noqa: E501 - query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 - if 'watch' in local_var_params and local_var_params['watch'] is not None: # noqa: E501 - query_params.append(('watch', local_var_params['watch'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha1StorageVersionMigrationList', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def patch_storage_version_migration(self, name, body, **kwargs): # noqa: E501 - """patch_storage_version_migration # noqa: E501 - - partially update the specified StorageVersionMigration # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_storage_version_migration(name, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the StorageVersionMigration (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha1StorageVersionMigration - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.patch_storage_version_migration_with_http_info(name, body, **kwargs) # noqa: E501 - - def patch_storage_version_migration_with_http_info(self, name, body, **kwargs): # noqa: E501 - """patch_storage_version_migration # noqa: E501 - - partially update the specified StorageVersionMigration # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_storage_version_migration_with_http_info(name, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the StorageVersionMigration (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha1StorageVersionMigration, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'body', - 'pretty', - 'dry_run', - 'field_manager', - 'field_validation', - 'force' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method patch_storage_version_migration" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `patch_storage_version_migration`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `patch_storage_version_migration`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 - query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 - query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 - query_params.append(('force', local_var_params['force'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations/{name}', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha1StorageVersionMigration', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def patch_storage_version_migration_status(self, name, body, **kwargs): # noqa: E501 - """patch_storage_version_migration_status # noqa: E501 - - partially update status of the specified StorageVersionMigration # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_storage_version_migration_status(name, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the StorageVersionMigration (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha1StorageVersionMigration - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.patch_storage_version_migration_status_with_http_info(name, body, **kwargs) # noqa: E501 - - def patch_storage_version_migration_status_with_http_info(self, name, body, **kwargs): # noqa: E501 - """patch_storage_version_migration_status # noqa: E501 - - partially update status of the specified StorageVersionMigration # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_storage_version_migration_status_with_http_info(name, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the StorageVersionMigration (required) - :param object body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param bool force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha1StorageVersionMigration, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'body', - 'pretty', - 'dry_run', - 'field_manager', - 'field_validation', - 'force' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method patch_storage_version_migration_status" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `patch_storage_version_migration_status`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `patch_storage_version_migration_status`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 - query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 - query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - if 'force' in local_var_params and local_var_params['force'] is not None: # noqa: E501 - query_params.append(('force', local_var_params['force'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations/{name}/status', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha1StorageVersionMigration', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def read_storage_version_migration(self, name, **kwargs): # noqa: E501 - """read_storage_version_migration # noqa: E501 - - read the specified StorageVersionMigration # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.read_storage_version_migration(name, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the StorageVersionMigration (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha1StorageVersionMigration - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.read_storage_version_migration_with_http_info(name, **kwargs) # noqa: E501 - - def read_storage_version_migration_with_http_info(self, name, **kwargs): # noqa: E501 - """read_storage_version_migration # noqa: E501 - - read the specified StorageVersionMigration # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.read_storage_version_migration_with_http_info(name, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the StorageVersionMigration (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha1StorageVersionMigration, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'pretty' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method read_storage_version_migration" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `read_storage_version_migration`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations/{name}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha1StorageVersionMigration', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def read_storage_version_migration_status(self, name, **kwargs): # noqa: E501 - """read_storage_version_migration_status # noqa: E501 - - read status of the specified StorageVersionMigration # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.read_storage_version_migration_status(name, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the StorageVersionMigration (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha1StorageVersionMigration - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.read_storage_version_migration_status_with_http_info(name, **kwargs) # noqa: E501 - - def read_storage_version_migration_status_with_http_info(self, name, **kwargs): # noqa: E501 - """read_storage_version_migration_status # noqa: E501 - - read status of the specified StorageVersionMigration # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.read_storage_version_migration_status_with_http_info(name, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the StorageVersionMigration (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha1StorageVersionMigration, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'pretty' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method read_storage_version_migration_status" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `read_storage_version_migration_status`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations/{name}/status', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha1StorageVersionMigration', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def replace_storage_version_migration(self, name, body, **kwargs): # noqa: E501 - """replace_storage_version_migration # noqa: E501 - - replace the specified StorageVersionMigration # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.replace_storage_version_migration(name, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the StorageVersionMigration (required) - :param V1alpha1StorageVersionMigration body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha1StorageVersionMigration - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.replace_storage_version_migration_with_http_info(name, body, **kwargs) # noqa: E501 - - def replace_storage_version_migration_with_http_info(self, name, body, **kwargs): # noqa: E501 - """replace_storage_version_migration # noqa: E501 - - replace the specified StorageVersionMigration # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.replace_storage_version_migration_with_http_info(name, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the StorageVersionMigration (required) - :param V1alpha1StorageVersionMigration body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha1StorageVersionMigration, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'body', - 'pretty', - 'dry_run', - 'field_manager', - 'field_validation' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method replace_storage_version_migration" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `replace_storage_version_migration`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `replace_storage_version_migration`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 - query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 - query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations/{name}', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha1StorageVersionMigration', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) - - def replace_storage_version_migration_status(self, name, body, **kwargs): # noqa: E501 - """replace_storage_version_migration_status # noqa: E501 - - replace status of the specified StorageVersionMigration # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.replace_storage_version_migration_status(name, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the StorageVersionMigration (required) - :param V1alpha1StorageVersionMigration body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: V1alpha1StorageVersionMigration - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - return self.replace_storage_version_migration_status_with_http_info(name, body, **kwargs) # noqa: E501 - - def replace_storage_version_migration_status_with_http_info(self, name, body, **kwargs): # noqa: E501 - """replace_storage_version_migration_status # noqa: E501 - - replace status of the specified StorageVersionMigration # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.replace_storage_version_migration_status_with_http_info(name, body, async_req=True) - >>> result = thread.get() - - :param async_req bool: execute request asynchronously - :param str name: name of the StorageVersionMigration (required) - :param V1alpha1StorageVersionMigration body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. - :param _return_http_data_only: response data without head status code - and headers - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: tuple(V1alpha1StorageVersionMigration, status_code(int), headers(HTTPHeaderDict)) - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = [ - 'name', - 'body', - 'pretty', - 'dry_run', - 'field_manager', - 'field_validation' - ] - all_params.extend( - [ - 'async_req', - '_return_http_data_only', - '_preload_content', - '_request_timeout' - ] - ) - - for key, val in six.iteritems(local_var_params['kwargs']): - if key not in all_params: - raise ApiTypeError( - "Got an unexpected keyword argument '%s'" - " to method replace_storage_version_migration_status" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'name' is set - if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 - local_var_params['name'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `name` when calling `replace_storage_version_migration_status`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 - local_var_params['body'] is None): # noqa: E501 - raise ApiValueError("Missing the required parameter `body` when calling `replace_storage_version_migration_status`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # noqa: E501 - - query_params = [] - if 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 - query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 - query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 - if 'field_manager' in local_var_params and local_var_params['field_manager'] is not None: # noqa: E501 - query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 - if 'field_validation' in local_var_params and local_var_params['field_validation'] is not None: # noqa: E501 - query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations/{name}/status', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha1StorageVersionMigration', # noqa: E501 - auth_settings=auth_settings, - async_req=local_var_params.get('async_req'), - _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 - _preload_content=local_var_params.get('_preload_content', True), - _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) diff --git a/kubernetes/client/api/storagemigration_v1beta1_api.py b/kubernetes/client/api/storagemigration_v1beta1_api.py new file mode 100644 index 0000000000..5876ada219 --- /dev/null +++ b/kubernetes/client/api/storagemigration_v1beta1_api.py @@ -0,0 +1,1987 @@ +# coding: utf-8 + +""" + Kubernetes + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: release-1.35 + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from kubernetes.client.api_client import ApiClient +from kubernetes.client.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class StoragemigrationV1beta1Api(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def create_storage_version_migration(self, body, **kwargs): # noqa: E501 + """create_storage_version_migration # noqa: E501 + + create a StorageVersionMigration # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_storage_version_migration(body, async_req=True) + >>> result = thread.get() + + :param body: (required) + :type body: V1beta1StorageVersionMigration + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1StorageVersionMigration + """ + kwargs['_return_http_data_only'] = True + return self.create_storage_version_migration_with_http_info(body, **kwargs) # noqa: E501 + + def create_storage_version_migration_with_http_info(self, body, **kwargs): # noqa: E501 + """create_storage_version_migration # noqa: E501 + + create a StorageVersionMigration # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_storage_version_migration_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param body: (required) + :type body: V1beta1StorageVersionMigration + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1StorageVersionMigration, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_storage_version_migration" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `create_storage_version_migration`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1StorageVersionMigration", + 201: "V1beta1StorageVersionMigration", + 202: "V1beta1StorageVersionMigration", + 401: None, + } + + return self.api_client.call_api( + '/apis/storagemigration.k8s.io/v1beta1/storageversionmigrations', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_collection_storage_version_migration(self, **kwargs): # noqa: E501 + """delete_collection_storage_version_migration # noqa: E501 + + delete collection of StorageVersionMigration # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_collection_storage_version_migration(async_req=True) + >>> result = thread.get() + + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1Status + """ + kwargs['_return_http_data_only'] = True + return self.delete_collection_storage_version_migration_with_http_info(**kwargs) # noqa: E501 + + def delete_collection_storage_version_migration_with_http_info(self, **kwargs): # noqa: E501 + """delete_collection_storage_version_migration # noqa: E501 + + delete collection of StorageVersionMigration # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_collection_storage_version_migration_with_http_info(async_req=True) + >>> result = thread.get() + + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'pretty', + '_continue', + 'dry_run', + 'field_selector', + 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', + 'label_selector', + 'limit', + 'orphan_dependents', + 'propagation_policy', + 'resource_version', + 'resource_version_match', + 'send_initial_events', + 'timeout_seconds', + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_collection_storage_version_migration" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 + query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 + query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 + query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 + query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 + query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 + query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 + query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 + query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 + query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 + query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1Status", + 401: None, + } + + return self.api_client.call_api( + '/apis/storagemigration.k8s.io/v1beta1/storageversionmigrations', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_storage_version_migration(self, name, **kwargs): # noqa: E501 + """delete_storage_version_migration # noqa: E501 + + delete a StorageVersionMigration # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_storage_version_migration(name, async_req=True) + >>> result = thread.get() + + :param name: name of the StorageVersionMigration (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1Status + """ + kwargs['_return_http_data_only'] = True + return self.delete_storage_version_migration_with_http_info(name, **kwargs) # noqa: E501 + + def delete_storage_version_migration_with_http_info(self, name, **kwargs): # noqa: E501 + """delete_storage_version_migration # noqa: E501 + + delete a StorageVersionMigration # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_storage_version_migration_with_http_info(name, async_req=True) + >>> result = thread.get() + + :param name: name of the StorageVersionMigration (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + :type grace_period_seconds: int + :param ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it + :type ignore_store_read_error_with_cluster_breaking_potential: bool + :param orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + :type orphan_dependents: bool + :param propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + :type propagation_policy: str + :param body: + :type body: V1DeleteOptions + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'pretty', + 'dry_run', + 'grace_period_seconds', + 'ignore_store_read_error_with_cluster_breaking_potential', + 'orphan_dependents', + 'propagation_policy', + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_storage_version_migration" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `delete_storage_version_migration`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('grace_period_seconds') is not None: # noqa: E501 + query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 + if local_var_params.get('ignore_store_read_error_with_cluster_breaking_potential') is not None: # noqa: E501 + query_params.append(('ignoreStoreReadErrorWithClusterBreakingPotential', local_var_params['ignore_store_read_error_with_cluster_breaking_potential'])) # noqa: E501 + if local_var_params.get('orphan_dependents') is not None: # noqa: E501 + query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) # noqa: E501 + if local_var_params.get('propagation_policy') is not None: # noqa: E501 + query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1Status", + 202: "V1Status", + 401: None, + } + + return self.api_client.call_api( + '/apis/storagemigration.k8s.io/v1beta1/storageversionmigrations/{name}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_api_resources(self, **kwargs): # noqa: E501 + """get_api_resources # noqa: E501 + + get available resources # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_api_resources(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1APIResourceList + """ + kwargs['_return_http_data_only'] = True + return self.get_api_resources_with_http_info(**kwargs) # noqa: E501 + + def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 + """get_api_resources # noqa: E501 + + get available resources # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_api_resources_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_api_resources" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1APIResourceList", + 401: None, + } + + return self.api_client.call_api( + '/apis/storagemigration.k8s.io/v1beta1/', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def list_storage_version_migration(self, **kwargs): # noqa: E501 + """list_storage_version_migration # noqa: E501 + + list or watch objects of kind StorageVersionMigration # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_storage_version_migration(async_req=True) + >>> result = thread.get() + + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1StorageVersionMigrationList + """ + kwargs['_return_http_data_only'] = True + return self.list_storage_version_migration_with_http_info(**kwargs) # noqa: E501 + + def list_storage_version_migration_with_http_info(self, **kwargs): # noqa: E501 + """list_storage_version_migration # noqa: E501 + + list or watch objects of kind StorageVersionMigration # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_storage_version_migration_with_http_info(async_req=True) + >>> result = thread.get() + + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. + :type allow_watch_bookmarks: bool + :param _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. + :type _continue: str + :param field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. + :type field_selector: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. + :type limit: int + :param resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version: str + :param resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset + :type resource_version_match: str + :param send_initial_events: `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. + :type send_initial_events: bool + :param timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. + :type timeout_seconds: int + :param watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. + :type watch: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1StorageVersionMigrationList, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'pretty', + 'allow_watch_bookmarks', + '_continue', + 'field_selector', + 'label_selector', + 'limit', + 'resource_version', + 'resource_version_match', + 'send_initial_events', + 'timeout_seconds', + 'watch' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_storage_version_migration" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('allow_watch_bookmarks') is not None: # noqa: E501 + query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) # noqa: E501 + if local_var_params.get('_continue') is not None: # noqa: E501 + query_params.append(('continue', local_var_params['_continue'])) # noqa: E501 + if local_var_params.get('field_selector') is not None: # noqa: E501 + query_params.append(('fieldSelector', local_var_params['field_selector'])) # noqa: E501 + if local_var_params.get('label_selector') is not None: # noqa: E501 + query_params.append(('labelSelector', local_var_params['label_selector'])) # noqa: E501 + if local_var_params.get('limit') is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if local_var_params.get('resource_version') is not None: # noqa: E501 + query_params.append(('resourceVersion', local_var_params['resource_version'])) # noqa: E501 + if local_var_params.get('resource_version_match') is not None: # noqa: E501 + query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) # noqa: E501 + if local_var_params.get('send_initial_events') is not None: # noqa: E501 + query_params.append(('sendInitialEvents', local_var_params['send_initial_events'])) # noqa: E501 + if local_var_params.get('timeout_seconds') is not None: # noqa: E501 + query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) # noqa: E501 + if local_var_params.get('watch') is not None: # noqa: E501 + query_params.append(('watch', local_var_params['watch'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1StorageVersionMigrationList", + 401: None, + } + + return self.api_client.call_api( + '/apis/storagemigration.k8s.io/v1beta1/storageversionmigrations', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def patch_storage_version_migration(self, name, body, **kwargs): # noqa: E501 + """patch_storage_version_migration # noqa: E501 + + partially update the specified StorageVersionMigration # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_storage_version_migration(name, body, async_req=True) + >>> result = thread.get() + + :param name: name of the StorageVersionMigration (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1StorageVersionMigration + """ + kwargs['_return_http_data_only'] = True + return self.patch_storage_version_migration_with_http_info(name, body, **kwargs) # noqa: E501 + + def patch_storage_version_migration_with_http_info(self, name, body, **kwargs): # noqa: E501 + """patch_storage_version_migration # noqa: E501 + + partially update the specified StorageVersionMigration # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_storage_version_migration_with_http_info(name, body, async_req=True) + >>> result = thread.get() + + :param name: name of the StorageVersionMigration (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1StorageVersionMigration, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation', + 'force' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method patch_storage_version_migration" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `patch_storage_version_migration`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `patch_storage_version_migration`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 + query_params.append(('force', local_var_params['force'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # HTTP header `Content-Type` + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1StorageVersionMigration", + 201: "V1beta1StorageVersionMigration", + 401: None, + } + + return self.api_client.call_api( + '/apis/storagemigration.k8s.io/v1beta1/storageversionmigrations/{name}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def patch_storage_version_migration_status(self, name, body, **kwargs): # noqa: E501 + """patch_storage_version_migration_status # noqa: E501 + + partially update status of the specified StorageVersionMigration # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_storage_version_migration_status(name, body, async_req=True) + >>> result = thread.get() + + :param name: name of the StorageVersionMigration (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1StorageVersionMigration + """ + kwargs['_return_http_data_only'] = True + return self.patch_storage_version_migration_status_with_http_info(name, body, **kwargs) # noqa: E501 + + def patch_storage_version_migration_status_with_http_info(self, name, body, **kwargs): # noqa: E501 + """patch_storage_version_migration_status # noqa: E501 + + partially update status of the specified StorageVersionMigration # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.patch_storage_version_migration_status_with_http_info(name, body, async_req=True) + >>> result = thread.get() + + :param name: name of the StorageVersionMigration (required) + :type name: str + :param body: (required) + :type body: object + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param force: Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. + :type force: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1StorageVersionMigration, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation', + 'force' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method patch_storage_version_migration_status" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `patch_storage_version_migration_status`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `patch_storage_version_migration_status`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + if local_var_params.get('force') is not None: # noqa: E501 + query_params.append(('force', local_var_params['force'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # HTTP header `Content-Type` + content_types_list = local_var_params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml', 'application/apply-patch+cbor'], + 'PATCH', body_params)) # noqa: E501 + if content_types_list: + header_params['Content-Type'] = content_types_list + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1StorageVersionMigration", + 201: "V1beta1StorageVersionMigration", + 401: None, + } + + return self.api_client.call_api( + '/apis/storagemigration.k8s.io/v1beta1/storageversionmigrations/{name}/status', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def read_storage_version_migration(self, name, **kwargs): # noqa: E501 + """read_storage_version_migration # noqa: E501 + + read the specified StorageVersionMigration # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.read_storage_version_migration(name, async_req=True) + >>> result = thread.get() + + :param name: name of the StorageVersionMigration (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1StorageVersionMigration + """ + kwargs['_return_http_data_only'] = True + return self.read_storage_version_migration_with_http_info(name, **kwargs) # noqa: E501 + + def read_storage_version_migration_with_http_info(self, name, **kwargs): # noqa: E501 + """read_storage_version_migration # noqa: E501 + + read the specified StorageVersionMigration # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.read_storage_version_migration_with_http_info(name, async_req=True) + >>> result = thread.get() + + :param name: name of the StorageVersionMigration (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1StorageVersionMigration, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'pretty' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method read_storage_version_migration" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `read_storage_version_migration`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1StorageVersionMigration", + 401: None, + } + + return self.api_client.call_api( + '/apis/storagemigration.k8s.io/v1beta1/storageversionmigrations/{name}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def read_storage_version_migration_status(self, name, **kwargs): # noqa: E501 + """read_storage_version_migration_status # noqa: E501 + + read status of the specified StorageVersionMigration # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.read_storage_version_migration_status(name, async_req=True) + >>> result = thread.get() + + :param name: name of the StorageVersionMigration (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1StorageVersionMigration + """ + kwargs['_return_http_data_only'] = True + return self.read_storage_version_migration_status_with_http_info(name, **kwargs) # noqa: E501 + + def read_storage_version_migration_status_with_http_info(self, name, **kwargs): # noqa: E501 + """read_storage_version_migration_status # noqa: E501 + + read status of the specified StorageVersionMigration # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.read_storage_version_migration_status_with_http_info(name, async_req=True) + >>> result = thread.get() + + :param name: name of the StorageVersionMigration (required) + :type name: str + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1StorageVersionMigration, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'pretty' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method read_storage_version_migration_status" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `read_storage_version_migration_status`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1StorageVersionMigration", + 401: None, + } + + return self.api_client.call_api( + '/apis/storagemigration.k8s.io/v1beta1/storageversionmigrations/{name}/status', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def replace_storage_version_migration(self, name, body, **kwargs): # noqa: E501 + """replace_storage_version_migration # noqa: E501 + + replace the specified StorageVersionMigration # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.replace_storage_version_migration(name, body, async_req=True) + >>> result = thread.get() + + :param name: name of the StorageVersionMigration (required) + :type name: str + :param body: (required) + :type body: V1beta1StorageVersionMigration + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1StorageVersionMigration + """ + kwargs['_return_http_data_only'] = True + return self.replace_storage_version_migration_with_http_info(name, body, **kwargs) # noqa: E501 + + def replace_storage_version_migration_with_http_info(self, name, body, **kwargs): # noqa: E501 + """replace_storage_version_migration # noqa: E501 + + replace the specified StorageVersionMigration # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.replace_storage_version_migration_with_http_info(name, body, async_req=True) + >>> result = thread.get() + + :param name: name of the StorageVersionMigration (required) + :type name: str + :param body: (required) + :type body: V1beta1StorageVersionMigration + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1StorageVersionMigration, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method replace_storage_version_migration" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `replace_storage_version_migration`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `replace_storage_version_migration`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1StorageVersionMigration", + 201: "V1beta1StorageVersionMigration", + 401: None, + } + + return self.api_client.call_api( + '/apis/storagemigration.k8s.io/v1beta1/storageversionmigrations/{name}', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def replace_storage_version_migration_status(self, name, body, **kwargs): # noqa: E501 + """replace_storage_version_migration_status # noqa: E501 + + replace status of the specified StorageVersionMigration # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.replace_storage_version_migration_status(name, body, async_req=True) + >>> result = thread.get() + + :param name: name of the StorageVersionMigration (required) + :type name: str + :param body: (required) + :type body: V1beta1StorageVersionMigration + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: V1beta1StorageVersionMigration + """ + kwargs['_return_http_data_only'] = True + return self.replace_storage_version_migration_status_with_http_info(name, body, **kwargs) # noqa: E501 + + def replace_storage_version_migration_status_with_http_info(self, name, body, **kwargs): # noqa: E501 + """replace_storage_version_migration_status # noqa: E501 + + replace status of the specified StorageVersionMigration # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.replace_storage_version_migration_status_with_http_info(name, body, async_req=True) + >>> result = thread.get() + + :param name: name of the StorageVersionMigration (required) + :type name: str + :param body: (required) + :type body: V1beta1StorageVersionMigration + :param pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). + :type pretty: str + :param dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + :type dry_run: str + :param field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. + :type field_manager: str + :param field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. + :type field_validation: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(V1beta1StorageVersionMigration, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'name', + 'body', + 'pretty', + 'dry_run', + 'field_manager', + 'field_validation' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method replace_storage_version_migration_status" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and local_var_params.get('name') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `replace_storage_version_migration_status`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and local_var_params.get('body') is None: # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `replace_storage_version_migration_status`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in local_var_params: + path_params['name'] = local_var_params['name'] # noqa: E501 + + query_params = [] + if local_var_params.get('pretty') is not None: # noqa: E501 + query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 + if local_var_params.get('dry_run') is not None: # noqa: E501 + query_params.append(('dryRun', local_var_params['dry_run'])) # noqa: E501 + if local_var_params.get('field_manager') is not None: # noqa: E501 + query_params.append(('fieldManager', local_var_params['field_manager'])) # noqa: E501 + if local_var_params.get('field_validation') is not None: # noqa: E501 + query_params.append(('fieldValidation', local_var_params['field_validation'])) # noqa: E501 + + header_params = dict(local_var_params.get('_headers', {})) + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/cbor']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + response_types_map = { + 200: "V1beta1StorageVersionMigration", + 201: "V1beta1StorageVersionMigration", + 401: None, + } + + return self.api_client.call_api( + '/apis/storagemigration.k8s.io/v1beta1/storageversionmigrations/{name}/status', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) diff --git a/kubernetes/client/api/version_api.py b/kubernetes/client/api/version_api.py index 3866ca7b88..4b3655e818 100644 --- a/kubernetes/client/api/version_api.py +++ b/kubernetes/client/api/version_api.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ @@ -39,23 +39,27 @@ def __init__(self, api_client=None): def get_code(self, **kwargs): # noqa: E501 """get_code # noqa: E501 - get the code version # noqa: E501 + get the version information for this server # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_code(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: VersionInfo + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: VersionInfo """ kwargs['_return_http_data_only'] = True return self.get_code_with_http_info(**kwargs) # noqa: E501 @@ -63,25 +67,35 @@ def get_code(self, **kwargs): # noqa: E501 def get_code_with_http_info(self, **kwargs): # noqa: E501 """get_code # noqa: E501 - get the code version # noqa: E501 + get the version information for this server # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_code_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(VersionInfo, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(VersionInfo, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -93,7 +107,10 @@ def get_code_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -112,7 +129,7 @@ def get_code_with_http_info(self, **kwargs): # noqa: E501 query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -125,6 +142,11 @@ def get_code_with_http_info(self, **kwargs): # noqa: E501 # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "VersionInfo", + 401: None, + } + return self.api_client.call_api( '/version/', 'GET', path_params, @@ -133,10 +155,11 @@ def get_code_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='VersionInfo', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) diff --git a/kubernetes/client/api/well_known_api.py b/kubernetes/client/api/well_known_api.py index 0bff79e80c..a74d8e9288 100644 --- a/kubernetes/client/api/well_known_api.py +++ b/kubernetes/client/api/well_known_api.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ @@ -42,20 +42,24 @@ def get_service_account_issuer_open_id_configuration(self, **kwargs): # noqa: E get service account issuer OpenID configuration, also known as the 'OIDC discovery doc' # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_service_account_issuer_open_id_configuration(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: str + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: str """ kwargs['_return_http_data_only'] = True return self.get_service_account_issuer_open_id_configuration_with_http_info(**kwargs) # noqa: E501 @@ -66,22 +70,32 @@ def get_service_account_issuer_open_id_configuration_with_http_info(self, **kwar get service account issuer OpenID configuration, also known as the 'OIDC discovery doc' # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_service_account_issuer_open_id_configuration_with_http_info(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. If the method is called asynchronously, returns the request thread. + :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -93,7 +107,10 @@ def get_service_account_issuer_open_id_configuration_with_http_info(self, **kwar 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -112,7 +129,7 @@ def get_service_account_issuer_open_id_configuration_with_http_info(self, **kwar query_params = [] - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -125,6 +142,11 @@ def get_service_account_issuer_open_id_configuration_with_http_info(self, **kwar # Authentication setting auth_settings = ['BearerToken'] # noqa: E501 + response_types_map = { + 200: "str", + 401: None, + } + return self.api_client.call_api( '/.well-known/openid-configuration', 'GET', path_params, @@ -133,10 +155,11 @@ def get_service_account_issuer_open_id_configuration_with_http_info(self, **kwar body=body_params, post_params=form_params, files=local_var_files, - response_type='str', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), - collection_formats=collection_formats) + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) diff --git a/kubernetes/client/api_client.py b/kubernetes/client/api_client.py index f46bdb52a0..aeace543e9 100644 --- a/kubernetes/client/api_client.py +++ b/kubernetes/client/api_client.py @@ -4,7 +4,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ @@ -27,7 +27,7 @@ from kubernetes.client.configuration import Configuration import kubernetes.client.models from kubernetes.client import rest -from kubernetes.client.exceptions import ApiValueError +from kubernetes.client.exceptions import ApiValueError, ApiException class ApiClient(object): @@ -78,7 +78,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None, self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/30.0.0+snapshot/python' + self.user_agent = 'OpenAPI-Generator/35.0.0+snapshot/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): @@ -120,9 +120,10 @@ def set_default_header(self, header_name, header_value): def __call_api( self, resource_path, method, path_params=None, query_params=None, header_params=None, body=None, post_params=None, - files=None, response_type=None, auth_settings=None, + files=None, response_types_map=None, auth_settings=None, _return_http_data_only=None, collection_formats=None, - _preload_content=True, _request_timeout=None, _host=None): + _preload_content=True, _request_timeout=None, _host=None, + _request_auth=None): config = self.configuration @@ -163,7 +164,9 @@ def __call_api( post_params.extend(self.files_parameters(files)) # auth setting - self.update_params_for_auth(header_params, query_params, auth_settings) + self.update_params_for_auth( + header_params, query_params, auth_settings, + request_auth=_request_auth) # body if body: @@ -176,22 +179,40 @@ def __call_api( # use server/host defined in path or operation instead url = _host + resource_path - # perform request and return response - response_data = self.request( - method, url, query_params=query_params, headers=header_params, - post_params=post_params, body=body, - _preload_content=_preload_content, - _request_timeout=_request_timeout) + try: + # perform request and return response + response_data = self.request( + method, url, query_params=query_params, headers=header_params, + post_params=post_params, body=body, + _preload_content=_preload_content, + _request_timeout=_request_timeout) + except ApiException as e: + e.body = e.body.decode('utf-8') if six.PY3 else e.body + raise e self.last_response = response_data return_data = response_data - if _preload_content: - # deserialize response data - if response_type: - return_data = self.deserialize(response_data, response_type) - else: - return_data = None + + if not _preload_content: + return return_data + + response_type = response_types_map.get(response_data.status, None) + + if six.PY3 and response_type not in ["file", "bytes", "str"]: + match = None + content_type = response_data.getheader('content-type') + if content_type is not None: + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s\;]?", content_type) + encoding = match.group(1) if match else "utf-8" + response_data.data = response_data.data.decode(encoding) + + # deserialize response data + + if response_type: + return_data = self.deserialize(response_data, response_type) + else: + return_data = None if _return_http_data_only: return (return_data) @@ -280,8 +301,8 @@ def __deserialize(self, data, klass): return [self.__deserialize(sub_data, sub_kls) for sub_data in data] - if klass.startswith('dict('): - sub_kls = re.match(r'dict\(([^,]*), (.*)\)', klass).group(2) + if klass.startswith('dict['): + sub_kls = re.match(r'dict\[([^,]*), (.*)\]', klass).group(2) return {k: self.__deserialize(v, sub_kls) for k, v in six.iteritems(data)} @@ -305,9 +326,10 @@ def __deserialize(self, data, klass): def call_api(self, resource_path, method, path_params=None, query_params=None, header_params=None, body=None, post_params=None, files=None, - response_type=None, auth_settings=None, async_req=None, - _return_http_data_only=None, collection_formats=None, - _preload_content=True, _request_timeout=None, _host=None): + response_types_map=None, auth_settings=None, + async_req=None, _return_http_data_only=None, + collection_formats=None,_preload_content=True, + _request_timeout=None, _host=None, _request_auth=None): """Makes the HTTP request (synchronous) and returns deserialized data. To make an async_req request, set the async_req parameter. @@ -337,6 +359,10 @@ def call_api(self, resource_path, method, number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_token: dict, optional :return: If async_req parameter is True, the request will be called asynchronously. @@ -348,22 +374,23 @@ def call_api(self, resource_path, method, return self.__call_api(resource_path, method, path_params, query_params, header_params, body, post_params, files, - response_type, auth_settings, + response_types_map, auth_settings, _return_http_data_only, collection_formats, - _preload_content, _request_timeout, _host) + _preload_content, _request_timeout, _host, + _request_auth) return self.pool.apply_async(self.__call_api, (resource_path, method, path_params, query_params, header_params, body, post_params, files, - response_type, + response_types_map, auth_settings, _return_http_data_only, collection_formats, _preload_content, _request_timeout, - _host)) + _host, _request_auth)) def request(self, method, url, query_params=None, headers=None, post_params=None, body=None, _preload_content=True, @@ -494,45 +521,68 @@ def select_header_accept(self, accepts): else: return ', '.join(accepts) - def select_header_content_type(self, content_types): + def select_header_content_type(self, content_types, method=None, body=None): """Returns `Content-Type` based on an array of content_types provided. :param content_types: List of content-types. + :param method: http method (e.g. POST, PATCH). + :param body: http body to send. :return: Content-Type (e.g. application/json). """ if not content_types: - return 'application/json' + return None content_types = [x.lower() for x in content_types] + if (method == 'PATCH' and + 'application/json-patch+json' in content_types and + isinstance(body, list)): + return 'application/json-patch+json' + if 'application/json' in content_types or '*/*' in content_types: return 'application/json' else: return content_types[0] - def update_params_for_auth(self, headers, querys, auth_settings): + def update_params_for_auth(self, headers, queries, auth_settings, + request_auth=None): """Updates header and query params based on authentication setting. :param headers: Header parameters dict to be updated. - :param querys: Query parameters tuple list to be updated. + :param queries: Query parameters tuple list to be updated. :param auth_settings: Authentication setting identifiers list. + :param request_auth: if set, the provided settings will + override the token in the configuration. """ if not auth_settings: return + if request_auth: + self._apply_auth_params(headers, queries, request_auth) + return + for auth in auth_settings: auth_setting = self.configuration.auth_settings().get(auth) if auth_setting: - if auth_setting['in'] == 'cookie': - headers['Cookie'] = auth_setting['value'] - elif auth_setting['in'] == 'header': - headers[auth_setting['key']] = auth_setting['value'] - elif auth_setting['in'] == 'query': - querys.append((auth_setting['key'], auth_setting['value'])) - else: - raise ApiValueError( - 'Authentication token must be in `query` or `header`' - ) + self._apply_auth_params(headers, queries, auth_setting) + + def _apply_auth_params(self, headers, queries, auth_setting): + """Updates the request parameters based on a single auth_setting + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :param auth_setting: auth settings for the endpoint + """ + if auth_setting['in'] == 'cookie': + headers['Cookie'] = auth_setting['value'] + elif auth_setting['in'] == 'header': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + queries.append((auth_setting['key'], auth_setting['value'])) + else: + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) def __deserialize_file(self, response): """Deserializes body to file @@ -624,9 +674,12 @@ def __deserialize_model(self, data, klass): :param klass: class literal. :return: model object. """ + has_discriminator = False + if (hasattr(klass, 'get_real_child_model') + and klass.discriminator_value_class_map): + has_discriminator = True - if not klass.openapi_types and not hasattr(klass, - 'get_real_child_model'): + if not klass.openapi_types and has_discriminator is False: return data kwargs = {} @@ -638,9 +691,10 @@ def __deserialize_model(self, data, klass): value = data[klass.attribute_map[attr]] kwargs[attr] = self.__deserialize(value, attr_type) + kwargs["local_vars_configuration"] = self.configuration instance = klass(**kwargs) - if hasattr(instance, 'get_real_child_model'): + if has_discriminator: klass_name = instance.get_real_child_model(data) if klass_name: instance = self.__deserialize(data, klass_name) diff --git a/kubernetes/client/configuration.py b/kubernetes/client/configuration.py index 0c7d3c1424..b319689205 100644 --- a/kubernetes/client/configuration.py +++ b/kubernetes/client/configuration.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ @@ -20,8 +20,16 @@ import six from six.moves import http_client as httplib +from kubernetes.client.exceptions import ApiValueError +import os +JSON_SCHEMA_VALIDATION_KEYWORDS = { + 'multipleOf', 'maximum', 'exclusiveMaximum', + 'minimum', 'exclusiveMinimum', 'maxLength', + 'minLength', 'pattern', 'maxItems', 'minItems' +} + class Configuration(object): """NOTE: This class is auto generated by OpenAPI Generator @@ -49,6 +57,30 @@ class Configuration(object): then all undeclared properties received by the server are injected into the additional properties map. In that case, there are undeclared properties, and nothing to discard. + :param disabled_client_side_validations (string): Comma-separated list of + JSON schema validation keywords to disable JSON schema structural validation + rules. The following keywords may be specified: multipleOf, maximum, + exclusiveMaximum, minimum, exclusiveMinimum, maxLength, minLength, pattern, + maxItems, minItems. + By default, the validation is performed for data generated locally by the client + and data received from the server, independent of any validation performed by + the server side. If the input data does not satisfy the JSON schema validation + rules specified in the OpenAPI document, an exception is raised. + If disabled_client_side_validations is set, structural validation is + disabled. This can be useful to troubleshoot data validation problem, such as + when the OpenAPI document validation rules do not match the actual API data + received by the server. + :param server_index: Index to servers configuration. + :param server_variables: Mapping with string values to replace variables in + templated server configuration. The validation of enums is performed for + variables with defined enum values before. + :param server_operation_index: Mapping from operation ID to an index to server + configuration. + :param server_operation_variables: Mapping from operation ID to a mapping with + string values to replace variables in templated server configuration. + The validation of enums is performed for variables with defined enum values before. + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + in PEM format :Example: @@ -62,26 +94,40 @@ class Configuration(object): name: JSESSIONID # cookie name You can programmatically set the cookie: - conf = client.Configuration( - api_key={'cookieAuth': 'abc123'} - api_key_prefix={'cookieAuth': 'JSESSIONID'} - ) + +conf = client.Configuration( + api_key={'cookieAuth': 'abc123'} + api_key_prefix={'cookieAuth': 'JSESSIONID'} +) + The following cookie will be added to the HTTP request: Cookie: JSESSIONID abc123 """ _default = None - def __init__(self, host="http://localhost", + def __init__(self, host=None, api_key=None, api_key_prefix=None, username=None, password=None, discard_unknown_keys=False, + disabled_client_side_validations="", + server_index=None, server_variables=None, + server_operation_index=None, server_operation_variables=None, + ssl_ca_cert=None, ): """Constructor """ - self.host = host + self._base_path = "http://localhost" if host is None else host """Default Base url """ + self.server_index = 0 if server_index is None and host is None else server_index + self.server_operation_index = server_operation_index or {} + """Default server index + """ + self.server_variables = server_variables or {} + self.server_operation_variables = server_operation_variables or {} + """Default server variables + """ self.temp_folder_path = None """Temp file folder for downloading files """ @@ -106,6 +152,7 @@ def __init__(self, host="http://localhost", """Password for HTTP basic authentication """ self.discard_unknown_keys = discard_unknown_keys + self.disabled_client_side_validations = disabled_client_side_validations self.logger = {} """Logging Settings """ @@ -132,7 +179,7 @@ def __init__(self, host="http://localhost", Set this to false to skip verifying SSL certificate when calling API from https server. """ - self.ssl_ca_cert = None + self.ssl_ca_cert = ssl_ca_cert """Set this to customize the certificate file to verify the peer. """ self.cert_file = None @@ -161,6 +208,14 @@ def __init__(self, host="http://localhost", """Proxy URL """ self.no_proxy = None +# Load proxy from environment variables (if set) + if os.getenv("HTTPS_PROXY"): self.proxy = os.getenv("HTTPS_PROXY") + if os.getenv("https_proxy"): self.proxy = os.getenv("https_proxy") + if os.getenv("HTTP_PROXY"): self.proxy = os.getenv("HTTP_PROXY") + if os.getenv("http_proxy"): self.proxy = os.getenv("http_proxy") + # Load no_proxy from environment variables (if set) + if os.getenv("NO_PROXY"): self.no_proxy = os.getenv("NO_PROXY") + if os.getenv("no_proxy"): self.no_proxy = os.getenv("no_proxy") """bypass proxy for host in the no_proxy list. """ self.proxy_headers = None @@ -172,9 +227,13 @@ def __init__(self, host="http://localhost", self.retries = None """Adding retries to override urllib3 default value 3 """ - # Disable client side validation + # Enable client side validation self.client_side_validation = True + self.socket_options = None + """Options to pass down to the underlying urllib3 socket + """ + def __deepcopy__(self, memo): cls = self.__class__ result = cls.__new__(cls) @@ -189,6 +248,16 @@ def __deepcopy__(self, memo): result.debug = self.debug return result + def __setattr__(self, name, value): + object.__setattr__(self, name, value) + if name == 'disabled_client_side_validations': + s = set(filter(None, value.split(','))) + for v in s: + if v not in JSON_SCHEMA_VALIDATION_KEYWORDS: + raise ApiValueError( + "Invalid keyword: '{0}''".format(v)) + self._disabled_client_side_validations = s + @classmethod def set_default(cls, default): """Set default instance of configuration. @@ -299,15 +368,16 @@ def logger_format(self, value): self.__logger_format = value self.logger_formatter = logging.Formatter(self.__logger_format) - def get_api_key_with_prefix(self, identifier): + def get_api_key_with_prefix(self, identifier, alias=None): """Gets API key (with prefix if set). :param identifier: The identifier of apiKey. + :param alias: The alternative identifier of apiKey. :return: The token for api key authentication. """ if self.refresh_api_key_hook is not None: self.refresh_api_key_hook(self) - key = self.api_key.get(identifier) + key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) if key: prefix = self.api_key_prefix.get(identifier) if prefix: @@ -336,12 +406,14 @@ def auth_settings(self): :return: The Auth Settings information dict. """ auth = {} - if 'authorization' in self.api_key: + if 'BearerToken' in self.api_key: auth['BearerToken'] = { 'type': 'api_key', 'in': 'header', 'key': 'authorization', - 'value': self.get_api_key_with_prefix('authorization') + 'value': self.get_api_key_with_prefix( + 'BearerToken', + ), } return auth @@ -353,8 +425,8 @@ def to_debug_report(self): return "Python SDK Debug Report:\n"\ "OS: {env}\n"\ "Python Version: {pyversion}\n"\ - "Version of the API: release-1.30\n"\ - "SDK Package Version: 30.0.0+snapshot".\ + "Version of the API: release-1.35\n"\ + "SDK Package Version: 35.0.0+snapshot".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): @@ -364,19 +436,23 @@ def get_host_settings(self): """ return [ { - 'url': "/", + 'url': "", 'description': "No description provided", } ] - def get_host_from_settings(self, index, variables=None): + def get_host_from_settings(self, index, variables=None, servers=None): """Gets host URL based on the index and variables :param index: array index of the host settings :param variables: hash of variable and the corresponding value + :param servers: an array of host settings or None :return: URL based on host settings """ + if index is None: + return self._base_path + variables = {} if variables is None else variables - servers = self.get_host_settings() + servers = self.get_host_settings() if servers is None else servers try: server = servers[index] @@ -388,7 +464,7 @@ def get_host_from_settings(self, index, variables=None): url = server['url'] # go through variables and replace placeholders - for variable_name, variable in server['variables'].items(): + for variable_name, variable in server.get('variables', {}).items(): used_value = variables.get( variable_name, variable['default_value']) @@ -403,3 +479,14 @@ def get_host_from_settings(self, index, variables=None): url = url.replace("{" + variable_name + "}", used_value) return url + + @property + def host(self): + """Return generated host.""" + return self.get_host_from_settings(self.server_index, variables=self.server_variables) + + @host.setter + def host(self, value): + """Fix base path.""" + self._base_path = value + self.server_index = None diff --git a/kubernetes/client/exceptions.py b/kubernetes/client/exceptions.py index 7274cbdf5d..d68d48c6b4 100644 --- a/kubernetes/client/exceptions.py +++ b/kubernetes/client/exceptions.py @@ -5,7 +5,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ @@ -64,6 +64,25 @@ def __init__(self, msg, path_to_item=None): super(ApiValueError, self).__init__(full_msg) +class ApiAttributeError(OpenApiException, AttributeError): + def __init__(self, msg, path_to_item=None): + """ + Raised when an attribute reference or assignment fails. + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiAttributeError, self).__init__(full_msg) + + class ApiKeyError(OpenApiException, KeyError): def __init__(self, msg, path_to_item=None): """ @@ -109,6 +128,30 @@ def __str__(self): return error_message +class NotFoundException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(NotFoundException, self).__init__(status, reason, http_resp) + + +class UnauthorizedException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(UnauthorizedException, self).__init__(status, reason, http_resp) + + +class ForbiddenException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(ForbiddenException, self).__init__(status, reason, http_resp) + + +class ServiceException(ApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + super(ServiceException, self).__init__(status, reason, http_resp) + + def render_path(path_to_item): """Returns a string representation of a path""" result = "" diff --git a/kubernetes/client/models/__init__.py b/kubernetes/client/models/__init__.py index 6632e67dbb..20e78571ac 100644 --- a/kubernetes/client/models/__init__.py +++ b/kubernetes/client/models/__init__.py @@ -6,7 +6,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ @@ -24,12 +24,14 @@ from kubernetes.client.models.core_v1_event import CoreV1Event from kubernetes.client.models.core_v1_event_list import CoreV1EventList from kubernetes.client.models.core_v1_event_series import CoreV1EventSeries +from kubernetes.client.models.core_v1_resource_claim import CoreV1ResourceClaim from kubernetes.client.models.discovery_v1_endpoint_port import DiscoveryV1EndpointPort from kubernetes.client.models.events_v1_event import EventsV1Event from kubernetes.client.models.events_v1_event_list import EventsV1EventList from kubernetes.client.models.events_v1_event_series import EventsV1EventSeries from kubernetes.client.models.flowcontrol_v1_subject import FlowcontrolV1Subject from kubernetes.client.models.rbac_v1_subject import RbacV1Subject +from kubernetes.client.models.resource_v1_resource_claim import ResourceV1ResourceClaim from kubernetes.client.models.storage_v1_token_request import StorageV1TokenRequest from kubernetes.client.models.v1_api_group import V1APIGroup from kubernetes.client.models.v1_api_group_list import V1APIGroupList @@ -44,6 +46,8 @@ from kubernetes.client.models.v1_aws_elastic_block_store_volume_source import V1AWSElasticBlockStoreVolumeSource from kubernetes.client.models.v1_affinity import V1Affinity from kubernetes.client.models.v1_aggregation_rule import V1AggregationRule +from kubernetes.client.models.v1_allocated_device_status import V1AllocatedDeviceStatus +from kubernetes.client.models.v1_allocation_result import V1AllocationResult from kubernetes.client.models.v1_app_armor_profile import V1AppArmorProfile from kubernetes.client.models.v1_attached_volume import V1AttachedVolume from kubernetes.client.models.v1_audit_annotation import V1AuditAnnotation @@ -52,6 +56,7 @@ from kubernetes.client.models.v1_azure_file_volume_source import V1AzureFileVolumeSource from kubernetes.client.models.v1_binding import V1Binding from kubernetes.client.models.v1_bound_object_reference import V1BoundObjectReference +from kubernetes.client.models.v1_cel_device_selector import V1CELDeviceSelector from kubernetes.client.models.v1_csi_driver import V1CSIDriver from kubernetes.client.models.v1_csi_driver_list import V1CSIDriverList from kubernetes.client.models.v1_csi_driver_spec import V1CSIDriverSpec @@ -64,6 +69,9 @@ from kubernetes.client.models.v1_csi_storage_capacity_list import V1CSIStorageCapacityList from kubernetes.client.models.v1_csi_volume_source import V1CSIVolumeSource from kubernetes.client.models.v1_capabilities import V1Capabilities +from kubernetes.client.models.v1_capacity_request_policy import V1CapacityRequestPolicy +from kubernetes.client.models.v1_capacity_request_policy_range import V1CapacityRequestPolicyRange +from kubernetes.client.models.v1_capacity_requirements import V1CapacityRequirements from kubernetes.client.models.v1_ceph_fs_persistent_volume_source import V1CephFSPersistentVolumeSource from kubernetes.client.models.v1_ceph_fs_volume_source import V1CephFSVolumeSource from kubernetes.client.models.v1_certificate_signing_request import V1CertificateSigningRequest @@ -73,7 +81,6 @@ from kubernetes.client.models.v1_certificate_signing_request_status import V1CertificateSigningRequestStatus from kubernetes.client.models.v1_cinder_persistent_volume_source import V1CinderPersistentVolumeSource from kubernetes.client.models.v1_cinder_volume_source import V1CinderVolumeSource -from kubernetes.client.models.v1_claim_source import V1ClaimSource from kubernetes.client.models.v1_client_ip_config import V1ClientIPConfig from kubernetes.client.models.v1_cluster_role import V1ClusterRole from kubernetes.client.models.v1_cluster_role_binding import V1ClusterRoleBinding @@ -92,16 +99,22 @@ from kubernetes.client.models.v1_config_map_projection import V1ConfigMapProjection from kubernetes.client.models.v1_config_map_volume_source import V1ConfigMapVolumeSource from kubernetes.client.models.v1_container import V1Container +from kubernetes.client.models.v1_container_extended_resource_request import V1ContainerExtendedResourceRequest from kubernetes.client.models.v1_container_image import V1ContainerImage from kubernetes.client.models.v1_container_port import V1ContainerPort from kubernetes.client.models.v1_container_resize_policy import V1ContainerResizePolicy +from kubernetes.client.models.v1_container_restart_rule import V1ContainerRestartRule +from kubernetes.client.models.v1_container_restart_rule_on_exit_codes import V1ContainerRestartRuleOnExitCodes from kubernetes.client.models.v1_container_state import V1ContainerState from kubernetes.client.models.v1_container_state_running import V1ContainerStateRunning from kubernetes.client.models.v1_container_state_terminated import V1ContainerStateTerminated from kubernetes.client.models.v1_container_state_waiting import V1ContainerStateWaiting from kubernetes.client.models.v1_container_status import V1ContainerStatus +from kubernetes.client.models.v1_container_user import V1ContainerUser from kubernetes.client.models.v1_controller_revision import V1ControllerRevision from kubernetes.client.models.v1_controller_revision_list import V1ControllerRevisionList +from kubernetes.client.models.v1_counter import V1Counter +from kubernetes.client.models.v1_counter_set import V1CounterSet from kubernetes.client.models.v1_cron_job import V1CronJob from kubernetes.client.models.v1_cron_job_list import V1CronJobList from kubernetes.client.models.v1_cron_job_spec import V1CronJobSpec @@ -133,6 +146,25 @@ from kubernetes.client.models.v1_deployment_spec import V1DeploymentSpec from kubernetes.client.models.v1_deployment_status import V1DeploymentStatus from kubernetes.client.models.v1_deployment_strategy import V1DeploymentStrategy +from kubernetes.client.models.v1_device import V1Device +from kubernetes.client.models.v1_device_allocation_configuration import V1DeviceAllocationConfiguration +from kubernetes.client.models.v1_device_allocation_result import V1DeviceAllocationResult +from kubernetes.client.models.v1_device_attribute import V1DeviceAttribute +from kubernetes.client.models.v1_device_capacity import V1DeviceCapacity +from kubernetes.client.models.v1_device_claim import V1DeviceClaim +from kubernetes.client.models.v1_device_claim_configuration import V1DeviceClaimConfiguration +from kubernetes.client.models.v1_device_class import V1DeviceClass +from kubernetes.client.models.v1_device_class_configuration import V1DeviceClassConfiguration +from kubernetes.client.models.v1_device_class_list import V1DeviceClassList +from kubernetes.client.models.v1_device_class_spec import V1DeviceClassSpec +from kubernetes.client.models.v1_device_constraint import V1DeviceConstraint +from kubernetes.client.models.v1_device_counter_consumption import V1DeviceCounterConsumption +from kubernetes.client.models.v1_device_request import V1DeviceRequest +from kubernetes.client.models.v1_device_request_allocation_result import V1DeviceRequestAllocationResult +from kubernetes.client.models.v1_device_selector import V1DeviceSelector +from kubernetes.client.models.v1_device_sub_request import V1DeviceSubRequest +from kubernetes.client.models.v1_device_taint import V1DeviceTaint +from kubernetes.client.models.v1_device_toleration import V1DeviceToleration from kubernetes.client.models.v1_downward_api_projection import V1DownwardAPIProjection from kubernetes.client.models.v1_downward_api_volume_file import V1DownwardAPIVolumeFile from kubernetes.client.models.v1_downward_api_volume_source import V1DownwardAPIVolumeSource @@ -153,11 +185,15 @@ from kubernetes.client.models.v1_ephemeral_volume_source import V1EphemeralVolumeSource from kubernetes.client.models.v1_event_source import V1EventSource from kubernetes.client.models.v1_eviction import V1Eviction +from kubernetes.client.models.v1_exact_device_request import V1ExactDeviceRequest from kubernetes.client.models.v1_exec_action import V1ExecAction from kubernetes.client.models.v1_exempt_priority_level_configuration import V1ExemptPriorityLevelConfiguration from kubernetes.client.models.v1_expression_warning import V1ExpressionWarning from kubernetes.client.models.v1_external_documentation import V1ExternalDocumentation from kubernetes.client.models.v1_fc_volume_source import V1FCVolumeSource +from kubernetes.client.models.v1_field_selector_attributes import V1FieldSelectorAttributes +from kubernetes.client.models.v1_field_selector_requirement import V1FieldSelectorRequirement +from kubernetes.client.models.v1_file_key_selector import V1FileKeySelector from kubernetes.client.models.v1_flex_persistent_volume_source import V1FlexPersistentVolumeSource from kubernetes.client.models.v1_flex_volume_source import V1FlexVolumeSource from kubernetes.client.models.v1_flocker_volume_source import V1FlockerVolumeSource @@ -167,12 +203,14 @@ from kubernetes.client.models.v1_flow_schema_list import V1FlowSchemaList from kubernetes.client.models.v1_flow_schema_spec import V1FlowSchemaSpec from kubernetes.client.models.v1_flow_schema_status import V1FlowSchemaStatus +from kubernetes.client.models.v1_for_node import V1ForNode from kubernetes.client.models.v1_for_zone import V1ForZone from kubernetes.client.models.v1_gce_persistent_disk_volume_source import V1GCEPersistentDiskVolumeSource from kubernetes.client.models.v1_grpc_action import V1GRPCAction from kubernetes.client.models.v1_git_repo_volume_source import V1GitRepoVolumeSource from kubernetes.client.models.v1_glusterfs_persistent_volume_source import V1GlusterfsPersistentVolumeSource from kubernetes.client.models.v1_glusterfs_volume_source import V1GlusterfsVolumeSource +from kubernetes.client.models.v1_group_resource import V1GroupResource from kubernetes.client.models.v1_group_subject import V1GroupSubject from kubernetes.client.models.v1_group_version_for_discovery import V1GroupVersionForDiscovery from kubernetes.client.models.v1_http_get_action import V1HTTPGetAction @@ -186,9 +224,13 @@ from kubernetes.client.models.v1_host_alias import V1HostAlias from kubernetes.client.models.v1_host_ip import V1HostIP from kubernetes.client.models.v1_host_path_volume_source import V1HostPathVolumeSource +from kubernetes.client.models.v1_ip_address import V1IPAddress +from kubernetes.client.models.v1_ip_address_list import V1IPAddressList +from kubernetes.client.models.v1_ip_address_spec import V1IPAddressSpec from kubernetes.client.models.v1_ip_block import V1IPBlock from kubernetes.client.models.v1_iscsi_persistent_volume_source import V1ISCSIPersistentVolumeSource from kubernetes.client.models.v1_iscsi_volume_source import V1ISCSIVolumeSource +from kubernetes.client.models.v1_image_volume_source import V1ImageVolumeSource from kubernetes.client.models.v1_ingress import V1Ingress from kubernetes.client.models.v1_ingress_backend import V1IngressBackend from kubernetes.client.models.v1_ingress_class import V1IngressClass @@ -213,6 +255,7 @@ from kubernetes.client.models.v1_job_template_spec import V1JobTemplateSpec from kubernetes.client.models.v1_key_to_path import V1KeyToPath from kubernetes.client.models.v1_label_selector import V1LabelSelector +from kubernetes.client.models.v1_label_selector_attributes import V1LabelSelectorAttributes from kubernetes.client.models.v1_label_selector_requirement import V1LabelSelectorRequirement from kubernetes.client.models.v1_lease import V1Lease from kubernetes.client.models.v1_lease_list import V1LeaseList @@ -225,6 +268,7 @@ from kubernetes.client.models.v1_limit_range_spec import V1LimitRangeSpec from kubernetes.client.models.v1_limit_response import V1LimitResponse from kubernetes.client.models.v1_limited_priority_level_configuration import V1LimitedPriorityLevelConfiguration +from kubernetes.client.models.v1_linux_container_user import V1LinuxContainerUser from kubernetes.client.models.v1_list_meta import V1ListMeta from kubernetes.client.models.v1_load_balancer_ingress import V1LoadBalancerIngress from kubernetes.client.models.v1_load_balancer_status import V1LoadBalancerStatus @@ -245,6 +289,7 @@ from kubernetes.client.models.v1_namespace_list import V1NamespaceList from kubernetes.client.models.v1_namespace_spec import V1NamespaceSpec from kubernetes.client.models.v1_namespace_status import V1NamespaceStatus +from kubernetes.client.models.v1_network_device_data import V1NetworkDeviceData from kubernetes.client.models.v1_network_policy import V1NetworkPolicy from kubernetes.client.models.v1_network_policy_egress_rule import V1NetworkPolicyEgressRule from kubernetes.client.models.v1_network_policy_ingress_rule import V1NetworkPolicyIngressRule @@ -259,6 +304,7 @@ from kubernetes.client.models.v1_node_config_source import V1NodeConfigSource from kubernetes.client.models.v1_node_config_status import V1NodeConfigStatus from kubernetes.client.models.v1_node_daemon_endpoints import V1NodeDaemonEndpoints +from kubernetes.client.models.v1_node_features import V1NodeFeatures from kubernetes.client.models.v1_node_list import V1NodeList from kubernetes.client.models.v1_node_runtime_handler import V1NodeRuntimeHandler from kubernetes.client.models.v1_node_runtime_handler_features import V1NodeRuntimeHandlerFeatures @@ -267,6 +313,7 @@ from kubernetes.client.models.v1_node_selector_term import V1NodeSelectorTerm from kubernetes.client.models.v1_node_spec import V1NodeSpec from kubernetes.client.models.v1_node_status import V1NodeStatus +from kubernetes.client.models.v1_node_swap_status import V1NodeSwapStatus from kubernetes.client.models.v1_node_system_info import V1NodeSystemInfo from kubernetes.client.models.v1_non_resource_attributes import V1NonResourceAttributes from kubernetes.client.models.v1_non_resource_policy_rule import V1NonResourcePolicyRule @@ -274,10 +321,12 @@ from kubernetes.client.models.v1_object_field_selector import V1ObjectFieldSelector from kubernetes.client.models.v1_object_meta import V1ObjectMeta from kubernetes.client.models.v1_object_reference import V1ObjectReference +from kubernetes.client.models.v1_opaque_device_configuration import V1OpaqueDeviceConfiguration from kubernetes.client.models.v1_overhead import V1Overhead from kubernetes.client.models.v1_owner_reference import V1OwnerReference from kubernetes.client.models.v1_param_kind import V1ParamKind from kubernetes.client.models.v1_param_ref import V1ParamRef +from kubernetes.client.models.v1_parent_reference import V1ParentReference from kubernetes.client.models.v1_persistent_volume import V1PersistentVolume from kubernetes.client.models.v1_persistent_volume_claim import V1PersistentVolumeClaim from kubernetes.client.models.v1_persistent_volume_claim_condition import V1PersistentVolumeClaimCondition @@ -294,6 +343,7 @@ from kubernetes.client.models.v1_pod_affinity import V1PodAffinity from kubernetes.client.models.v1_pod_affinity_term import V1PodAffinityTerm from kubernetes.client.models.v1_pod_anti_affinity import V1PodAntiAffinity +from kubernetes.client.models.v1_pod_certificate_projection import V1PodCertificateProjection from kubernetes.client.models.v1_pod_condition import V1PodCondition from kubernetes.client.models.v1_pod_dns_config import V1PodDNSConfig from kubernetes.client.models.v1_pod_dns_config_option import V1PodDNSConfigOption @@ -301,6 +351,7 @@ from kubernetes.client.models.v1_pod_disruption_budget_list import V1PodDisruptionBudgetList from kubernetes.client.models.v1_pod_disruption_budget_spec import V1PodDisruptionBudgetSpec from kubernetes.client.models.v1_pod_disruption_budget_status import V1PodDisruptionBudgetStatus +from kubernetes.client.models.v1_pod_extended_resource_claim_status import V1PodExtendedResourceClaimStatus from kubernetes.client.models.v1_pod_failure_policy import V1PodFailurePolicy from kubernetes.client.models.v1_pod_failure_policy_on_exit_codes_requirement import V1PodFailurePolicyOnExitCodesRequirement from kubernetes.client.models.v1_pod_failure_policy_on_pod_conditions_pattern import V1PodFailurePolicyOnPodConditionsPattern @@ -349,15 +400,27 @@ from kubernetes.client.models.v1_replication_controller_spec import V1ReplicationControllerSpec from kubernetes.client.models.v1_replication_controller_status import V1ReplicationControllerStatus from kubernetes.client.models.v1_resource_attributes import V1ResourceAttributes -from kubernetes.client.models.v1_resource_claim import V1ResourceClaim +from kubernetes.client.models.v1_resource_claim_consumer_reference import V1ResourceClaimConsumerReference +from kubernetes.client.models.v1_resource_claim_list import V1ResourceClaimList +from kubernetes.client.models.v1_resource_claim_spec import V1ResourceClaimSpec +from kubernetes.client.models.v1_resource_claim_status import V1ResourceClaimStatus +from kubernetes.client.models.v1_resource_claim_template import V1ResourceClaimTemplate +from kubernetes.client.models.v1_resource_claim_template_list import V1ResourceClaimTemplateList +from kubernetes.client.models.v1_resource_claim_template_spec import V1ResourceClaimTemplateSpec from kubernetes.client.models.v1_resource_field_selector import V1ResourceFieldSelector +from kubernetes.client.models.v1_resource_health import V1ResourceHealth from kubernetes.client.models.v1_resource_policy_rule import V1ResourcePolicyRule +from kubernetes.client.models.v1_resource_pool import V1ResourcePool from kubernetes.client.models.v1_resource_quota import V1ResourceQuota from kubernetes.client.models.v1_resource_quota_list import V1ResourceQuotaList from kubernetes.client.models.v1_resource_quota_spec import V1ResourceQuotaSpec from kubernetes.client.models.v1_resource_quota_status import V1ResourceQuotaStatus from kubernetes.client.models.v1_resource_requirements import V1ResourceRequirements from kubernetes.client.models.v1_resource_rule import V1ResourceRule +from kubernetes.client.models.v1_resource_slice import V1ResourceSlice +from kubernetes.client.models.v1_resource_slice_list import V1ResourceSliceList +from kubernetes.client.models.v1_resource_slice_spec import V1ResourceSliceSpec +from kubernetes.client.models.v1_resource_status import V1ResourceStatus from kubernetes.client.models.v1_role import V1Role from kubernetes.client.models.v1_role_binding import V1RoleBinding from kubernetes.client.models.v1_role_binding_list import V1RoleBindingList @@ -401,6 +464,10 @@ from kubernetes.client.models.v1_service_account_subject import V1ServiceAccountSubject from kubernetes.client.models.v1_service_account_token_projection import V1ServiceAccountTokenProjection from kubernetes.client.models.v1_service_backend_port import V1ServiceBackendPort +from kubernetes.client.models.v1_service_cidr import V1ServiceCIDR +from kubernetes.client.models.v1_service_cidr_list import V1ServiceCIDRList +from kubernetes.client.models.v1_service_cidr_spec import V1ServiceCIDRSpec +from kubernetes.client.models.v1_service_cidr_status import V1ServiceCIDRStatus from kubernetes.client.models.v1_service_list import V1ServiceList from kubernetes.client.models.v1_service_port import V1ServicePort from kubernetes.client.models.v1_service_spec import V1ServiceSpec @@ -465,6 +532,8 @@ from kubernetes.client.models.v1_volume_attachment_source import V1VolumeAttachmentSource from kubernetes.client.models.v1_volume_attachment_spec import V1VolumeAttachmentSpec from kubernetes.client.models.v1_volume_attachment_status import V1VolumeAttachmentStatus +from kubernetes.client.models.v1_volume_attributes_class import V1VolumeAttributesClass +from kubernetes.client.models.v1_volume_attributes_class_list import V1VolumeAttributesClassList from kubernetes.client.models.v1_volume_device import V1VolumeDevice from kubernetes.client.models.v1_volume_error import V1VolumeError from kubernetes.client.models.v1_volume_mount import V1VolumeMount @@ -478,130 +547,174 @@ from kubernetes.client.models.v1_webhook_conversion import V1WebhookConversion from kubernetes.client.models.v1_weighted_pod_affinity_term import V1WeightedPodAffinityTerm from kubernetes.client.models.v1_windows_security_context_options import V1WindowsSecurityContextOptions -from kubernetes.client.models.v1alpha1_audit_annotation import V1alpha1AuditAnnotation +from kubernetes.client.models.v1_workload_reference import V1WorkloadReference +from kubernetes.client.models.v1alpha1_apply_configuration import V1alpha1ApplyConfiguration from kubernetes.client.models.v1alpha1_cluster_trust_bundle import V1alpha1ClusterTrustBundle from kubernetes.client.models.v1alpha1_cluster_trust_bundle_list import V1alpha1ClusterTrustBundleList from kubernetes.client.models.v1alpha1_cluster_trust_bundle_spec import V1alpha1ClusterTrustBundleSpec -from kubernetes.client.models.v1alpha1_expression_warning import V1alpha1ExpressionWarning -from kubernetes.client.models.v1alpha1_group_version_resource import V1alpha1GroupVersionResource -from kubernetes.client.models.v1alpha1_ip_address import V1alpha1IPAddress -from kubernetes.client.models.v1alpha1_ip_address_list import V1alpha1IPAddressList -from kubernetes.client.models.v1alpha1_ip_address_spec import V1alpha1IPAddressSpec +from kubernetes.client.models.v1alpha1_gang_scheduling_policy import V1alpha1GangSchedulingPolicy +from kubernetes.client.models.v1alpha1_json_patch import V1alpha1JSONPatch from kubernetes.client.models.v1alpha1_match_condition import V1alpha1MatchCondition from kubernetes.client.models.v1alpha1_match_resources import V1alpha1MatchResources -from kubernetes.client.models.v1alpha1_migration_condition import V1alpha1MigrationCondition +from kubernetes.client.models.v1alpha1_mutating_admission_policy import V1alpha1MutatingAdmissionPolicy +from kubernetes.client.models.v1alpha1_mutating_admission_policy_binding import V1alpha1MutatingAdmissionPolicyBinding +from kubernetes.client.models.v1alpha1_mutating_admission_policy_binding_list import V1alpha1MutatingAdmissionPolicyBindingList +from kubernetes.client.models.v1alpha1_mutating_admission_policy_binding_spec import V1alpha1MutatingAdmissionPolicyBindingSpec +from kubernetes.client.models.v1alpha1_mutating_admission_policy_list import V1alpha1MutatingAdmissionPolicyList +from kubernetes.client.models.v1alpha1_mutating_admission_policy_spec import V1alpha1MutatingAdmissionPolicySpec +from kubernetes.client.models.v1alpha1_mutation import V1alpha1Mutation from kubernetes.client.models.v1alpha1_named_rule_with_operations import V1alpha1NamedRuleWithOperations from kubernetes.client.models.v1alpha1_param_kind import V1alpha1ParamKind from kubernetes.client.models.v1alpha1_param_ref import V1alpha1ParamRef -from kubernetes.client.models.v1alpha1_parent_reference import V1alpha1ParentReference -from kubernetes.client.models.v1alpha1_self_subject_review import V1alpha1SelfSubjectReview -from kubernetes.client.models.v1alpha1_self_subject_review_status import V1alpha1SelfSubjectReviewStatus +from kubernetes.client.models.v1alpha1_pod_group import V1alpha1PodGroup +from kubernetes.client.models.v1alpha1_pod_group_policy import V1alpha1PodGroupPolicy from kubernetes.client.models.v1alpha1_server_storage_version import V1alpha1ServerStorageVersion -from kubernetes.client.models.v1alpha1_service_cidr import V1alpha1ServiceCIDR -from kubernetes.client.models.v1alpha1_service_cidr_list import V1alpha1ServiceCIDRList -from kubernetes.client.models.v1alpha1_service_cidr_spec import V1alpha1ServiceCIDRSpec -from kubernetes.client.models.v1alpha1_service_cidr_status import V1alpha1ServiceCIDRStatus from kubernetes.client.models.v1alpha1_storage_version import V1alpha1StorageVersion from kubernetes.client.models.v1alpha1_storage_version_condition import V1alpha1StorageVersionCondition from kubernetes.client.models.v1alpha1_storage_version_list import V1alpha1StorageVersionList -from kubernetes.client.models.v1alpha1_storage_version_migration import V1alpha1StorageVersionMigration -from kubernetes.client.models.v1alpha1_storage_version_migration_list import V1alpha1StorageVersionMigrationList -from kubernetes.client.models.v1alpha1_storage_version_migration_spec import V1alpha1StorageVersionMigrationSpec -from kubernetes.client.models.v1alpha1_storage_version_migration_status import V1alpha1StorageVersionMigrationStatus from kubernetes.client.models.v1alpha1_storage_version_status import V1alpha1StorageVersionStatus -from kubernetes.client.models.v1alpha1_type_checking import V1alpha1TypeChecking -from kubernetes.client.models.v1alpha1_validating_admission_policy import V1alpha1ValidatingAdmissionPolicy -from kubernetes.client.models.v1alpha1_validating_admission_policy_binding import V1alpha1ValidatingAdmissionPolicyBinding -from kubernetes.client.models.v1alpha1_validating_admission_policy_binding_list import V1alpha1ValidatingAdmissionPolicyBindingList -from kubernetes.client.models.v1alpha1_validating_admission_policy_binding_spec import V1alpha1ValidatingAdmissionPolicyBindingSpec -from kubernetes.client.models.v1alpha1_validating_admission_policy_list import V1alpha1ValidatingAdmissionPolicyList -from kubernetes.client.models.v1alpha1_validating_admission_policy_spec import V1alpha1ValidatingAdmissionPolicySpec -from kubernetes.client.models.v1alpha1_validating_admission_policy_status import V1alpha1ValidatingAdmissionPolicyStatus -from kubernetes.client.models.v1alpha1_validation import V1alpha1Validation +from kubernetes.client.models.v1alpha1_typed_local_object_reference import V1alpha1TypedLocalObjectReference from kubernetes.client.models.v1alpha1_variable import V1alpha1Variable -from kubernetes.client.models.v1alpha1_volume_attributes_class import V1alpha1VolumeAttributesClass -from kubernetes.client.models.v1alpha1_volume_attributes_class_list import V1alpha1VolumeAttributesClassList -from kubernetes.client.models.v1alpha2_allocation_result import V1alpha2AllocationResult -from kubernetes.client.models.v1alpha2_driver_allocation_result import V1alpha2DriverAllocationResult -from kubernetes.client.models.v1alpha2_driver_requests import V1alpha2DriverRequests -from kubernetes.client.models.v1alpha2_named_resources_allocation_result import V1alpha2NamedResourcesAllocationResult -from kubernetes.client.models.v1alpha2_named_resources_attribute import V1alpha2NamedResourcesAttribute -from kubernetes.client.models.v1alpha2_named_resources_filter import V1alpha2NamedResourcesFilter -from kubernetes.client.models.v1alpha2_named_resources_instance import V1alpha2NamedResourcesInstance -from kubernetes.client.models.v1alpha2_named_resources_int_slice import V1alpha2NamedResourcesIntSlice -from kubernetes.client.models.v1alpha2_named_resources_request import V1alpha2NamedResourcesRequest -from kubernetes.client.models.v1alpha2_named_resources_resources import V1alpha2NamedResourcesResources -from kubernetes.client.models.v1alpha2_named_resources_string_slice import V1alpha2NamedResourcesStringSlice -from kubernetes.client.models.v1alpha2_pod_scheduling_context import V1alpha2PodSchedulingContext -from kubernetes.client.models.v1alpha2_pod_scheduling_context_list import V1alpha2PodSchedulingContextList -from kubernetes.client.models.v1alpha2_pod_scheduling_context_spec import V1alpha2PodSchedulingContextSpec -from kubernetes.client.models.v1alpha2_pod_scheduling_context_status import V1alpha2PodSchedulingContextStatus -from kubernetes.client.models.v1alpha2_resource_claim import V1alpha2ResourceClaim -from kubernetes.client.models.v1alpha2_resource_claim_consumer_reference import V1alpha2ResourceClaimConsumerReference -from kubernetes.client.models.v1alpha2_resource_claim_list import V1alpha2ResourceClaimList -from kubernetes.client.models.v1alpha2_resource_claim_parameters import V1alpha2ResourceClaimParameters -from kubernetes.client.models.v1alpha2_resource_claim_parameters_list import V1alpha2ResourceClaimParametersList -from kubernetes.client.models.v1alpha2_resource_claim_parameters_reference import V1alpha2ResourceClaimParametersReference -from kubernetes.client.models.v1alpha2_resource_claim_scheduling_status import V1alpha2ResourceClaimSchedulingStatus -from kubernetes.client.models.v1alpha2_resource_claim_spec import V1alpha2ResourceClaimSpec -from kubernetes.client.models.v1alpha2_resource_claim_status import V1alpha2ResourceClaimStatus -from kubernetes.client.models.v1alpha2_resource_claim_template import V1alpha2ResourceClaimTemplate -from kubernetes.client.models.v1alpha2_resource_claim_template_list import V1alpha2ResourceClaimTemplateList -from kubernetes.client.models.v1alpha2_resource_claim_template_spec import V1alpha2ResourceClaimTemplateSpec -from kubernetes.client.models.v1alpha2_resource_class import V1alpha2ResourceClass -from kubernetes.client.models.v1alpha2_resource_class_list import V1alpha2ResourceClassList -from kubernetes.client.models.v1alpha2_resource_class_parameters import V1alpha2ResourceClassParameters -from kubernetes.client.models.v1alpha2_resource_class_parameters_list import V1alpha2ResourceClassParametersList -from kubernetes.client.models.v1alpha2_resource_class_parameters_reference import V1alpha2ResourceClassParametersReference -from kubernetes.client.models.v1alpha2_resource_filter import V1alpha2ResourceFilter -from kubernetes.client.models.v1alpha2_resource_handle import V1alpha2ResourceHandle -from kubernetes.client.models.v1alpha2_resource_request import V1alpha2ResourceRequest -from kubernetes.client.models.v1alpha2_resource_slice import V1alpha2ResourceSlice -from kubernetes.client.models.v1alpha2_resource_slice_list import V1alpha2ResourceSliceList -from kubernetes.client.models.v1alpha2_structured_resource_handle import V1alpha2StructuredResourceHandle -from kubernetes.client.models.v1alpha2_vendor_parameters import V1alpha2VendorParameters -from kubernetes.client.models.v1beta1_audit_annotation import V1beta1AuditAnnotation -from kubernetes.client.models.v1beta1_expression_warning import V1beta1ExpressionWarning +from kubernetes.client.models.v1alpha1_workload import V1alpha1Workload +from kubernetes.client.models.v1alpha1_workload_list import V1alpha1WorkloadList +from kubernetes.client.models.v1alpha1_workload_spec import V1alpha1WorkloadSpec +from kubernetes.client.models.v1alpha2_lease_candidate import V1alpha2LeaseCandidate +from kubernetes.client.models.v1alpha2_lease_candidate_list import V1alpha2LeaseCandidateList +from kubernetes.client.models.v1alpha2_lease_candidate_spec import V1alpha2LeaseCandidateSpec +from kubernetes.client.models.v1alpha3_device_taint import V1alpha3DeviceTaint +from kubernetes.client.models.v1alpha3_device_taint_rule import V1alpha3DeviceTaintRule +from kubernetes.client.models.v1alpha3_device_taint_rule_list import V1alpha3DeviceTaintRuleList +from kubernetes.client.models.v1alpha3_device_taint_rule_spec import V1alpha3DeviceTaintRuleSpec +from kubernetes.client.models.v1alpha3_device_taint_rule_status import V1alpha3DeviceTaintRuleStatus +from kubernetes.client.models.v1alpha3_device_taint_selector import V1alpha3DeviceTaintSelector +from kubernetes.client.models.v1beta1_allocated_device_status import V1beta1AllocatedDeviceStatus +from kubernetes.client.models.v1beta1_allocation_result import V1beta1AllocationResult +from kubernetes.client.models.v1beta1_apply_configuration import V1beta1ApplyConfiguration +from kubernetes.client.models.v1beta1_basic_device import V1beta1BasicDevice +from kubernetes.client.models.v1beta1_cel_device_selector import V1beta1CELDeviceSelector +from kubernetes.client.models.v1beta1_capacity_request_policy import V1beta1CapacityRequestPolicy +from kubernetes.client.models.v1beta1_capacity_request_policy_range import V1beta1CapacityRequestPolicyRange +from kubernetes.client.models.v1beta1_capacity_requirements import V1beta1CapacityRequirements +from kubernetes.client.models.v1beta1_cluster_trust_bundle import V1beta1ClusterTrustBundle +from kubernetes.client.models.v1beta1_cluster_trust_bundle_list import V1beta1ClusterTrustBundleList +from kubernetes.client.models.v1beta1_cluster_trust_bundle_spec import V1beta1ClusterTrustBundleSpec +from kubernetes.client.models.v1beta1_counter import V1beta1Counter +from kubernetes.client.models.v1beta1_counter_set import V1beta1CounterSet +from kubernetes.client.models.v1beta1_device import V1beta1Device +from kubernetes.client.models.v1beta1_device_allocation_configuration import V1beta1DeviceAllocationConfiguration +from kubernetes.client.models.v1beta1_device_allocation_result import V1beta1DeviceAllocationResult +from kubernetes.client.models.v1beta1_device_attribute import V1beta1DeviceAttribute +from kubernetes.client.models.v1beta1_device_capacity import V1beta1DeviceCapacity +from kubernetes.client.models.v1beta1_device_claim import V1beta1DeviceClaim +from kubernetes.client.models.v1beta1_device_claim_configuration import V1beta1DeviceClaimConfiguration +from kubernetes.client.models.v1beta1_device_class import V1beta1DeviceClass +from kubernetes.client.models.v1beta1_device_class_configuration import V1beta1DeviceClassConfiguration +from kubernetes.client.models.v1beta1_device_class_list import V1beta1DeviceClassList +from kubernetes.client.models.v1beta1_device_class_spec import V1beta1DeviceClassSpec +from kubernetes.client.models.v1beta1_device_constraint import V1beta1DeviceConstraint +from kubernetes.client.models.v1beta1_device_counter_consumption import V1beta1DeviceCounterConsumption +from kubernetes.client.models.v1beta1_device_request import V1beta1DeviceRequest +from kubernetes.client.models.v1beta1_device_request_allocation_result import V1beta1DeviceRequestAllocationResult +from kubernetes.client.models.v1beta1_device_selector import V1beta1DeviceSelector +from kubernetes.client.models.v1beta1_device_sub_request import V1beta1DeviceSubRequest +from kubernetes.client.models.v1beta1_device_taint import V1beta1DeviceTaint +from kubernetes.client.models.v1beta1_device_toleration import V1beta1DeviceToleration +from kubernetes.client.models.v1beta1_ip_address import V1beta1IPAddress +from kubernetes.client.models.v1beta1_ip_address_list import V1beta1IPAddressList +from kubernetes.client.models.v1beta1_ip_address_spec import V1beta1IPAddressSpec +from kubernetes.client.models.v1beta1_json_patch import V1beta1JSONPatch +from kubernetes.client.models.v1beta1_lease_candidate import V1beta1LeaseCandidate +from kubernetes.client.models.v1beta1_lease_candidate_list import V1beta1LeaseCandidateList +from kubernetes.client.models.v1beta1_lease_candidate_spec import V1beta1LeaseCandidateSpec from kubernetes.client.models.v1beta1_match_condition import V1beta1MatchCondition from kubernetes.client.models.v1beta1_match_resources import V1beta1MatchResources +from kubernetes.client.models.v1beta1_mutating_admission_policy import V1beta1MutatingAdmissionPolicy +from kubernetes.client.models.v1beta1_mutating_admission_policy_binding import V1beta1MutatingAdmissionPolicyBinding +from kubernetes.client.models.v1beta1_mutating_admission_policy_binding_list import V1beta1MutatingAdmissionPolicyBindingList +from kubernetes.client.models.v1beta1_mutating_admission_policy_binding_spec import V1beta1MutatingAdmissionPolicyBindingSpec +from kubernetes.client.models.v1beta1_mutating_admission_policy_list import V1beta1MutatingAdmissionPolicyList +from kubernetes.client.models.v1beta1_mutating_admission_policy_spec import V1beta1MutatingAdmissionPolicySpec +from kubernetes.client.models.v1beta1_mutation import V1beta1Mutation from kubernetes.client.models.v1beta1_named_rule_with_operations import V1beta1NamedRuleWithOperations +from kubernetes.client.models.v1beta1_network_device_data import V1beta1NetworkDeviceData +from kubernetes.client.models.v1beta1_opaque_device_configuration import V1beta1OpaqueDeviceConfiguration from kubernetes.client.models.v1beta1_param_kind import V1beta1ParamKind from kubernetes.client.models.v1beta1_param_ref import V1beta1ParamRef -from kubernetes.client.models.v1beta1_self_subject_review import V1beta1SelfSubjectReview -from kubernetes.client.models.v1beta1_self_subject_review_status import V1beta1SelfSubjectReviewStatus -from kubernetes.client.models.v1beta1_type_checking import V1beta1TypeChecking -from kubernetes.client.models.v1beta1_validating_admission_policy import V1beta1ValidatingAdmissionPolicy -from kubernetes.client.models.v1beta1_validating_admission_policy_binding import V1beta1ValidatingAdmissionPolicyBinding -from kubernetes.client.models.v1beta1_validating_admission_policy_binding_list import V1beta1ValidatingAdmissionPolicyBindingList -from kubernetes.client.models.v1beta1_validating_admission_policy_binding_spec import V1beta1ValidatingAdmissionPolicyBindingSpec -from kubernetes.client.models.v1beta1_validating_admission_policy_list import V1beta1ValidatingAdmissionPolicyList -from kubernetes.client.models.v1beta1_validating_admission_policy_spec import V1beta1ValidatingAdmissionPolicySpec -from kubernetes.client.models.v1beta1_validating_admission_policy_status import V1beta1ValidatingAdmissionPolicyStatus -from kubernetes.client.models.v1beta1_validation import V1beta1Validation +from kubernetes.client.models.v1beta1_parent_reference import V1beta1ParentReference +from kubernetes.client.models.v1beta1_pod_certificate_request import V1beta1PodCertificateRequest +from kubernetes.client.models.v1beta1_pod_certificate_request_list import V1beta1PodCertificateRequestList +from kubernetes.client.models.v1beta1_pod_certificate_request_spec import V1beta1PodCertificateRequestSpec +from kubernetes.client.models.v1beta1_pod_certificate_request_status import V1beta1PodCertificateRequestStatus +from kubernetes.client.models.v1beta1_resource_claim import V1beta1ResourceClaim +from kubernetes.client.models.v1beta1_resource_claim_consumer_reference import V1beta1ResourceClaimConsumerReference +from kubernetes.client.models.v1beta1_resource_claim_list import V1beta1ResourceClaimList +from kubernetes.client.models.v1beta1_resource_claim_spec import V1beta1ResourceClaimSpec +from kubernetes.client.models.v1beta1_resource_claim_status import V1beta1ResourceClaimStatus +from kubernetes.client.models.v1beta1_resource_claim_template import V1beta1ResourceClaimTemplate +from kubernetes.client.models.v1beta1_resource_claim_template_list import V1beta1ResourceClaimTemplateList +from kubernetes.client.models.v1beta1_resource_claim_template_spec import V1beta1ResourceClaimTemplateSpec +from kubernetes.client.models.v1beta1_resource_pool import V1beta1ResourcePool +from kubernetes.client.models.v1beta1_resource_slice import V1beta1ResourceSlice +from kubernetes.client.models.v1beta1_resource_slice_list import V1beta1ResourceSliceList +from kubernetes.client.models.v1beta1_resource_slice_spec import V1beta1ResourceSliceSpec +from kubernetes.client.models.v1beta1_service_cidr import V1beta1ServiceCIDR +from kubernetes.client.models.v1beta1_service_cidr_list import V1beta1ServiceCIDRList +from kubernetes.client.models.v1beta1_service_cidr_spec import V1beta1ServiceCIDRSpec +from kubernetes.client.models.v1beta1_service_cidr_status import V1beta1ServiceCIDRStatus +from kubernetes.client.models.v1beta1_storage_version_migration import V1beta1StorageVersionMigration +from kubernetes.client.models.v1beta1_storage_version_migration_list import V1beta1StorageVersionMigrationList +from kubernetes.client.models.v1beta1_storage_version_migration_spec import V1beta1StorageVersionMigrationSpec +from kubernetes.client.models.v1beta1_storage_version_migration_status import V1beta1StorageVersionMigrationStatus from kubernetes.client.models.v1beta1_variable import V1beta1Variable -from kubernetes.client.models.v1beta3_exempt_priority_level_configuration import V1beta3ExemptPriorityLevelConfiguration -from kubernetes.client.models.v1beta3_flow_distinguisher_method import V1beta3FlowDistinguisherMethod -from kubernetes.client.models.v1beta3_flow_schema import V1beta3FlowSchema -from kubernetes.client.models.v1beta3_flow_schema_condition import V1beta3FlowSchemaCondition -from kubernetes.client.models.v1beta3_flow_schema_list import V1beta3FlowSchemaList -from kubernetes.client.models.v1beta3_flow_schema_spec import V1beta3FlowSchemaSpec -from kubernetes.client.models.v1beta3_flow_schema_status import V1beta3FlowSchemaStatus -from kubernetes.client.models.v1beta3_group_subject import V1beta3GroupSubject -from kubernetes.client.models.v1beta3_limit_response import V1beta3LimitResponse -from kubernetes.client.models.v1beta3_limited_priority_level_configuration import V1beta3LimitedPriorityLevelConfiguration -from kubernetes.client.models.v1beta3_non_resource_policy_rule import V1beta3NonResourcePolicyRule -from kubernetes.client.models.v1beta3_policy_rules_with_subjects import V1beta3PolicyRulesWithSubjects -from kubernetes.client.models.v1beta3_priority_level_configuration import V1beta3PriorityLevelConfiguration -from kubernetes.client.models.v1beta3_priority_level_configuration_condition import V1beta3PriorityLevelConfigurationCondition -from kubernetes.client.models.v1beta3_priority_level_configuration_list import V1beta3PriorityLevelConfigurationList -from kubernetes.client.models.v1beta3_priority_level_configuration_reference import V1beta3PriorityLevelConfigurationReference -from kubernetes.client.models.v1beta3_priority_level_configuration_spec import V1beta3PriorityLevelConfigurationSpec -from kubernetes.client.models.v1beta3_priority_level_configuration_status import V1beta3PriorityLevelConfigurationStatus -from kubernetes.client.models.v1beta3_queuing_configuration import V1beta3QueuingConfiguration -from kubernetes.client.models.v1beta3_resource_policy_rule import V1beta3ResourcePolicyRule -from kubernetes.client.models.v1beta3_service_account_subject import V1beta3ServiceAccountSubject -from kubernetes.client.models.v1beta3_subject import V1beta3Subject -from kubernetes.client.models.v1beta3_user_subject import V1beta3UserSubject +from kubernetes.client.models.v1beta1_volume_attributes_class import V1beta1VolumeAttributesClass +from kubernetes.client.models.v1beta1_volume_attributes_class_list import V1beta1VolumeAttributesClassList +from kubernetes.client.models.v1beta2_allocated_device_status import V1beta2AllocatedDeviceStatus +from kubernetes.client.models.v1beta2_allocation_result import V1beta2AllocationResult +from kubernetes.client.models.v1beta2_cel_device_selector import V1beta2CELDeviceSelector +from kubernetes.client.models.v1beta2_capacity_request_policy import V1beta2CapacityRequestPolicy +from kubernetes.client.models.v1beta2_capacity_request_policy_range import V1beta2CapacityRequestPolicyRange +from kubernetes.client.models.v1beta2_capacity_requirements import V1beta2CapacityRequirements +from kubernetes.client.models.v1beta2_counter import V1beta2Counter +from kubernetes.client.models.v1beta2_counter_set import V1beta2CounterSet +from kubernetes.client.models.v1beta2_device import V1beta2Device +from kubernetes.client.models.v1beta2_device_allocation_configuration import V1beta2DeviceAllocationConfiguration +from kubernetes.client.models.v1beta2_device_allocation_result import V1beta2DeviceAllocationResult +from kubernetes.client.models.v1beta2_device_attribute import V1beta2DeviceAttribute +from kubernetes.client.models.v1beta2_device_capacity import V1beta2DeviceCapacity +from kubernetes.client.models.v1beta2_device_claim import V1beta2DeviceClaim +from kubernetes.client.models.v1beta2_device_claim_configuration import V1beta2DeviceClaimConfiguration +from kubernetes.client.models.v1beta2_device_class import V1beta2DeviceClass +from kubernetes.client.models.v1beta2_device_class_configuration import V1beta2DeviceClassConfiguration +from kubernetes.client.models.v1beta2_device_class_list import V1beta2DeviceClassList +from kubernetes.client.models.v1beta2_device_class_spec import V1beta2DeviceClassSpec +from kubernetes.client.models.v1beta2_device_constraint import V1beta2DeviceConstraint +from kubernetes.client.models.v1beta2_device_counter_consumption import V1beta2DeviceCounterConsumption +from kubernetes.client.models.v1beta2_device_request import V1beta2DeviceRequest +from kubernetes.client.models.v1beta2_device_request_allocation_result import V1beta2DeviceRequestAllocationResult +from kubernetes.client.models.v1beta2_device_selector import V1beta2DeviceSelector +from kubernetes.client.models.v1beta2_device_sub_request import V1beta2DeviceSubRequest +from kubernetes.client.models.v1beta2_device_taint import V1beta2DeviceTaint +from kubernetes.client.models.v1beta2_device_toleration import V1beta2DeviceToleration +from kubernetes.client.models.v1beta2_exact_device_request import V1beta2ExactDeviceRequest +from kubernetes.client.models.v1beta2_network_device_data import V1beta2NetworkDeviceData +from kubernetes.client.models.v1beta2_opaque_device_configuration import V1beta2OpaqueDeviceConfiguration +from kubernetes.client.models.v1beta2_resource_claim import V1beta2ResourceClaim +from kubernetes.client.models.v1beta2_resource_claim_consumer_reference import V1beta2ResourceClaimConsumerReference +from kubernetes.client.models.v1beta2_resource_claim_list import V1beta2ResourceClaimList +from kubernetes.client.models.v1beta2_resource_claim_spec import V1beta2ResourceClaimSpec +from kubernetes.client.models.v1beta2_resource_claim_status import V1beta2ResourceClaimStatus +from kubernetes.client.models.v1beta2_resource_claim_template import V1beta2ResourceClaimTemplate +from kubernetes.client.models.v1beta2_resource_claim_template_list import V1beta2ResourceClaimTemplateList +from kubernetes.client.models.v1beta2_resource_claim_template_spec import V1beta2ResourceClaimTemplateSpec +from kubernetes.client.models.v1beta2_resource_pool import V1beta2ResourcePool +from kubernetes.client.models.v1beta2_resource_slice import V1beta2ResourceSlice +from kubernetes.client.models.v1beta2_resource_slice_list import V1beta2ResourceSliceList +from kubernetes.client.models.v1beta2_resource_slice_spec import V1beta2ResourceSliceSpec +from kubernetes.client.models.v2_api_group_discovery import V2APIGroupDiscovery +from kubernetes.client.models.v2_api_group_discovery_list import V2APIGroupDiscoveryList +from kubernetes.client.models.v2_api_resource_discovery import V2APIResourceDiscovery +from kubernetes.client.models.v2_api_subresource_discovery import V2APISubresourceDiscovery +from kubernetes.client.models.v2_api_version_discovery import V2APIVersionDiscovery from kubernetes.client.models.v2_container_resource_metric_source import V2ContainerResourceMetricSource from kubernetes.client.models.v2_container_resource_metric_status import V2ContainerResourceMetricStatus from kubernetes.client.models.v2_cross_version_object_reference import V2CrossVersionObjectReference @@ -626,4 +739,9 @@ from kubernetes.client.models.v2_pods_metric_status import V2PodsMetricStatus from kubernetes.client.models.v2_resource_metric_source import V2ResourceMetricSource from kubernetes.client.models.v2_resource_metric_status import V2ResourceMetricStatus +from kubernetes.client.models.v2beta1_api_group_discovery import V2beta1APIGroupDiscovery +from kubernetes.client.models.v2beta1_api_group_discovery_list import V2beta1APIGroupDiscoveryList +from kubernetes.client.models.v2beta1_api_resource_discovery import V2beta1APIResourceDiscovery +from kubernetes.client.models.v2beta1_api_subresource_discovery import V2beta1APISubresourceDiscovery +from kubernetes.client.models.v2beta1_api_version_discovery import V2beta1APIVersionDiscovery from kubernetes.client.models.version_info import VersionInfo diff --git a/kubernetes/client/models/admissionregistration_v1_service_reference.py b/kubernetes/client/models/admissionregistration_v1_service_reference.py index f20871308b..3b49395be6 100644 --- a/kubernetes/client/models/admissionregistration_v1_service_reference.py +++ b/kubernetes/client/models/admissionregistration_v1_service_reference.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -49,7 +52,7 @@ class AdmissionregistrationV1ServiceReference(object): def __init__(self, name=None, namespace=None, path=None, port=None, local_vars_configuration=None): # noqa: E501 """AdmissionregistrationV1ServiceReference - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._name = None @@ -83,7 +86,7 @@ def name(self, name): `name` is the name of the service. Required # noqa: E501 :param name: The name of this AdmissionregistrationV1ServiceReference. # noqa: E501 - :type: str + :type name: str """ if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 @@ -108,7 +111,7 @@ def namespace(self, namespace): `namespace` is the namespace of the service. Required # noqa: E501 :param namespace: The namespace of this AdmissionregistrationV1ServiceReference. # noqa: E501 - :type: str + :type namespace: str """ if self.local_vars_configuration.client_side_validation and namespace is None: # noqa: E501 raise ValueError("Invalid value for `namespace`, must not be `None`") # noqa: E501 @@ -133,7 +136,7 @@ def path(self, path): `path` is an optional URL path which will be sent in any request to this service. # noqa: E501 :param path: The path of this AdmissionregistrationV1ServiceReference. # noqa: E501 - :type: str + :type path: str """ self._path = path @@ -156,32 +159,40 @@ def port(self, port): If specified, the port on the service that hosting webhook. Default to 443 for backward compatibility. `port` should be a valid port number (1-65535, inclusive). # noqa: E501 :param port: The port of this AdmissionregistrationV1ServiceReference. # noqa: E501 - :type: int + :type port: int """ self._port = port - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/admissionregistration_v1_webhook_client_config.py b/kubernetes/client/models/admissionregistration_v1_webhook_client_config.py index 3584b08343..51b0390dbe 100644 --- a/kubernetes/client/models/admissionregistration_v1_webhook_client_config.py +++ b/kubernetes/client/models/admissionregistration_v1_webhook_client_config.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -47,7 +50,7 @@ class AdmissionregistrationV1WebhookClientConfig(object): def __init__(self, ca_bundle=None, service=None, url=None, local_vars_configuration=None): # noqa: E501 """AdmissionregistrationV1WebhookClientConfig - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._ca_bundle = None @@ -80,7 +83,7 @@ def ca_bundle(self, ca_bundle): `caBundle` is a PEM encoded CA bundle which will be used to validate the webhook's server certificate. If unspecified, system trust roots on the apiserver are used. # noqa: E501 :param ca_bundle: The ca_bundle of this AdmissionregistrationV1WebhookClientConfig. # noqa: E501 - :type: str + :type ca_bundle: str """ if (self.local_vars_configuration.client_side_validation and ca_bundle is not None and not re.search(r'^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$', ca_bundle)): # noqa: E501 @@ -104,7 +107,7 @@ def service(self, service): :param service: The service of this AdmissionregistrationV1WebhookClientConfig. # noqa: E501 - :type: AdmissionregistrationV1ServiceReference + :type service: AdmissionregistrationV1ServiceReference """ self._service = service @@ -127,32 +130,40 @@ def url(self, url): `url` gives the location of the webhook, in standard URL form (`scheme://host:port/path`). Exactly one of `url` or `service` must be specified. The `host` should not refer to a service running in the cluster; use the `service` field instead. The host might be resolved via external DNS in some apiservers (e.g., `kube-apiserver` cannot resolve in-cluster DNS as that would be a layering violation). `host` may also be an IP address. Please note that using `localhost` or `127.0.0.1` as a `host` is risky unless you take great care to run this webhook on all hosts which run an apiserver which might need to make calls to this webhook. Such installs are likely to be non-portable, i.e., not easy to turn up in a new cluster. The scheme must be \"https\"; the URL must begin with \"https://\". A path is optional, and if present may be any string permissible in a URL. You may use the path to pass an arbitrary string to the webhook, for example, a cluster identifier. Attempting to use a user or basic auth e.g. \"user:password@\" is not allowed. Fragments (\"#...\") and query parameters (\"?...\") are not allowed, either. # noqa: E501 :param url: The url of this AdmissionregistrationV1WebhookClientConfig. # noqa: E501 - :type: str + :type url: str """ self._url = url - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/apiextensions_v1_service_reference.py b/kubernetes/client/models/apiextensions_v1_service_reference.py index c47ba33556..b0ce477c8e 100644 --- a/kubernetes/client/models/apiextensions_v1_service_reference.py +++ b/kubernetes/client/models/apiextensions_v1_service_reference.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -49,7 +52,7 @@ class ApiextensionsV1ServiceReference(object): def __init__(self, name=None, namespace=None, path=None, port=None, local_vars_configuration=None): # noqa: E501 """ApiextensionsV1ServiceReference - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._name = None @@ -83,7 +86,7 @@ def name(self, name): name is the name of the service. Required # noqa: E501 :param name: The name of this ApiextensionsV1ServiceReference. # noqa: E501 - :type: str + :type name: str """ if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 @@ -108,7 +111,7 @@ def namespace(self, namespace): namespace is the namespace of the service. Required # noqa: E501 :param namespace: The namespace of this ApiextensionsV1ServiceReference. # noqa: E501 - :type: str + :type namespace: str """ if self.local_vars_configuration.client_side_validation and namespace is None: # noqa: E501 raise ValueError("Invalid value for `namespace`, must not be `None`") # noqa: E501 @@ -133,7 +136,7 @@ def path(self, path): path is an optional URL path at which the webhook will be contacted. # noqa: E501 :param path: The path of this ApiextensionsV1ServiceReference. # noqa: E501 - :type: str + :type path: str """ self._path = path @@ -156,32 +159,40 @@ def port(self, port): port is an optional service port at which the webhook will be contacted. `port` should be a valid port number (1-65535, inclusive). Defaults to 443 for backward compatibility. # noqa: E501 :param port: The port of this ApiextensionsV1ServiceReference. # noqa: E501 - :type: int + :type port: int """ self._port = port - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/apiextensions_v1_webhook_client_config.py b/kubernetes/client/models/apiextensions_v1_webhook_client_config.py index a893dc33f3..10db2c8f6b 100644 --- a/kubernetes/client/models/apiextensions_v1_webhook_client_config.py +++ b/kubernetes/client/models/apiextensions_v1_webhook_client_config.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -47,7 +50,7 @@ class ApiextensionsV1WebhookClientConfig(object): def __init__(self, ca_bundle=None, service=None, url=None, local_vars_configuration=None): # noqa: E501 """ApiextensionsV1WebhookClientConfig - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._ca_bundle = None @@ -80,7 +83,7 @@ def ca_bundle(self, ca_bundle): caBundle is a PEM encoded CA bundle which will be used to validate the webhook's server certificate. If unspecified, system trust roots on the apiserver are used. # noqa: E501 :param ca_bundle: The ca_bundle of this ApiextensionsV1WebhookClientConfig. # noqa: E501 - :type: str + :type ca_bundle: str """ if (self.local_vars_configuration.client_side_validation and ca_bundle is not None and not re.search(r'^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$', ca_bundle)): # noqa: E501 @@ -104,7 +107,7 @@ def service(self, service): :param service: The service of this ApiextensionsV1WebhookClientConfig. # noqa: E501 - :type: ApiextensionsV1ServiceReference + :type service: ApiextensionsV1ServiceReference """ self._service = service @@ -127,32 +130,40 @@ def url(self, url): url gives the location of the webhook, in standard URL form (`scheme://host:port/path`). Exactly one of `url` or `service` must be specified. The `host` should not refer to a service running in the cluster; use the `service` field instead. The host might be resolved via external DNS in some apiservers (e.g., `kube-apiserver` cannot resolve in-cluster DNS as that would be a layering violation). `host` may also be an IP address. Please note that using `localhost` or `127.0.0.1` as a `host` is risky unless you take great care to run this webhook on all hosts which run an apiserver which might need to make calls to this webhook. Such installs are likely to be non-portable, i.e., not easy to turn up in a new cluster. The scheme must be \"https\"; the URL must begin with \"https://\". A path is optional, and if present may be any string permissible in a URL. You may use the path to pass an arbitrary string to the webhook, for example, a cluster identifier. Attempting to use a user or basic auth e.g. \"user:password@\" is not allowed. Fragments (\"#...\") and query parameters (\"?...\") are not allowed, either. # noqa: E501 :param url: The url of this ApiextensionsV1WebhookClientConfig. # noqa: E501 - :type: str + :type url: str """ self._url = url - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/apiregistration_v1_service_reference.py b/kubernetes/client/models/apiregistration_v1_service_reference.py index 0567ba9c49..e1dd021c9c 100644 --- a/kubernetes/client/models/apiregistration_v1_service_reference.py +++ b/kubernetes/client/models/apiregistration_v1_service_reference.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -47,7 +50,7 @@ class ApiregistrationV1ServiceReference(object): def __init__(self, name=None, namespace=None, port=None, local_vars_configuration=None): # noqa: E501 """ApiregistrationV1ServiceReference - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._name = None @@ -80,7 +83,7 @@ def name(self, name): Name is the name of the service # noqa: E501 :param name: The name of this ApiregistrationV1ServiceReference. # noqa: E501 - :type: str + :type name: str """ self._name = name @@ -103,7 +106,7 @@ def namespace(self, namespace): Namespace is the namespace of the service # noqa: E501 :param namespace: The namespace of this ApiregistrationV1ServiceReference. # noqa: E501 - :type: str + :type namespace: str """ self._namespace = namespace @@ -126,32 +129,40 @@ def port(self, port): If specified, the port on the service that hosting webhook. Default to 443 for backward compatibility. `port` should be a valid port number (1-65535, inclusive). # noqa: E501 :param port: The port of this ApiregistrationV1ServiceReference. # noqa: E501 - :type: int + :type port: int """ self._port = port - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/authentication_v1_token_request.py b/kubernetes/client/models/authentication_v1_token_request.py index bcb64c932c..566262e87f 100644 --- a/kubernetes/client/models/authentication_v1_token_request.py +++ b/kubernetes/client/models/authentication_v1_token_request.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -51,7 +54,7 @@ class AuthenticationV1TokenRequest(object): def __init__(self, api_version=None, kind=None, metadata=None, spec=None, status=None, local_vars_configuration=None): # noqa: E501 """AuthenticationV1TokenRequest - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._api_version = None @@ -89,7 +92,7 @@ def api_version(self, api_version): APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501 :param api_version: The api_version of this AuthenticationV1TokenRequest. # noqa: E501 - :type: str + :type api_version: str """ self._api_version = api_version @@ -112,7 +115,7 @@ def kind(self, kind): Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501 :param kind: The kind of this AuthenticationV1TokenRequest. # noqa: E501 - :type: str + :type kind: str """ self._kind = kind @@ -133,7 +136,7 @@ def metadata(self, metadata): :param metadata: The metadata of this AuthenticationV1TokenRequest. # noqa: E501 - :type: V1ObjectMeta + :type metadata: V1ObjectMeta """ self._metadata = metadata @@ -154,7 +157,7 @@ def spec(self, spec): :param spec: The spec of this AuthenticationV1TokenRequest. # noqa: E501 - :type: V1TokenRequestSpec + :type spec: V1TokenRequestSpec """ if self.local_vars_configuration.client_side_validation and spec is None: # noqa: E501 raise ValueError("Invalid value for `spec`, must not be `None`") # noqa: E501 @@ -177,32 +180,40 @@ def status(self, status): :param status: The status of this AuthenticationV1TokenRequest. # noqa: E501 - :type: V1TokenRequestStatus + :type status: V1TokenRequestStatus """ self._status = status - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/core_v1_endpoint_port.py b/kubernetes/client/models/core_v1_endpoint_port.py index 976c851f3c..60f827eefd 100644 --- a/kubernetes/client/models/core_v1_endpoint_port.py +++ b/kubernetes/client/models/core_v1_endpoint_port.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -49,7 +52,7 @@ class CoreV1EndpointPort(object): def __init__(self, app_protocol=None, name=None, port=None, protocol=None, local_vars_configuration=None): # noqa: E501 """CoreV1EndpointPort - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._app_protocol = None @@ -84,7 +87,7 @@ def app_protocol(self, app_protocol): The application protocol for this port. This is used as a hint for implementations to offer richer behavior for protocols that they understand. This field follows standard Kubernetes label syntax. Valid values are either: * Un-prefixed protocol names - reserved for IANA standard service names (as per RFC-6335 and https://www.iana.org/assignments/service-names). * Kubernetes-defined prefixed names: * 'kubernetes.io/h2c' - HTTP/2 prior knowledge over cleartext as described in https://www.rfc-editor.org/rfc/rfc9113.html#name-starting-http-2-with-prior- * 'kubernetes.io/ws' - WebSocket over cleartext as described in https://www.rfc-editor.org/rfc/rfc6455 * 'kubernetes.io/wss' - WebSocket over TLS as described in https://www.rfc-editor.org/rfc/rfc6455 * Other protocols should use implementation-defined prefixed names such as mycompany.com/my-custom-protocol. # noqa: E501 :param app_protocol: The app_protocol of this CoreV1EndpointPort. # noqa: E501 - :type: str + :type app_protocol: str """ self._app_protocol = app_protocol @@ -107,7 +110,7 @@ def name(self, name): The name of this port. This must match the 'name' field in the corresponding ServicePort. Must be a DNS_LABEL. Optional only if one port is defined. # noqa: E501 :param name: The name of this CoreV1EndpointPort. # noqa: E501 - :type: str + :type name: str """ self._name = name @@ -130,7 +133,7 @@ def port(self, port): The port number of the endpoint. # noqa: E501 :param port: The port of this CoreV1EndpointPort. # noqa: E501 - :type: int + :type port: int """ if self.local_vars_configuration.client_side_validation and port is None: # noqa: E501 raise ValueError("Invalid value for `port`, must not be `None`") # noqa: E501 @@ -155,32 +158,40 @@ def protocol(self, protocol): The IP protocol for this port. Must be UDP, TCP, or SCTP. Default is TCP. # noqa: E501 :param protocol: The protocol of this CoreV1EndpointPort. # noqa: E501 - :type: str + :type protocol: str """ self._protocol = protocol - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/core_v1_event.py b/kubernetes/client/models/core_v1_event.py index ff48ef4ec3..5bc66a2c4d 100644 --- a/kubernetes/client/models/core_v1_event.py +++ b/kubernetes/client/models/core_v1_event.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -75,7 +78,7 @@ class CoreV1Event(object): def __init__(self, action=None, api_version=None, count=None, event_time=None, first_timestamp=None, involved_object=None, kind=None, last_timestamp=None, message=None, metadata=None, reason=None, related=None, reporting_component=None, reporting_instance=None, series=None, source=None, type=None, local_vars_configuration=None): # noqa: E501 """CoreV1Event - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._action = None @@ -148,7 +151,7 @@ def action(self, action): What action was taken/failed regarding to the Regarding object. # noqa: E501 :param action: The action of this CoreV1Event. # noqa: E501 - :type: str + :type action: str """ self._action = action @@ -171,7 +174,7 @@ def api_version(self, api_version): APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501 :param api_version: The api_version of this CoreV1Event. # noqa: E501 - :type: str + :type api_version: str """ self._api_version = api_version @@ -194,7 +197,7 @@ def count(self, count): The number of times this event has occurred. # noqa: E501 :param count: The count of this CoreV1Event. # noqa: E501 - :type: int + :type count: int """ self._count = count @@ -217,7 +220,7 @@ def event_time(self, event_time): Time when this Event was first observed. # noqa: E501 :param event_time: The event_time of this CoreV1Event. # noqa: E501 - :type: datetime + :type event_time: datetime """ self._event_time = event_time @@ -240,7 +243,7 @@ def first_timestamp(self, first_timestamp): The time at which the event was first recorded. (Time of server receipt is in TypeMeta.) # noqa: E501 :param first_timestamp: The first_timestamp of this CoreV1Event. # noqa: E501 - :type: datetime + :type first_timestamp: datetime """ self._first_timestamp = first_timestamp @@ -261,7 +264,7 @@ def involved_object(self, involved_object): :param involved_object: The involved_object of this CoreV1Event. # noqa: E501 - :type: V1ObjectReference + :type involved_object: V1ObjectReference """ if self.local_vars_configuration.client_side_validation and involved_object is None: # noqa: E501 raise ValueError("Invalid value for `involved_object`, must not be `None`") # noqa: E501 @@ -286,7 +289,7 @@ def kind(self, kind): Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501 :param kind: The kind of this CoreV1Event. # noqa: E501 - :type: str + :type kind: str """ self._kind = kind @@ -309,7 +312,7 @@ def last_timestamp(self, last_timestamp): The time at which the most recent occurrence of this event was recorded. # noqa: E501 :param last_timestamp: The last_timestamp of this CoreV1Event. # noqa: E501 - :type: datetime + :type last_timestamp: datetime """ self._last_timestamp = last_timestamp @@ -332,7 +335,7 @@ def message(self, message): A human-readable description of the status of this operation. # noqa: E501 :param message: The message of this CoreV1Event. # noqa: E501 - :type: str + :type message: str """ self._message = message @@ -353,7 +356,7 @@ def metadata(self, metadata): :param metadata: The metadata of this CoreV1Event. # noqa: E501 - :type: V1ObjectMeta + :type metadata: V1ObjectMeta """ if self.local_vars_configuration.client_side_validation and metadata is None: # noqa: E501 raise ValueError("Invalid value for `metadata`, must not be `None`") # noqa: E501 @@ -378,7 +381,7 @@ def reason(self, reason): This should be a short, machine understandable string that gives the reason for the transition into the object's current status. # noqa: E501 :param reason: The reason of this CoreV1Event. # noqa: E501 - :type: str + :type reason: str """ self._reason = reason @@ -399,7 +402,7 @@ def related(self, related): :param related: The related of this CoreV1Event. # noqa: E501 - :type: V1ObjectReference + :type related: V1ObjectReference """ self._related = related @@ -422,7 +425,7 @@ def reporting_component(self, reporting_component): Name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`. # noqa: E501 :param reporting_component: The reporting_component of this CoreV1Event. # noqa: E501 - :type: str + :type reporting_component: str """ self._reporting_component = reporting_component @@ -445,7 +448,7 @@ def reporting_instance(self, reporting_instance): ID of the controller instance, e.g. `kubelet-xyzf`. # noqa: E501 :param reporting_instance: The reporting_instance of this CoreV1Event. # noqa: E501 - :type: str + :type reporting_instance: str """ self._reporting_instance = reporting_instance @@ -466,7 +469,7 @@ def series(self, series): :param series: The series of this CoreV1Event. # noqa: E501 - :type: CoreV1EventSeries + :type series: CoreV1EventSeries """ self._series = series @@ -487,7 +490,7 @@ def source(self, source): :param source: The source of this CoreV1Event. # noqa: E501 - :type: V1EventSource + :type source: V1EventSource """ self._source = source @@ -510,32 +513,40 @@ def type(self, type): Type of this event (Normal, Warning), new types could be added in the future # noqa: E501 :param type: The type of this CoreV1Event. # noqa: E501 - :type: str + :type type: str """ self._type = type - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/core_v1_event_list.py b/kubernetes/client/models/core_v1_event_list.py index 1b61549afd..91095e474e 100644 --- a/kubernetes/client/models/core_v1_event_list.py +++ b/kubernetes/client/models/core_v1_event_list.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -49,7 +52,7 @@ class CoreV1EventList(object): def __init__(self, api_version=None, items=None, kind=None, metadata=None, local_vars_configuration=None): # noqa: E501 """CoreV1EventList - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._api_version = None @@ -84,7 +87,7 @@ def api_version(self, api_version): APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501 :param api_version: The api_version of this CoreV1EventList. # noqa: E501 - :type: str + :type api_version: str """ self._api_version = api_version @@ -107,7 +110,7 @@ def items(self, items): List of events # noqa: E501 :param items: The items of this CoreV1EventList. # noqa: E501 - :type: list[CoreV1Event] + :type items: list[CoreV1Event] """ if self.local_vars_configuration.client_side_validation and items is None: # noqa: E501 raise ValueError("Invalid value for `items`, must not be `None`") # noqa: E501 @@ -132,7 +135,7 @@ def kind(self, kind): Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501 :param kind: The kind of this CoreV1EventList. # noqa: E501 - :type: str + :type kind: str """ self._kind = kind @@ -153,32 +156,40 @@ def metadata(self, metadata): :param metadata: The metadata of this CoreV1EventList. # noqa: E501 - :type: V1ListMeta + :type metadata: V1ListMeta """ self._metadata = metadata - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/core_v1_event_series.py b/kubernetes/client/models/core_v1_event_series.py index f8475e8910..728be845b6 100644 --- a/kubernetes/client/models/core_v1_event_series.py +++ b/kubernetes/client/models/core_v1_event_series.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -45,7 +48,7 @@ class CoreV1EventSeries(object): def __init__(self, count=None, last_observed_time=None, local_vars_configuration=None): # noqa: E501 """CoreV1EventSeries - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._count = None @@ -75,7 +78,7 @@ def count(self, count): Number of occurrences in this series up to the last heartbeat time # noqa: E501 :param count: The count of this CoreV1EventSeries. # noqa: E501 - :type: int + :type count: int """ self._count = count @@ -98,32 +101,40 @@ def last_observed_time(self, last_observed_time): Time of the last occurrence observed # noqa: E501 :param last_observed_time: The last_observed_time of this CoreV1EventSeries. # noqa: E501 - :type: datetime + :type last_observed_time: datetime """ self._last_observed_time = last_observed_time - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/core_v1_resource_claim.py b/kubernetes/client/models/core_v1_resource_claim.py new file mode 100644 index 0000000000..afd0c74eed --- /dev/null +++ b/kubernetes/client/models/core_v1_resource_claim.py @@ -0,0 +1,162 @@ +# coding: utf-8 + +""" + Kubernetes + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: release-1.35 + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from kubernetes.client.configuration import Configuration + + +class CoreV1ResourceClaim(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'name': 'str', + 'request': 'str' + } + + attribute_map = { + 'name': 'name', + 'request': 'request' + } + + def __init__(self, name=None, request=None, local_vars_configuration=None): # noqa: E501 + """CoreV1ResourceClaim - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._name = None + self._request = None + self.discriminator = None + + self.name = name + if request is not None: + self.request = request + + @property + def name(self): + """Gets the name of this CoreV1ResourceClaim. # noqa: E501 + + Name must match the name of one entry in pod.spec.resourceClaims of the Pod where this field is used. It makes that resource available inside a container. # noqa: E501 + + :return: The name of this CoreV1ResourceClaim. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this CoreV1ResourceClaim. + + Name must match the name of one entry in pod.spec.resourceClaims of the Pod where this field is used. It makes that resource available inside a container. # noqa: E501 + + :param name: The name of this CoreV1ResourceClaim. # noqa: E501 + :type name: str + """ + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def request(self): + """Gets the request of this CoreV1ResourceClaim. # noqa: E501 + + Request is the name chosen for a request in the referenced claim. If empty, everything from the claim is made available, otherwise only the result of this request. # noqa: E501 + + :return: The request of this CoreV1ResourceClaim. # noqa: E501 + :rtype: str + """ + return self._request + + @request.setter + def request(self, request): + """Sets the request of this CoreV1ResourceClaim. + + Request is the name chosen for a request in the referenced claim. If empty, everything from the claim is made available, otherwise only the result of this request. # noqa: E501 + + :param request: The request of this CoreV1ResourceClaim. # noqa: E501 + :type request: str + """ + + self._request = request + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CoreV1ResourceClaim): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CoreV1ResourceClaim): + return True + + return self.to_dict() != other.to_dict() diff --git a/kubernetes/client/models/discovery_v1_endpoint_port.py b/kubernetes/client/models/discovery_v1_endpoint_port.py index 5b00b20118..546718acd8 100644 --- a/kubernetes/client/models/discovery_v1_endpoint_port.py +++ b/kubernetes/client/models/discovery_v1_endpoint_port.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -49,7 +52,7 @@ class DiscoveryV1EndpointPort(object): def __init__(self, app_protocol=None, name=None, port=None, protocol=None, local_vars_configuration=None): # noqa: E501 """DiscoveryV1EndpointPort - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._app_protocol = None @@ -85,7 +88,7 @@ def app_protocol(self, app_protocol): The application protocol for this port. This is used as a hint for implementations to offer richer behavior for protocols that they understand. This field follows standard Kubernetes label syntax. Valid values are either: * Un-prefixed protocol names - reserved for IANA standard service names (as per RFC-6335 and https://www.iana.org/assignments/service-names). * Kubernetes-defined prefixed names: * 'kubernetes.io/h2c' - HTTP/2 prior knowledge over cleartext as described in https://www.rfc-editor.org/rfc/rfc9113.html#name-starting-http-2-with-prior- * 'kubernetes.io/ws' - WebSocket over cleartext as described in https://www.rfc-editor.org/rfc/rfc6455 * 'kubernetes.io/wss' - WebSocket over TLS as described in https://www.rfc-editor.org/rfc/rfc6455 * Other protocols should use implementation-defined prefixed names such as mycompany.com/my-custom-protocol. # noqa: E501 :param app_protocol: The app_protocol of this DiscoveryV1EndpointPort. # noqa: E501 - :type: str + :type app_protocol: str """ self._app_protocol = app_protocol @@ -108,7 +111,7 @@ def name(self, name): name represents the name of this port. All ports in an EndpointSlice must have a unique name. If the EndpointSlice is derived from a Kubernetes service, this corresponds to the Service.ports[].name. Name must either be an empty string or pass DNS_LABEL validation: * must be no more than 63 characters long. * must consist of lower case alphanumeric characters or '-'. * must start and end with an alphanumeric character. Default is empty string. # noqa: E501 :param name: The name of this DiscoveryV1EndpointPort. # noqa: E501 - :type: str + :type name: str """ self._name = name @@ -117,7 +120,7 @@ def name(self, name): def port(self): """Gets the port of this DiscoveryV1EndpointPort. # noqa: E501 - port represents the port number of the endpoint. If this is not specified, ports are not restricted and must be interpreted in the context of the specific consumer. # noqa: E501 + port represents the port number of the endpoint. If the EndpointSlice is derived from a Kubernetes service, this must be set to the service's target port. EndpointSlices used for other purposes may have a nil port. # noqa: E501 :return: The port of this DiscoveryV1EndpointPort. # noqa: E501 :rtype: int @@ -128,10 +131,10 @@ def port(self): def port(self, port): """Sets the port of this DiscoveryV1EndpointPort. - port represents the port number of the endpoint. If this is not specified, ports are not restricted and must be interpreted in the context of the specific consumer. # noqa: E501 + port represents the port number of the endpoint. If the EndpointSlice is derived from a Kubernetes service, this must be set to the service's target port. EndpointSlices used for other purposes may have a nil port. # noqa: E501 :param port: The port of this DiscoveryV1EndpointPort. # noqa: E501 - :type: int + :type port: int """ self._port = port @@ -154,32 +157,40 @@ def protocol(self, protocol): protocol represents the IP protocol for this port. Must be UDP, TCP, or SCTP. Default is TCP. # noqa: E501 :param protocol: The protocol of this DiscoveryV1EndpointPort. # noqa: E501 - :type: str + :type protocol: str """ self._protocol = protocol - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/events_v1_event.py b/kubernetes/client/models/events_v1_event.py index 8c03e9ff23..05537ba950 100644 --- a/kubernetes/client/models/events_v1_event.py +++ b/kubernetes/client/models/events_v1_event.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -75,7 +78,7 @@ class EventsV1Event(object): def __init__(self, action=None, api_version=None, deprecated_count=None, deprecated_first_timestamp=None, deprecated_last_timestamp=None, deprecated_source=None, event_time=None, kind=None, metadata=None, note=None, reason=None, regarding=None, related=None, reporting_controller=None, reporting_instance=None, series=None, type=None, local_vars_configuration=None): # noqa: E501 """EventsV1Event - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._action = None @@ -149,7 +152,7 @@ def action(self, action): action is what action was taken/failed regarding to the regarding object. It is machine-readable. This field cannot be empty for new Events and it can have at most 128 characters. # noqa: E501 :param action: The action of this EventsV1Event. # noqa: E501 - :type: str + :type action: str """ self._action = action @@ -172,7 +175,7 @@ def api_version(self, api_version): APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501 :param api_version: The api_version of this EventsV1Event. # noqa: E501 - :type: str + :type api_version: str """ self._api_version = api_version @@ -195,7 +198,7 @@ def deprecated_count(self, deprecated_count): deprecatedCount is the deprecated field assuring backward compatibility with core.v1 Event type. # noqa: E501 :param deprecated_count: The deprecated_count of this EventsV1Event. # noqa: E501 - :type: int + :type deprecated_count: int """ self._deprecated_count = deprecated_count @@ -218,7 +221,7 @@ def deprecated_first_timestamp(self, deprecated_first_timestamp): deprecatedFirstTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type. # noqa: E501 :param deprecated_first_timestamp: The deprecated_first_timestamp of this EventsV1Event. # noqa: E501 - :type: datetime + :type deprecated_first_timestamp: datetime """ self._deprecated_first_timestamp = deprecated_first_timestamp @@ -241,7 +244,7 @@ def deprecated_last_timestamp(self, deprecated_last_timestamp): deprecatedLastTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type. # noqa: E501 :param deprecated_last_timestamp: The deprecated_last_timestamp of this EventsV1Event. # noqa: E501 - :type: datetime + :type deprecated_last_timestamp: datetime """ self._deprecated_last_timestamp = deprecated_last_timestamp @@ -262,7 +265,7 @@ def deprecated_source(self, deprecated_source): :param deprecated_source: The deprecated_source of this EventsV1Event. # noqa: E501 - :type: V1EventSource + :type deprecated_source: V1EventSource """ self._deprecated_source = deprecated_source @@ -285,7 +288,7 @@ def event_time(self, event_time): eventTime is the time when this Event was first observed. It is required. # noqa: E501 :param event_time: The event_time of this EventsV1Event. # noqa: E501 - :type: datetime + :type event_time: datetime """ if self.local_vars_configuration.client_side_validation and event_time is None: # noqa: E501 raise ValueError("Invalid value for `event_time`, must not be `None`") # noqa: E501 @@ -310,7 +313,7 @@ def kind(self, kind): Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501 :param kind: The kind of this EventsV1Event. # noqa: E501 - :type: str + :type kind: str """ self._kind = kind @@ -331,7 +334,7 @@ def metadata(self, metadata): :param metadata: The metadata of this EventsV1Event. # noqa: E501 - :type: V1ObjectMeta + :type metadata: V1ObjectMeta """ self._metadata = metadata @@ -354,7 +357,7 @@ def note(self, note): note is a human-readable description of the status of this operation. Maximal length of the note is 1kB, but libraries should be prepared to handle values up to 64kB. # noqa: E501 :param note: The note of this EventsV1Event. # noqa: E501 - :type: str + :type note: str """ self._note = note @@ -377,7 +380,7 @@ def reason(self, reason): reason is why the action was taken. It is human-readable. This field cannot be empty for new Events and it can have at most 128 characters. # noqa: E501 :param reason: The reason of this EventsV1Event. # noqa: E501 - :type: str + :type reason: str """ self._reason = reason @@ -398,7 +401,7 @@ def regarding(self, regarding): :param regarding: The regarding of this EventsV1Event. # noqa: E501 - :type: V1ObjectReference + :type regarding: V1ObjectReference """ self._regarding = regarding @@ -419,7 +422,7 @@ def related(self, related): :param related: The related of this EventsV1Event. # noqa: E501 - :type: V1ObjectReference + :type related: V1ObjectReference """ self._related = related @@ -442,7 +445,7 @@ def reporting_controller(self, reporting_controller): reportingController is the name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`. This field cannot be empty for new Events. # noqa: E501 :param reporting_controller: The reporting_controller of this EventsV1Event. # noqa: E501 - :type: str + :type reporting_controller: str """ self._reporting_controller = reporting_controller @@ -465,7 +468,7 @@ def reporting_instance(self, reporting_instance): reportingInstance is the ID of the controller instance, e.g. `kubelet-xyzf`. This field cannot be empty for new Events and it can have at most 128 characters. # noqa: E501 :param reporting_instance: The reporting_instance of this EventsV1Event. # noqa: E501 - :type: str + :type reporting_instance: str """ self._reporting_instance = reporting_instance @@ -486,7 +489,7 @@ def series(self, series): :param series: The series of this EventsV1Event. # noqa: E501 - :type: EventsV1EventSeries + :type series: EventsV1EventSeries """ self._series = series @@ -509,32 +512,40 @@ def type(self, type): type is the type of this event (Normal, Warning), new types could be added in the future. It is machine-readable. This field cannot be empty for new Events. # noqa: E501 :param type: The type of this EventsV1Event. # noqa: E501 - :type: str + :type type: str """ self._type = type - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/events_v1_event_list.py b/kubernetes/client/models/events_v1_event_list.py index 1c4c3fbaa3..89a0bec085 100644 --- a/kubernetes/client/models/events_v1_event_list.py +++ b/kubernetes/client/models/events_v1_event_list.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -49,7 +52,7 @@ class EventsV1EventList(object): def __init__(self, api_version=None, items=None, kind=None, metadata=None, local_vars_configuration=None): # noqa: E501 """EventsV1EventList - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._api_version = None @@ -84,7 +87,7 @@ def api_version(self, api_version): APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501 :param api_version: The api_version of this EventsV1EventList. # noqa: E501 - :type: str + :type api_version: str """ self._api_version = api_version @@ -107,7 +110,7 @@ def items(self, items): items is a list of schema objects. # noqa: E501 :param items: The items of this EventsV1EventList. # noqa: E501 - :type: list[EventsV1Event] + :type items: list[EventsV1Event] """ if self.local_vars_configuration.client_side_validation and items is None: # noqa: E501 raise ValueError("Invalid value for `items`, must not be `None`") # noqa: E501 @@ -132,7 +135,7 @@ def kind(self, kind): Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501 :param kind: The kind of this EventsV1EventList. # noqa: E501 - :type: str + :type kind: str """ self._kind = kind @@ -153,32 +156,40 @@ def metadata(self, metadata): :param metadata: The metadata of this EventsV1EventList. # noqa: E501 - :type: V1ListMeta + :type metadata: V1ListMeta """ self._metadata = metadata - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/events_v1_event_series.py b/kubernetes/client/models/events_v1_event_series.py index 2edab7a9f4..e35227f7bd 100644 --- a/kubernetes/client/models/events_v1_event_series.py +++ b/kubernetes/client/models/events_v1_event_series.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -45,7 +48,7 @@ class EventsV1EventSeries(object): def __init__(self, count=None, last_observed_time=None, local_vars_configuration=None): # noqa: E501 """EventsV1EventSeries - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._count = None @@ -73,7 +76,7 @@ def count(self, count): count is the number of occurrences in this series up to the last heartbeat time. # noqa: E501 :param count: The count of this EventsV1EventSeries. # noqa: E501 - :type: int + :type count: int """ if self.local_vars_configuration.client_side_validation and count is None: # noqa: E501 raise ValueError("Invalid value for `count`, must not be `None`") # noqa: E501 @@ -98,34 +101,42 @@ def last_observed_time(self, last_observed_time): lastObservedTime is the time when last Event from the series was seen before last heartbeat. # noqa: E501 :param last_observed_time: The last_observed_time of this EventsV1EventSeries. # noqa: E501 - :type: datetime + :type last_observed_time: datetime """ if self.local_vars_configuration.client_side_validation and last_observed_time is None: # noqa: E501 raise ValueError("Invalid value for `last_observed_time`, must not be `None`") # noqa: E501 self._last_observed_time = last_observed_time - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/flowcontrol_v1_subject.py b/kubernetes/client/models/flowcontrol_v1_subject.py index bc45fcbf7b..ec54cb8fe5 100644 --- a/kubernetes/client/models/flowcontrol_v1_subject.py +++ b/kubernetes/client/models/flowcontrol_v1_subject.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -49,7 +52,7 @@ class FlowcontrolV1Subject(object): def __init__(self, group=None, kind=None, service_account=None, user=None, local_vars_configuration=None): # noqa: E501 """FlowcontrolV1Subject - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._group = None @@ -82,7 +85,7 @@ def group(self, group): :param group: The group of this FlowcontrolV1Subject. # noqa: E501 - :type: V1GroupSubject + :type group: V1GroupSubject """ self._group = group @@ -105,7 +108,7 @@ def kind(self, kind): `kind` indicates which one of the other fields is non-empty. Required # noqa: E501 :param kind: The kind of this FlowcontrolV1Subject. # noqa: E501 - :type: str + :type kind: str """ if self.local_vars_configuration.client_side_validation and kind is None: # noqa: E501 raise ValueError("Invalid value for `kind`, must not be `None`") # noqa: E501 @@ -128,7 +131,7 @@ def service_account(self, service_account): :param service_account: The service_account of this FlowcontrolV1Subject. # noqa: E501 - :type: V1ServiceAccountSubject + :type service_account: V1ServiceAccountSubject """ self._service_account = service_account @@ -149,32 +152,40 @@ def user(self, user): :param user: The user of this FlowcontrolV1Subject. # noqa: E501 - :type: V1UserSubject + :type user: V1UserSubject """ self._user = user - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/rbac_v1_subject.py b/kubernetes/client/models/rbac_v1_subject.py index 870a0c08de..0017bbbee5 100644 --- a/kubernetes/client/models/rbac_v1_subject.py +++ b/kubernetes/client/models/rbac_v1_subject.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -49,7 +52,7 @@ class RbacV1Subject(object): def __init__(self, api_group=None, kind=None, name=None, namespace=None, local_vars_configuration=None): # noqa: E501 """RbacV1Subject - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._api_group = None @@ -83,7 +86,7 @@ def api_group(self, api_group): APIGroup holds the API group of the referenced subject. Defaults to \"\" for ServiceAccount subjects. Defaults to \"rbac.authorization.k8s.io\" for User and Group subjects. # noqa: E501 :param api_group: The api_group of this RbacV1Subject. # noqa: E501 - :type: str + :type api_group: str """ self._api_group = api_group @@ -106,7 +109,7 @@ def kind(self, kind): Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\". If the Authorizer does not recognized the kind value, the Authorizer should report an error. # noqa: E501 :param kind: The kind of this RbacV1Subject. # noqa: E501 - :type: str + :type kind: str """ if self.local_vars_configuration.client_side_validation and kind is None: # noqa: E501 raise ValueError("Invalid value for `kind`, must not be `None`") # noqa: E501 @@ -131,7 +134,7 @@ def name(self, name): Name of the object being referenced. # noqa: E501 :param name: The name of this RbacV1Subject. # noqa: E501 - :type: str + :type name: str """ if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 @@ -156,32 +159,40 @@ def namespace(self, namespace): Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty the Authorizer should report an error. # noqa: E501 :param namespace: The namespace of this RbacV1Subject. # noqa: E501 - :type: str + :type namespace: str """ self._namespace = namespace - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/resource_v1_resource_claim.py b/kubernetes/client/models/resource_v1_resource_claim.py new file mode 100644 index 0000000000..c2c9c5b9cb --- /dev/null +++ b/kubernetes/client/models/resource_v1_resource_claim.py @@ -0,0 +1,240 @@ +# coding: utf-8 + +""" + Kubernetes + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: release-1.35 + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from kubernetes.client.configuration import Configuration + + +class ResourceV1ResourceClaim(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'api_version': 'str', + 'kind': 'str', + 'metadata': 'V1ObjectMeta', + 'spec': 'V1ResourceClaimSpec', + 'status': 'V1ResourceClaimStatus' + } + + attribute_map = { + 'api_version': 'apiVersion', + 'kind': 'kind', + 'metadata': 'metadata', + 'spec': 'spec', + 'status': 'status' + } + + def __init__(self, api_version=None, kind=None, metadata=None, spec=None, status=None, local_vars_configuration=None): # noqa: E501 + """ResourceV1ResourceClaim - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._api_version = None + self._kind = None + self._metadata = None + self._spec = None + self._status = None + self.discriminator = None + + if api_version is not None: + self.api_version = api_version + if kind is not None: + self.kind = kind + if metadata is not None: + self.metadata = metadata + self.spec = spec + if status is not None: + self.status = status + + @property + def api_version(self): + """Gets the api_version of this ResourceV1ResourceClaim. # noqa: E501 + + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501 + + :return: The api_version of this ResourceV1ResourceClaim. # noqa: E501 + :rtype: str + """ + return self._api_version + + @api_version.setter + def api_version(self, api_version): + """Sets the api_version of this ResourceV1ResourceClaim. + + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501 + + :param api_version: The api_version of this ResourceV1ResourceClaim. # noqa: E501 + :type api_version: str + """ + + self._api_version = api_version + + @property + def kind(self): + """Gets the kind of this ResourceV1ResourceClaim. # noqa: E501 + + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501 + + :return: The kind of this ResourceV1ResourceClaim. # noqa: E501 + :rtype: str + """ + return self._kind + + @kind.setter + def kind(self, kind): + """Sets the kind of this ResourceV1ResourceClaim. + + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501 + + :param kind: The kind of this ResourceV1ResourceClaim. # noqa: E501 + :type kind: str + """ + + self._kind = kind + + @property + def metadata(self): + """Gets the metadata of this ResourceV1ResourceClaim. # noqa: E501 + + + :return: The metadata of this ResourceV1ResourceClaim. # noqa: E501 + :rtype: V1ObjectMeta + """ + return self._metadata + + @metadata.setter + def metadata(self, metadata): + """Sets the metadata of this ResourceV1ResourceClaim. + + + :param metadata: The metadata of this ResourceV1ResourceClaim. # noqa: E501 + :type metadata: V1ObjectMeta + """ + + self._metadata = metadata + + @property + def spec(self): + """Gets the spec of this ResourceV1ResourceClaim. # noqa: E501 + + + :return: The spec of this ResourceV1ResourceClaim. # noqa: E501 + :rtype: V1ResourceClaimSpec + """ + return self._spec + + @spec.setter + def spec(self, spec): + """Sets the spec of this ResourceV1ResourceClaim. + + + :param spec: The spec of this ResourceV1ResourceClaim. # noqa: E501 + :type spec: V1ResourceClaimSpec + """ + if self.local_vars_configuration.client_side_validation and spec is None: # noqa: E501 + raise ValueError("Invalid value for `spec`, must not be `None`") # noqa: E501 + + self._spec = spec + + @property + def status(self): + """Gets the status of this ResourceV1ResourceClaim. # noqa: E501 + + + :return: The status of this ResourceV1ResourceClaim. # noqa: E501 + :rtype: V1ResourceClaimStatus + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this ResourceV1ResourceClaim. + + + :param status: The status of this ResourceV1ResourceClaim. # noqa: E501 + :type status: V1ResourceClaimStatus + """ + + self._status = status + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ResourceV1ResourceClaim): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ResourceV1ResourceClaim): + return True + + return self.to_dict() != other.to_dict() diff --git a/kubernetes/client/models/storage_v1_token_request.py b/kubernetes/client/models/storage_v1_token_request.py index 366b26f78d..bc9bcb9d92 100644 --- a/kubernetes/client/models/storage_v1_token_request.py +++ b/kubernetes/client/models/storage_v1_token_request.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -45,7 +48,7 @@ class StorageV1TokenRequest(object): def __init__(self, audience=None, expiration_seconds=None, local_vars_configuration=None): # noqa: E501 """StorageV1TokenRequest - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._audience = None @@ -74,7 +77,7 @@ def audience(self, audience): audience is the intended audience of the token in \"TokenRequestSpec\". It will default to the audiences of kube apiserver. # noqa: E501 :param audience: The audience of this StorageV1TokenRequest. # noqa: E501 - :type: str + :type audience: str """ if self.local_vars_configuration.client_side_validation and audience is None: # noqa: E501 raise ValueError("Invalid value for `audience`, must not be `None`") # noqa: E501 @@ -99,32 +102,40 @@ def expiration_seconds(self, expiration_seconds): expirationSeconds is the duration of validity of the token in \"TokenRequestSpec\". It has the same default value of \"ExpirationSeconds\" in \"TokenRequestSpec\". # noqa: E501 :param expiration_seconds: The expiration_seconds of this StorageV1TokenRequest. # noqa: E501 - :type: int + :type expiration_seconds: int """ self._expiration_seconds = expiration_seconds - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_affinity.py b/kubernetes/client/models/v1_affinity.py index 11565e44e8..04890cff5e 100644 --- a/kubernetes/client/models/v1_affinity.py +++ b/kubernetes/client/models/v1_affinity.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -47,7 +50,7 @@ class V1Affinity(object): def __init__(self, node_affinity=None, pod_affinity=None, pod_anti_affinity=None, local_vars_configuration=None): # noqa: E501 """V1Affinity - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._node_affinity = None @@ -78,7 +81,7 @@ def node_affinity(self, node_affinity): :param node_affinity: The node_affinity of this V1Affinity. # noqa: E501 - :type: V1NodeAffinity + :type node_affinity: V1NodeAffinity """ self._node_affinity = node_affinity @@ -99,7 +102,7 @@ def pod_affinity(self, pod_affinity): :param pod_affinity: The pod_affinity of this V1Affinity. # noqa: E501 - :type: V1PodAffinity + :type pod_affinity: V1PodAffinity """ self._pod_affinity = pod_affinity @@ -120,32 +123,40 @@ def pod_anti_affinity(self, pod_anti_affinity): :param pod_anti_affinity: The pod_anti_affinity of this V1Affinity. # noqa: E501 - :type: V1PodAntiAffinity + :type pod_anti_affinity: V1PodAntiAffinity """ self._pod_anti_affinity = pod_anti_affinity - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_aggregation_rule.py b/kubernetes/client/models/v1_aggregation_rule.py index cb071b03cd..2fc81ed5e5 100644 --- a/kubernetes/client/models/v1_aggregation_rule.py +++ b/kubernetes/client/models/v1_aggregation_rule.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -43,7 +46,7 @@ class V1AggregationRule(object): def __init__(self, cluster_role_selectors=None, local_vars_configuration=None): # noqa: E501 """V1AggregationRule - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._cluster_role_selectors = None @@ -70,32 +73,40 @@ def cluster_role_selectors(self, cluster_role_selectors): ClusterRoleSelectors holds a list of selectors which will be used to find ClusterRoles and create the rules. If any of the selectors match, then the ClusterRole's permissions will be added # noqa: E501 :param cluster_role_selectors: The cluster_role_selectors of this V1AggregationRule. # noqa: E501 - :type: list[V1LabelSelector] + :type cluster_role_selectors: list[V1LabelSelector] """ self._cluster_role_selectors = cluster_role_selectors - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_allocated_device_status.py b/kubernetes/client/models/v1_allocated_device_status.py new file mode 100644 index 0000000000..e097cb2675 --- /dev/null +++ b/kubernetes/client/models/v1_allocated_device_status.py @@ -0,0 +1,302 @@ +# coding: utf-8 + +""" + Kubernetes + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: release-1.35 + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from kubernetes.client.configuration import Configuration + + +class V1AllocatedDeviceStatus(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'conditions': 'list[V1Condition]', + 'data': 'object', + 'device': 'str', + 'driver': 'str', + 'network_data': 'V1NetworkDeviceData', + 'pool': 'str', + 'share_id': 'str' + } + + attribute_map = { + 'conditions': 'conditions', + 'data': 'data', + 'device': 'device', + 'driver': 'driver', + 'network_data': 'networkData', + 'pool': 'pool', + 'share_id': 'shareID' + } + + def __init__(self, conditions=None, data=None, device=None, driver=None, network_data=None, pool=None, share_id=None, local_vars_configuration=None): # noqa: E501 + """V1AllocatedDeviceStatus - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._conditions = None + self._data = None + self._device = None + self._driver = None + self._network_data = None + self._pool = None + self._share_id = None + self.discriminator = None + + if conditions is not None: + self.conditions = conditions + if data is not None: + self.data = data + self.device = device + self.driver = driver + if network_data is not None: + self.network_data = network_data + self.pool = pool + if share_id is not None: + self.share_id = share_id + + @property + def conditions(self): + """Gets the conditions of this V1AllocatedDeviceStatus. # noqa: E501 + + Conditions contains the latest observation of the device's state. If the device has been configured according to the class and claim config references, the `Ready` condition should be True. Must not contain more than 8 entries. # noqa: E501 + + :return: The conditions of this V1AllocatedDeviceStatus. # noqa: E501 + :rtype: list[V1Condition] + """ + return self._conditions + + @conditions.setter + def conditions(self, conditions): + """Sets the conditions of this V1AllocatedDeviceStatus. + + Conditions contains the latest observation of the device's state. If the device has been configured according to the class and claim config references, the `Ready` condition should be True. Must not contain more than 8 entries. # noqa: E501 + + :param conditions: The conditions of this V1AllocatedDeviceStatus. # noqa: E501 + :type conditions: list[V1Condition] + """ + + self._conditions = conditions + + @property + def data(self): + """Gets the data of this V1AllocatedDeviceStatus. # noqa: E501 + + Data contains arbitrary driver-specific data. The length of the raw data must be smaller or equal to 10 Ki. # noqa: E501 + + :return: The data of this V1AllocatedDeviceStatus. # noqa: E501 + :rtype: object + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this V1AllocatedDeviceStatus. + + Data contains arbitrary driver-specific data. The length of the raw data must be smaller or equal to 10 Ki. # noqa: E501 + + :param data: The data of this V1AllocatedDeviceStatus. # noqa: E501 + :type data: object + """ + + self._data = data + + @property + def device(self): + """Gets the device of this V1AllocatedDeviceStatus. # noqa: E501 + + Device references one device instance via its name in the driver's resource pool. It must be a DNS label. # noqa: E501 + + :return: The device of this V1AllocatedDeviceStatus. # noqa: E501 + :rtype: str + """ + return self._device + + @device.setter + def device(self, device): + """Sets the device of this V1AllocatedDeviceStatus. + + Device references one device instance via its name in the driver's resource pool. It must be a DNS label. # noqa: E501 + + :param device: The device of this V1AllocatedDeviceStatus. # noqa: E501 + :type device: str + """ + if self.local_vars_configuration.client_side_validation and device is None: # noqa: E501 + raise ValueError("Invalid value for `device`, must not be `None`") # noqa: E501 + + self._device = device + + @property + def driver(self): + """Gets the driver of this V1AllocatedDeviceStatus. # noqa: E501 + + Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node. Must be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. It should use only lower case characters. # noqa: E501 + + :return: The driver of this V1AllocatedDeviceStatus. # noqa: E501 + :rtype: str + """ + return self._driver + + @driver.setter + def driver(self, driver): + """Sets the driver of this V1AllocatedDeviceStatus. + + Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node. Must be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. It should use only lower case characters. # noqa: E501 + + :param driver: The driver of this V1AllocatedDeviceStatus. # noqa: E501 + :type driver: str + """ + if self.local_vars_configuration.client_side_validation and driver is None: # noqa: E501 + raise ValueError("Invalid value for `driver`, must not be `None`") # noqa: E501 + + self._driver = driver + + @property + def network_data(self): + """Gets the network_data of this V1AllocatedDeviceStatus. # noqa: E501 + + + :return: The network_data of this V1AllocatedDeviceStatus. # noqa: E501 + :rtype: V1NetworkDeviceData + """ + return self._network_data + + @network_data.setter + def network_data(self, network_data): + """Sets the network_data of this V1AllocatedDeviceStatus. + + + :param network_data: The network_data of this V1AllocatedDeviceStatus. # noqa: E501 + :type network_data: V1NetworkDeviceData + """ + + self._network_data = network_data + + @property + def pool(self): + """Gets the pool of this V1AllocatedDeviceStatus. # noqa: E501 + + This name together with the driver name and the device name field identify which device was allocated (`//`). Must not be longer than 253 characters and may contain one or more DNS sub-domains separated by slashes. # noqa: E501 + + :return: The pool of this V1AllocatedDeviceStatus. # noqa: E501 + :rtype: str + """ + return self._pool + + @pool.setter + def pool(self, pool): + """Sets the pool of this V1AllocatedDeviceStatus. + + This name together with the driver name and the device name field identify which device was allocated (`//`). Must not be longer than 253 characters and may contain one or more DNS sub-domains separated by slashes. # noqa: E501 + + :param pool: The pool of this V1AllocatedDeviceStatus. # noqa: E501 + :type pool: str + """ + if self.local_vars_configuration.client_side_validation and pool is None: # noqa: E501 + raise ValueError("Invalid value for `pool`, must not be `None`") # noqa: E501 + + self._pool = pool + + @property + def share_id(self): + """Gets the share_id of this V1AllocatedDeviceStatus. # noqa: E501 + + ShareID uniquely identifies an individual allocation share of the device. # noqa: E501 + + :return: The share_id of this V1AllocatedDeviceStatus. # noqa: E501 + :rtype: str + """ + return self._share_id + + @share_id.setter + def share_id(self, share_id): + """Sets the share_id of this V1AllocatedDeviceStatus. + + ShareID uniquely identifies an individual allocation share of the device. # noqa: E501 + + :param share_id: The share_id of this V1AllocatedDeviceStatus. # noqa: E501 + :type share_id: str + """ + + self._share_id = share_id + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1AllocatedDeviceStatus): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1AllocatedDeviceStatus): + return True + + return self.to_dict() != other.to_dict() diff --git a/kubernetes/client/models/v1_allocation_result.py b/kubernetes/client/models/v1_allocation_result.py new file mode 100644 index 0000000000..b1cce49873 --- /dev/null +++ b/kubernetes/client/models/v1_allocation_result.py @@ -0,0 +1,185 @@ +# coding: utf-8 + +""" + Kubernetes + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: release-1.35 + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from kubernetes.client.configuration import Configuration + + +class V1AllocationResult(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'allocation_timestamp': 'datetime', + 'devices': 'V1DeviceAllocationResult', + 'node_selector': 'V1NodeSelector' + } + + attribute_map = { + 'allocation_timestamp': 'allocationTimestamp', + 'devices': 'devices', + 'node_selector': 'nodeSelector' + } + + def __init__(self, allocation_timestamp=None, devices=None, node_selector=None, local_vars_configuration=None): # noqa: E501 + """V1AllocationResult - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._allocation_timestamp = None + self._devices = None + self._node_selector = None + self.discriminator = None + + if allocation_timestamp is not None: + self.allocation_timestamp = allocation_timestamp + if devices is not None: + self.devices = devices + if node_selector is not None: + self.node_selector = node_selector + + @property + def allocation_timestamp(self): + """Gets the allocation_timestamp of this V1AllocationResult. # noqa: E501 + + AllocationTimestamp stores the time when the resources were allocated. This field is not guaranteed to be set, in which case that time is unknown. This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gate. # noqa: E501 + + :return: The allocation_timestamp of this V1AllocationResult. # noqa: E501 + :rtype: datetime + """ + return self._allocation_timestamp + + @allocation_timestamp.setter + def allocation_timestamp(self, allocation_timestamp): + """Sets the allocation_timestamp of this V1AllocationResult. + + AllocationTimestamp stores the time when the resources were allocated. This field is not guaranteed to be set, in which case that time is unknown. This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gate. # noqa: E501 + + :param allocation_timestamp: The allocation_timestamp of this V1AllocationResult. # noqa: E501 + :type allocation_timestamp: datetime + """ + + self._allocation_timestamp = allocation_timestamp + + @property + def devices(self): + """Gets the devices of this V1AllocationResult. # noqa: E501 + + + :return: The devices of this V1AllocationResult. # noqa: E501 + :rtype: V1DeviceAllocationResult + """ + return self._devices + + @devices.setter + def devices(self, devices): + """Sets the devices of this V1AllocationResult. + + + :param devices: The devices of this V1AllocationResult. # noqa: E501 + :type devices: V1DeviceAllocationResult + """ + + self._devices = devices + + @property + def node_selector(self): + """Gets the node_selector of this V1AllocationResult. # noqa: E501 + + + :return: The node_selector of this V1AllocationResult. # noqa: E501 + :rtype: V1NodeSelector + """ + return self._node_selector + + @node_selector.setter + def node_selector(self, node_selector): + """Sets the node_selector of this V1AllocationResult. + + + :param node_selector: The node_selector of this V1AllocationResult. # noqa: E501 + :type node_selector: V1NodeSelector + """ + + self._node_selector = node_selector + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1AllocationResult): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1AllocationResult): + return True + + return self.to_dict() != other.to_dict() diff --git a/kubernetes/client/models/v1_api_group.py b/kubernetes/client/models/v1_api_group.py index a0368bd83d..62aaa7353d 100644 --- a/kubernetes/client/models/v1_api_group.py +++ b/kubernetes/client/models/v1_api_group.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -37,7 +40,7 @@ class V1APIGroup(object): 'kind': 'str', 'name': 'str', 'preferred_version': 'V1GroupVersionForDiscovery', - 'server_address_by_client_cid_rs': 'list[V1ServerAddressByClientCIDR]', + 'server_address_by_client_cidrs': 'list[V1ServerAddressByClientCIDR]', 'versions': 'list[V1GroupVersionForDiscovery]' } @@ -46,21 +49,21 @@ class V1APIGroup(object): 'kind': 'kind', 'name': 'name', 'preferred_version': 'preferredVersion', - 'server_address_by_client_cid_rs': 'serverAddressByClientCIDRs', + 'server_address_by_client_cidrs': 'serverAddressByClientCIDRs', 'versions': 'versions' } - def __init__(self, api_version=None, kind=None, name=None, preferred_version=None, server_address_by_client_cid_rs=None, versions=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, api_version=None, kind=None, name=None, preferred_version=None, server_address_by_client_cidrs=None, versions=None, local_vars_configuration=None): # noqa: E501 """V1APIGroup - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._api_version = None self._kind = None self._name = None self._preferred_version = None - self._server_address_by_client_cid_rs = None + self._server_address_by_client_cidrs = None self._versions = None self.discriminator = None @@ -71,8 +74,8 @@ def __init__(self, api_version=None, kind=None, name=None, preferred_version=Non self.name = name if preferred_version is not None: self.preferred_version = preferred_version - if server_address_by_client_cid_rs is not None: - self.server_address_by_client_cid_rs = server_address_by_client_cid_rs + if server_address_by_client_cidrs is not None: + self.server_address_by_client_cidrs = server_address_by_client_cidrs self.versions = versions @property @@ -93,7 +96,7 @@ def api_version(self, api_version): APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501 :param api_version: The api_version of this V1APIGroup. # noqa: E501 - :type: str + :type api_version: str """ self._api_version = api_version @@ -116,7 +119,7 @@ def kind(self, kind): Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501 :param kind: The kind of this V1APIGroup. # noqa: E501 - :type: str + :type kind: str """ self._kind = kind @@ -139,7 +142,7 @@ def name(self, name): name is the name of the group. # noqa: E501 :param name: The name of this V1APIGroup. # noqa: E501 - :type: str + :type name: str """ if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 @@ -162,33 +165,33 @@ def preferred_version(self, preferred_version): :param preferred_version: The preferred_version of this V1APIGroup. # noqa: E501 - :type: V1GroupVersionForDiscovery + :type preferred_version: V1GroupVersionForDiscovery """ self._preferred_version = preferred_version @property - def server_address_by_client_cid_rs(self): - """Gets the server_address_by_client_cid_rs of this V1APIGroup. # noqa: E501 + def server_address_by_client_cidrs(self): + """Gets the server_address_by_client_cidrs of this V1APIGroup. # noqa: E501 a map of client CIDR to server address that is serving this group. This is to help clients reach servers in the most network-efficient way possible. Clients can use the appropriate server address as per the CIDR that they match. In case of multiple matches, clients should use the longest matching CIDR. The server returns only those CIDRs that it thinks that the client can match. For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP. # noqa: E501 - :return: The server_address_by_client_cid_rs of this V1APIGroup. # noqa: E501 + :return: The server_address_by_client_cidrs of this V1APIGroup. # noqa: E501 :rtype: list[V1ServerAddressByClientCIDR] """ - return self._server_address_by_client_cid_rs + return self._server_address_by_client_cidrs - @server_address_by_client_cid_rs.setter - def server_address_by_client_cid_rs(self, server_address_by_client_cid_rs): - """Sets the server_address_by_client_cid_rs of this V1APIGroup. + @server_address_by_client_cidrs.setter + def server_address_by_client_cidrs(self, server_address_by_client_cidrs): + """Sets the server_address_by_client_cidrs of this V1APIGroup. a map of client CIDR to server address that is serving this group. This is to help clients reach servers in the most network-efficient way possible. Clients can use the appropriate server address as per the CIDR that they match. In case of multiple matches, clients should use the longest matching CIDR. The server returns only those CIDRs that it thinks that the client can match. For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP. # noqa: E501 - :param server_address_by_client_cid_rs: The server_address_by_client_cid_rs of this V1APIGroup. # noqa: E501 - :type: list[V1ServerAddressByClientCIDR] + :param server_address_by_client_cidrs: The server_address_by_client_cidrs of this V1APIGroup. # noqa: E501 + :type server_address_by_client_cidrs: list[V1ServerAddressByClientCIDR] """ - self._server_address_by_client_cid_rs = server_address_by_client_cid_rs + self._server_address_by_client_cidrs = server_address_by_client_cidrs @property def versions(self): @@ -208,34 +211,42 @@ def versions(self, versions): versions are the versions supported in this group. # noqa: E501 :param versions: The versions of this V1APIGroup. # noqa: E501 - :type: list[V1GroupVersionForDiscovery] + :type versions: list[V1GroupVersionForDiscovery] """ if self.local_vars_configuration.client_side_validation and versions is None: # noqa: E501 raise ValueError("Invalid value for `versions`, must not be `None`") # noqa: E501 self._versions = versions - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_api_group_list.py b/kubernetes/client/models/v1_api_group_list.py index 9cdbff77fc..a622ed5149 100644 --- a/kubernetes/client/models/v1_api_group_list.py +++ b/kubernetes/client/models/v1_api_group_list.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -47,7 +50,7 @@ class V1APIGroupList(object): def __init__(self, api_version=None, groups=None, kind=None, local_vars_configuration=None): # noqa: E501 """V1APIGroupList - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._api_version = None @@ -79,7 +82,7 @@ def api_version(self, api_version): APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501 :param api_version: The api_version of this V1APIGroupList. # noqa: E501 - :type: str + :type api_version: str """ self._api_version = api_version @@ -102,7 +105,7 @@ def groups(self, groups): groups is a list of APIGroup. # noqa: E501 :param groups: The groups of this V1APIGroupList. # noqa: E501 - :type: list[V1APIGroup] + :type groups: list[V1APIGroup] """ if self.local_vars_configuration.client_side_validation and groups is None: # noqa: E501 raise ValueError("Invalid value for `groups`, must not be `None`") # noqa: E501 @@ -127,32 +130,40 @@ def kind(self, kind): Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501 :param kind: The kind of this V1APIGroupList. # noqa: E501 - :type: str + :type kind: str """ self._kind = kind - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_api_resource.py b/kubernetes/client/models/v1_api_resource.py index 15e92b3e0b..055cebbb53 100644 --- a/kubernetes/client/models/v1_api_resource.py +++ b/kubernetes/client/models/v1_api_resource.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -61,7 +64,7 @@ class V1APIResource(object): def __init__(self, categories=None, group=None, kind=None, name=None, namespaced=None, short_names=None, singular_name=None, storage_version_hash=None, verbs=None, version=None, local_vars_configuration=None): # noqa: E501 """V1APIResource - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._categories = None @@ -110,7 +113,7 @@ def categories(self, categories): categories is a list of the grouped resources this resource belongs to (e.g. 'all') # noqa: E501 :param categories: The categories of this V1APIResource. # noqa: E501 - :type: list[str] + :type categories: list[str] """ self._categories = categories @@ -133,7 +136,7 @@ def group(self, group): group is the preferred group of the resource. Empty implies the group of the containing resource list. For subresources, this may have a different value, for example: Scale\". # noqa: E501 :param group: The group of this V1APIResource. # noqa: E501 - :type: str + :type group: str """ self._group = group @@ -156,7 +159,7 @@ def kind(self, kind): kind is the kind for the resource (e.g. 'Foo' is the kind for a resource 'foo') # noqa: E501 :param kind: The kind of this V1APIResource. # noqa: E501 - :type: str + :type kind: str """ if self.local_vars_configuration.client_side_validation and kind is None: # noqa: E501 raise ValueError("Invalid value for `kind`, must not be `None`") # noqa: E501 @@ -181,7 +184,7 @@ def name(self, name): name is the plural name of the resource. # noqa: E501 :param name: The name of this V1APIResource. # noqa: E501 - :type: str + :type name: str """ if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 @@ -206,7 +209,7 @@ def namespaced(self, namespaced): namespaced indicates if a resource is namespaced or not. # noqa: E501 :param namespaced: The namespaced of this V1APIResource. # noqa: E501 - :type: bool + :type namespaced: bool """ if self.local_vars_configuration.client_side_validation and namespaced is None: # noqa: E501 raise ValueError("Invalid value for `namespaced`, must not be `None`") # noqa: E501 @@ -231,7 +234,7 @@ def short_names(self, short_names): shortNames is a list of suggested short names of the resource. # noqa: E501 :param short_names: The short_names of this V1APIResource. # noqa: E501 - :type: list[str] + :type short_names: list[str] """ self._short_names = short_names @@ -254,7 +257,7 @@ def singular_name(self, singular_name): singularName is the singular name of the resource. This allows clients to handle plural and singular opaquely. The singularName is more correct for reporting status on a single item and both singular and plural are allowed from the kubectl CLI interface. # noqa: E501 :param singular_name: The singular_name of this V1APIResource. # noqa: E501 - :type: str + :type singular_name: str """ if self.local_vars_configuration.client_side_validation and singular_name is None: # noqa: E501 raise ValueError("Invalid value for `singular_name`, must not be `None`") # noqa: E501 @@ -279,7 +282,7 @@ def storage_version_hash(self, storage_version_hash): The hash value of the storage version, the version this resource is converted to when written to the data store. Value must be treated as opaque by clients. Only equality comparison on the value is valid. This is an alpha feature and may change or be removed in the future. The field is populated by the apiserver only if the StorageVersionHash feature gate is enabled. This field will remain optional even if it graduates. # noqa: E501 :param storage_version_hash: The storage_version_hash of this V1APIResource. # noqa: E501 - :type: str + :type storage_version_hash: str """ self._storage_version_hash = storage_version_hash @@ -302,7 +305,7 @@ def verbs(self, verbs): verbs is a list of supported kube verbs (this includes get, list, watch, create, update, patch, delete, deletecollection, and proxy) # noqa: E501 :param verbs: The verbs of this V1APIResource. # noqa: E501 - :type: list[str] + :type verbs: list[str] """ if self.local_vars_configuration.client_side_validation and verbs is None: # noqa: E501 raise ValueError("Invalid value for `verbs`, must not be `None`") # noqa: E501 @@ -327,32 +330,40 @@ def version(self, version): version is the preferred version of the resource. Empty implies the version of the containing resource list For subresources, this may have a different value, for example: v1 (while inside a v1beta1 version of the core resource's group)\". # noqa: E501 :param version: The version of this V1APIResource. # noqa: E501 - :type: str + :type version: str """ self._version = version - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_api_resource_list.py b/kubernetes/client/models/v1_api_resource_list.py index 80d1bba0b1..974f684016 100644 --- a/kubernetes/client/models/v1_api_resource_list.py +++ b/kubernetes/client/models/v1_api_resource_list.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -49,7 +52,7 @@ class V1APIResourceList(object): def __init__(self, api_version=None, group_version=None, kind=None, resources=None, local_vars_configuration=None): # noqa: E501 """V1APIResourceList - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._api_version = None @@ -83,7 +86,7 @@ def api_version(self, api_version): APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501 :param api_version: The api_version of this V1APIResourceList. # noqa: E501 - :type: str + :type api_version: str """ self._api_version = api_version @@ -106,7 +109,7 @@ def group_version(self, group_version): groupVersion is the group and version this APIResourceList is for. # noqa: E501 :param group_version: The group_version of this V1APIResourceList. # noqa: E501 - :type: str + :type group_version: str """ if self.local_vars_configuration.client_side_validation and group_version is None: # noqa: E501 raise ValueError("Invalid value for `group_version`, must not be `None`") # noqa: E501 @@ -131,7 +134,7 @@ def kind(self, kind): Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501 :param kind: The kind of this V1APIResourceList. # noqa: E501 - :type: str + :type kind: str """ self._kind = kind @@ -154,34 +157,42 @@ def resources(self, resources): resources contains the name of the resources and if they are namespaced. # noqa: E501 :param resources: The resources of this V1APIResourceList. # noqa: E501 - :type: list[V1APIResource] + :type resources: list[V1APIResource] """ if self.local_vars_configuration.client_side_validation and resources is None: # noqa: E501 raise ValueError("Invalid value for `resources`, must not be `None`") # noqa: E501 self._resources = resources - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_api_service.py b/kubernetes/client/models/v1_api_service.py index e53187e3d5..1f763b01cd 100644 --- a/kubernetes/client/models/v1_api_service.py +++ b/kubernetes/client/models/v1_api_service.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -51,7 +54,7 @@ class V1APIService(object): def __init__(self, api_version=None, kind=None, metadata=None, spec=None, status=None, local_vars_configuration=None): # noqa: E501 """V1APIService - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._api_version = None @@ -90,7 +93,7 @@ def api_version(self, api_version): APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501 :param api_version: The api_version of this V1APIService. # noqa: E501 - :type: str + :type api_version: str """ self._api_version = api_version @@ -113,7 +116,7 @@ def kind(self, kind): Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501 :param kind: The kind of this V1APIService. # noqa: E501 - :type: str + :type kind: str """ self._kind = kind @@ -134,7 +137,7 @@ def metadata(self, metadata): :param metadata: The metadata of this V1APIService. # noqa: E501 - :type: V1ObjectMeta + :type metadata: V1ObjectMeta """ self._metadata = metadata @@ -155,7 +158,7 @@ def spec(self, spec): :param spec: The spec of this V1APIService. # noqa: E501 - :type: V1APIServiceSpec + :type spec: V1APIServiceSpec """ self._spec = spec @@ -176,32 +179,40 @@ def status(self, status): :param status: The status of this V1APIService. # noqa: E501 - :type: V1APIServiceStatus + :type status: V1APIServiceStatus """ self._status = status - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_api_service_condition.py b/kubernetes/client/models/v1_api_service_condition.py index aad9b59dc7..9bfc63f187 100644 --- a/kubernetes/client/models/v1_api_service_condition.py +++ b/kubernetes/client/models/v1_api_service_condition.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -51,7 +54,7 @@ class V1APIServiceCondition(object): def __init__(self, last_transition_time=None, message=None, reason=None, status=None, type=None, local_vars_configuration=None): # noqa: E501 """V1APIServiceCondition - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._last_transition_time = None @@ -88,7 +91,7 @@ def last_transition_time(self, last_transition_time): Last time the condition transitioned from one status to another. # noqa: E501 :param last_transition_time: The last_transition_time of this V1APIServiceCondition. # noqa: E501 - :type: datetime + :type last_transition_time: datetime """ self._last_transition_time = last_transition_time @@ -111,7 +114,7 @@ def message(self, message): Human-readable message indicating details about last transition. # noqa: E501 :param message: The message of this V1APIServiceCondition. # noqa: E501 - :type: str + :type message: str """ self._message = message @@ -134,7 +137,7 @@ def reason(self, reason): Unique, one-word, CamelCase reason for the condition's last transition. # noqa: E501 :param reason: The reason of this V1APIServiceCondition. # noqa: E501 - :type: str + :type reason: str """ self._reason = reason @@ -157,7 +160,7 @@ def status(self, status): Status is the status of the condition. Can be True, False, Unknown. # noqa: E501 :param status: The status of this V1APIServiceCondition. # noqa: E501 - :type: str + :type status: str """ if self.local_vars_configuration.client_side_validation and status is None: # noqa: E501 raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 @@ -182,34 +185,42 @@ def type(self, type): Type is the type of the condition. # noqa: E501 :param type: The type of this V1APIServiceCondition. # noqa: E501 - :type: str + :type type: str """ if self.local_vars_configuration.client_side_validation and type is None: # noqa: E501 raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 self._type = type - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_api_service_list.py b/kubernetes/client/models/v1_api_service_list.py index cd63214c01..a9456d5e20 100644 --- a/kubernetes/client/models/v1_api_service_list.py +++ b/kubernetes/client/models/v1_api_service_list.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -49,7 +52,7 @@ class V1APIServiceList(object): def __init__(self, api_version=None, items=None, kind=None, metadata=None, local_vars_configuration=None): # noqa: E501 """V1APIServiceList - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._api_version = None @@ -84,7 +87,7 @@ def api_version(self, api_version): APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501 :param api_version: The api_version of this V1APIServiceList. # noqa: E501 - :type: str + :type api_version: str """ self._api_version = api_version @@ -107,7 +110,7 @@ def items(self, items): Items is the list of APIService # noqa: E501 :param items: The items of this V1APIServiceList. # noqa: E501 - :type: list[V1APIService] + :type items: list[V1APIService] """ if self.local_vars_configuration.client_side_validation and items is None: # noqa: E501 raise ValueError("Invalid value for `items`, must not be `None`") # noqa: E501 @@ -132,7 +135,7 @@ def kind(self, kind): Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501 :param kind: The kind of this V1APIServiceList. # noqa: E501 - :type: str + :type kind: str """ self._kind = kind @@ -153,32 +156,40 @@ def metadata(self, metadata): :param metadata: The metadata of this V1APIServiceList. # noqa: E501 - :type: V1ListMeta + :type metadata: V1ListMeta """ self._metadata = metadata - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_api_service_spec.py b/kubernetes/client/models/v1_api_service_spec.py index 1d29cf462f..641c23d909 100644 --- a/kubernetes/client/models/v1_api_service_spec.py +++ b/kubernetes/client/models/v1_api_service_spec.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -55,7 +58,7 @@ class V1APIServiceSpec(object): def __init__(self, ca_bundle=None, group=None, group_priority_minimum=None, insecure_skip_tls_verify=None, service=None, version=None, version_priority=None, local_vars_configuration=None): # noqa: E501 """V1APIServiceSpec - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._ca_bundle = None @@ -98,7 +101,7 @@ def ca_bundle(self, ca_bundle): CABundle is a PEM encoded CA bundle which will be used to validate an API server's serving certificate. If unspecified, system trust roots on the apiserver are used. # noqa: E501 :param ca_bundle: The ca_bundle of this V1APIServiceSpec. # noqa: E501 - :type: str + :type ca_bundle: str """ if (self.local_vars_configuration.client_side_validation and ca_bundle is not None and not re.search(r'^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$', ca_bundle)): # noqa: E501 @@ -124,7 +127,7 @@ def group(self, group): Group is the API group name this server hosts # noqa: E501 :param group: The group of this V1APIServiceSpec. # noqa: E501 - :type: str + :type group: str """ self._group = group @@ -147,7 +150,7 @@ def group_priority_minimum(self, group_priority_minimum): GroupPriorityMinimum is the priority this group should have at least. Higher priority means that the group is preferred by clients over lower priority ones. Note that other versions of this group might specify even higher GroupPriorityMinimum values such that the whole group gets a higher priority. The primary sort is based on GroupPriorityMinimum, ordered highest number to lowest (20 before 10). The secondary sort is based on the alphabetical comparison of the name of the object. (v1.bar before v1.foo) We'd recommend something like: *.k8s.io (except extensions) at 18000 and PaaSes (OpenShift, Deis) are recommended to be in the 2000s # noqa: E501 :param group_priority_minimum: The group_priority_minimum of this V1APIServiceSpec. # noqa: E501 - :type: int + :type group_priority_minimum: int """ if self.local_vars_configuration.client_side_validation and group_priority_minimum is None: # noqa: E501 raise ValueError("Invalid value for `group_priority_minimum`, must not be `None`") # noqa: E501 @@ -172,7 +175,7 @@ def insecure_skip_tls_verify(self, insecure_skip_tls_verify): InsecureSkipTLSVerify disables TLS certificate verification when communicating with this server. This is strongly discouraged. You should use the CABundle instead. # noqa: E501 :param insecure_skip_tls_verify: The insecure_skip_tls_verify of this V1APIServiceSpec. # noqa: E501 - :type: bool + :type insecure_skip_tls_verify: bool """ self._insecure_skip_tls_verify = insecure_skip_tls_verify @@ -193,7 +196,7 @@ def service(self, service): :param service: The service of this V1APIServiceSpec. # noqa: E501 - :type: ApiregistrationV1ServiceReference + :type service: ApiregistrationV1ServiceReference """ self._service = service @@ -216,7 +219,7 @@ def version(self, version): Version is the API version this server hosts. For example, \"v1\" # noqa: E501 :param version: The version of this V1APIServiceSpec. # noqa: E501 - :type: str + :type version: str """ self._version = version @@ -239,34 +242,42 @@ def version_priority(self, version_priority): VersionPriority controls the ordering of this API version inside of its group. Must be greater than zero. The primary sort is based on VersionPriority, ordered highest to lowest (20 before 10). Since it's inside of a group, the number can be small, probably in the 10s. In case of equal version priorities, the version string will be used to compute the order inside a group. If the version string is \"kube-like\", it will sort above non \"kube-like\" version strings, which are ordered lexicographically. \"Kube-like\" versions start with a \"v\", then are followed by a number (the major version), then optionally the string \"alpha\" or \"beta\" and another number (the minor version). These are sorted first by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing major version, then minor version. An example sorted list of versions: v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10. # noqa: E501 :param version_priority: The version_priority of this V1APIServiceSpec. # noqa: E501 - :type: int + :type version_priority: int """ if self.local_vars_configuration.client_side_validation and version_priority is None: # noqa: E501 raise ValueError("Invalid value for `version_priority`, must not be `None`") # noqa: E501 self._version_priority = version_priority - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_api_service_status.py b/kubernetes/client/models/v1_api_service_status.py index 0305937d03..3e0bf70003 100644 --- a/kubernetes/client/models/v1_api_service_status.py +++ b/kubernetes/client/models/v1_api_service_status.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -43,7 +46,7 @@ class V1APIServiceStatus(object): def __init__(self, conditions=None, local_vars_configuration=None): # noqa: E501 """V1APIServiceStatus - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._conditions = None @@ -70,32 +73,40 @@ def conditions(self, conditions): Current service state of apiService. # noqa: E501 :param conditions: The conditions of this V1APIServiceStatus. # noqa: E501 - :type: list[V1APIServiceCondition] + :type conditions: list[V1APIServiceCondition] """ self._conditions = conditions - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_api_versions.py b/kubernetes/client/models/v1_api_versions.py index 15cce92ae6..4db5424e37 100644 --- a/kubernetes/client/models/v1_api_versions.py +++ b/kubernetes/client/models/v1_api_versions.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -35,26 +38,26 @@ class V1APIVersions(object): openapi_types = { 'api_version': 'str', 'kind': 'str', - 'server_address_by_client_cid_rs': 'list[V1ServerAddressByClientCIDR]', + 'server_address_by_client_cidrs': 'list[V1ServerAddressByClientCIDR]', 'versions': 'list[str]' } attribute_map = { 'api_version': 'apiVersion', 'kind': 'kind', - 'server_address_by_client_cid_rs': 'serverAddressByClientCIDRs', + 'server_address_by_client_cidrs': 'serverAddressByClientCIDRs', 'versions': 'versions' } - def __init__(self, api_version=None, kind=None, server_address_by_client_cid_rs=None, versions=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, api_version=None, kind=None, server_address_by_client_cidrs=None, versions=None, local_vars_configuration=None): # noqa: E501 """V1APIVersions - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._api_version = None self._kind = None - self._server_address_by_client_cid_rs = None + self._server_address_by_client_cidrs = None self._versions = None self.discriminator = None @@ -62,7 +65,7 @@ def __init__(self, api_version=None, kind=None, server_address_by_client_cid_rs= self.api_version = api_version if kind is not None: self.kind = kind - self.server_address_by_client_cid_rs = server_address_by_client_cid_rs + self.server_address_by_client_cidrs = server_address_by_client_cidrs self.versions = versions @property @@ -83,7 +86,7 @@ def api_version(self, api_version): APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501 :param api_version: The api_version of this V1APIVersions. # noqa: E501 - :type: str + :type api_version: str """ self._api_version = api_version @@ -106,35 +109,35 @@ def kind(self, kind): Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501 :param kind: The kind of this V1APIVersions. # noqa: E501 - :type: str + :type kind: str """ self._kind = kind @property - def server_address_by_client_cid_rs(self): - """Gets the server_address_by_client_cid_rs of this V1APIVersions. # noqa: E501 + def server_address_by_client_cidrs(self): + """Gets the server_address_by_client_cidrs of this V1APIVersions. # noqa: E501 a map of client CIDR to server address that is serving this group. This is to help clients reach servers in the most network-efficient way possible. Clients can use the appropriate server address as per the CIDR that they match. In case of multiple matches, clients should use the longest matching CIDR. The server returns only those CIDRs that it thinks that the client can match. For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP. # noqa: E501 - :return: The server_address_by_client_cid_rs of this V1APIVersions. # noqa: E501 + :return: The server_address_by_client_cidrs of this V1APIVersions. # noqa: E501 :rtype: list[V1ServerAddressByClientCIDR] """ - return self._server_address_by_client_cid_rs + return self._server_address_by_client_cidrs - @server_address_by_client_cid_rs.setter - def server_address_by_client_cid_rs(self, server_address_by_client_cid_rs): - """Sets the server_address_by_client_cid_rs of this V1APIVersions. + @server_address_by_client_cidrs.setter + def server_address_by_client_cidrs(self, server_address_by_client_cidrs): + """Sets the server_address_by_client_cidrs of this V1APIVersions. a map of client CIDR to server address that is serving this group. This is to help clients reach servers in the most network-efficient way possible. Clients can use the appropriate server address as per the CIDR that they match. In case of multiple matches, clients should use the longest matching CIDR. The server returns only those CIDRs that it thinks that the client can match. For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP. # noqa: E501 - :param server_address_by_client_cid_rs: The server_address_by_client_cid_rs of this V1APIVersions. # noqa: E501 - :type: list[V1ServerAddressByClientCIDR] + :param server_address_by_client_cidrs: The server_address_by_client_cidrs of this V1APIVersions. # noqa: E501 + :type server_address_by_client_cidrs: list[V1ServerAddressByClientCIDR] """ - if self.local_vars_configuration.client_side_validation and server_address_by_client_cid_rs is None: # noqa: E501 - raise ValueError("Invalid value for `server_address_by_client_cid_rs`, must not be `None`") # noqa: E501 + if self.local_vars_configuration.client_side_validation and server_address_by_client_cidrs is None: # noqa: E501 + raise ValueError("Invalid value for `server_address_by_client_cidrs`, must not be `None`") # noqa: E501 - self._server_address_by_client_cid_rs = server_address_by_client_cid_rs + self._server_address_by_client_cidrs = server_address_by_client_cidrs @property def versions(self): @@ -154,34 +157,42 @@ def versions(self, versions): versions are the api versions that are available. # noqa: E501 :param versions: The versions of this V1APIVersions. # noqa: E501 - :type: list[str] + :type versions: list[str] """ if self.local_vars_configuration.client_side_validation and versions is None: # noqa: E501 raise ValueError("Invalid value for `versions`, must not be `None`") # noqa: E501 self._versions = versions - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_app_armor_profile.py b/kubernetes/client/models/v1_app_armor_profile.py index 8d2321449b..e02e112570 100644 --- a/kubernetes/client/models/v1_app_armor_profile.py +++ b/kubernetes/client/models/v1_app_armor_profile.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -45,7 +48,7 @@ class V1AppArmorProfile(object): def __init__(self, localhost_profile=None, type=None, local_vars_configuration=None): # noqa: E501 """V1AppArmorProfile - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._localhost_profile = None @@ -74,7 +77,7 @@ def localhost_profile(self, localhost_profile): localhostProfile indicates a profile loaded on the node that should be used. The profile must be preconfigured on the node to work. Must match the loaded name of the profile. Must be set if and only if type is \"Localhost\". # noqa: E501 :param localhost_profile: The localhost_profile of this V1AppArmorProfile. # noqa: E501 - :type: str + :type localhost_profile: str """ self._localhost_profile = localhost_profile @@ -97,34 +100,42 @@ def type(self, type): type indicates which kind of AppArmor profile will be applied. Valid options are: Localhost - a profile pre-loaded on the node. RuntimeDefault - the container runtime's default profile. Unconfined - no AppArmor enforcement. # noqa: E501 :param type: The type of this V1AppArmorProfile. # noqa: E501 - :type: str + :type type: str """ if self.local_vars_configuration.client_side_validation and type is None: # noqa: E501 raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 self._type = type - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_attached_volume.py b/kubernetes/client/models/v1_attached_volume.py index 4f19e2d0a1..95f116c0be 100644 --- a/kubernetes/client/models/v1_attached_volume.py +++ b/kubernetes/client/models/v1_attached_volume.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -45,7 +48,7 @@ class V1AttachedVolume(object): def __init__(self, device_path=None, name=None, local_vars_configuration=None): # noqa: E501 """V1AttachedVolume - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._device_path = None @@ -73,7 +76,7 @@ def device_path(self, device_path): DevicePath represents the device path where the volume should be available # noqa: E501 :param device_path: The device_path of this V1AttachedVolume. # noqa: E501 - :type: str + :type device_path: str """ if self.local_vars_configuration.client_side_validation and device_path is None: # noqa: E501 raise ValueError("Invalid value for `device_path`, must not be `None`") # noqa: E501 @@ -98,34 +101,42 @@ def name(self, name): Name of the attached volume # noqa: E501 :param name: The name of this V1AttachedVolume. # noqa: E501 - :type: str + :type name: str """ if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 self._name = name - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_audit_annotation.py b/kubernetes/client/models/v1_audit_annotation.py index bf56986ba2..626d257d09 100644 --- a/kubernetes/client/models/v1_audit_annotation.py +++ b/kubernetes/client/models/v1_audit_annotation.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -45,7 +48,7 @@ class V1AuditAnnotation(object): def __init__(self, key=None, value_expression=None, local_vars_configuration=None): # noqa: E501 """V1AuditAnnotation - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._key = None @@ -73,7 +76,7 @@ def key(self, key): key specifies the audit annotation key. The audit annotation keys of a ValidatingAdmissionPolicy must be unique. The key must be a qualified name ([A-Za-z0-9][-A-Za-z0-9_.]*) no more than 63 bytes in length. The key is combined with the resource name of the ValidatingAdmissionPolicy to construct an audit annotation key: \"{ValidatingAdmissionPolicy name}/{key}\". If an admission webhook uses the same resource name as this ValidatingAdmissionPolicy and the same audit annotation key, the annotation key will be identical. In this case, the first annotation written with the key will be included in the audit event and all subsequent annotations with the same key will be discarded. Required. # noqa: E501 :param key: The key of this V1AuditAnnotation. # noqa: E501 - :type: str + :type key: str """ if self.local_vars_configuration.client_side_validation and key is None: # noqa: E501 raise ValueError("Invalid value for `key`, must not be `None`") # noqa: E501 @@ -98,34 +101,42 @@ def value_expression(self, value_expression): valueExpression represents the expression which is evaluated by CEL to produce an audit annotation value. The expression must evaluate to either a string or null value. If the expression evaluates to a string, the audit annotation is included with the string value. If the expression evaluates to null or empty string the audit annotation will be omitted. The valueExpression may be no longer than 5kb in length. If the result of the valueExpression is more than 10kb in length, it will be truncated to 10kb. If multiple ValidatingAdmissionPolicyBinding resources match an API request, then the valueExpression will be evaluated for each binding. All unique values produced by the valueExpressions will be joined together in a comma-separated list. Required. # noqa: E501 :param value_expression: The value_expression of this V1AuditAnnotation. # noqa: E501 - :type: str + :type value_expression: str """ if self.local_vars_configuration.client_side_validation and value_expression is None: # noqa: E501 raise ValueError("Invalid value for `value_expression`, must not be `None`") # noqa: E501 self._value_expression = value_expression - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_aws_elastic_block_store_volume_source.py b/kubernetes/client/models/v1_aws_elastic_block_store_volume_source.py index b5065feaa7..9c2ffe7836 100644 --- a/kubernetes/client/models/v1_aws_elastic_block_store_volume_source.py +++ b/kubernetes/client/models/v1_aws_elastic_block_store_volume_source.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -49,7 +52,7 @@ class V1AWSElasticBlockStoreVolumeSource(object): def __init__(self, fs_type=None, partition=None, read_only=None, volume_id=None, local_vars_configuration=None): # noqa: E501 """V1AWSElasticBlockStoreVolumeSource - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._fs_type = None @@ -84,7 +87,7 @@ def fs_type(self, fs_type): fsType is the filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore # noqa: E501 :param fs_type: The fs_type of this V1AWSElasticBlockStoreVolumeSource. # noqa: E501 - :type: str + :type fs_type: str """ self._fs_type = fs_type @@ -107,7 +110,7 @@ def partition(self, partition): partition is the partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as \"1\". Similarly, the volume partition for /dev/sda is \"0\" (or you can leave the property empty). # noqa: E501 :param partition: The partition of this V1AWSElasticBlockStoreVolumeSource. # noqa: E501 - :type: int + :type partition: int """ self._partition = partition @@ -130,7 +133,7 @@ def read_only(self, read_only): readOnly value true will force the readOnly setting in VolumeMounts. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore # noqa: E501 :param read_only: The read_only of this V1AWSElasticBlockStoreVolumeSource. # noqa: E501 - :type: bool + :type read_only: bool """ self._read_only = read_only @@ -153,34 +156,42 @@ def volume_id(self, volume_id): volumeID is unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore # noqa: E501 :param volume_id: The volume_id of this V1AWSElasticBlockStoreVolumeSource. # noqa: E501 - :type: str + :type volume_id: str """ if self.local_vars_configuration.client_side_validation and volume_id is None: # noqa: E501 raise ValueError("Invalid value for `volume_id`, must not be `None`") # noqa: E501 self._volume_id = volume_id - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_azure_disk_volume_source.py b/kubernetes/client/models/v1_azure_disk_volume_source.py index 0c6faa09aa..a87e334abb 100644 --- a/kubernetes/client/models/v1_azure_disk_volume_source.py +++ b/kubernetes/client/models/v1_azure_disk_volume_source.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -53,7 +56,7 @@ class V1AzureDiskVolumeSource(object): def __init__(self, caching_mode=None, disk_name=None, disk_uri=None, fs_type=None, kind=None, read_only=None, local_vars_configuration=None): # noqa: E501 """V1AzureDiskVolumeSource - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._caching_mode = None @@ -93,7 +96,7 @@ def caching_mode(self, caching_mode): cachingMode is the Host Caching mode: None, Read Only, Read Write. # noqa: E501 :param caching_mode: The caching_mode of this V1AzureDiskVolumeSource. # noqa: E501 - :type: str + :type caching_mode: str """ self._caching_mode = caching_mode @@ -116,7 +119,7 @@ def disk_name(self, disk_name): diskName is the Name of the data disk in the blob storage # noqa: E501 :param disk_name: The disk_name of this V1AzureDiskVolumeSource. # noqa: E501 - :type: str + :type disk_name: str """ if self.local_vars_configuration.client_side_validation and disk_name is None: # noqa: E501 raise ValueError("Invalid value for `disk_name`, must not be `None`") # noqa: E501 @@ -141,7 +144,7 @@ def disk_uri(self, disk_uri): diskURI is the URI of data disk in the blob storage # noqa: E501 :param disk_uri: The disk_uri of this V1AzureDiskVolumeSource. # noqa: E501 - :type: str + :type disk_uri: str """ if self.local_vars_configuration.client_side_validation and disk_uri is None: # noqa: E501 raise ValueError("Invalid value for `disk_uri`, must not be `None`") # noqa: E501 @@ -166,7 +169,7 @@ def fs_type(self, fs_type): fsType is Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. # noqa: E501 :param fs_type: The fs_type of this V1AzureDiskVolumeSource. # noqa: E501 - :type: str + :type fs_type: str """ self._fs_type = fs_type @@ -189,7 +192,7 @@ def kind(self, kind): kind expected values are Shared: multiple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data disk (only in managed availability set). defaults to shared # noqa: E501 :param kind: The kind of this V1AzureDiskVolumeSource. # noqa: E501 - :type: str + :type kind: str """ self._kind = kind @@ -212,32 +215,40 @@ def read_only(self, read_only): readOnly Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. # noqa: E501 :param read_only: The read_only of this V1AzureDiskVolumeSource. # noqa: E501 - :type: bool + :type read_only: bool """ self._read_only = read_only - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_azure_file_persistent_volume_source.py b/kubernetes/client/models/v1_azure_file_persistent_volume_source.py index 648995c1f6..3802fe5ebd 100644 --- a/kubernetes/client/models/v1_azure_file_persistent_volume_source.py +++ b/kubernetes/client/models/v1_azure_file_persistent_volume_source.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -49,7 +52,7 @@ class V1AzureFilePersistentVolumeSource(object): def __init__(self, read_only=None, secret_name=None, secret_namespace=None, share_name=None, local_vars_configuration=None): # noqa: E501 """V1AzureFilePersistentVolumeSource - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._read_only = None @@ -83,7 +86,7 @@ def read_only(self, read_only): readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. # noqa: E501 :param read_only: The read_only of this V1AzureFilePersistentVolumeSource. # noqa: E501 - :type: bool + :type read_only: bool """ self._read_only = read_only @@ -106,7 +109,7 @@ def secret_name(self, secret_name): secretName is the name of secret that contains Azure Storage Account Name and Key # noqa: E501 :param secret_name: The secret_name of this V1AzureFilePersistentVolumeSource. # noqa: E501 - :type: str + :type secret_name: str """ if self.local_vars_configuration.client_side_validation and secret_name is None: # noqa: E501 raise ValueError("Invalid value for `secret_name`, must not be `None`") # noqa: E501 @@ -131,7 +134,7 @@ def secret_namespace(self, secret_namespace): secretNamespace is the namespace of the secret that contains Azure Storage Account Name and Key default is the same as the Pod # noqa: E501 :param secret_namespace: The secret_namespace of this V1AzureFilePersistentVolumeSource. # noqa: E501 - :type: str + :type secret_namespace: str """ self._secret_namespace = secret_namespace @@ -154,34 +157,42 @@ def share_name(self, share_name): shareName is the azure Share Name # noqa: E501 :param share_name: The share_name of this V1AzureFilePersistentVolumeSource. # noqa: E501 - :type: str + :type share_name: str """ if self.local_vars_configuration.client_side_validation and share_name is None: # noqa: E501 raise ValueError("Invalid value for `share_name`, must not be `None`") # noqa: E501 self._share_name = share_name - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_azure_file_volume_source.py b/kubernetes/client/models/v1_azure_file_volume_source.py index e99d6476ad..4e46f13972 100644 --- a/kubernetes/client/models/v1_azure_file_volume_source.py +++ b/kubernetes/client/models/v1_azure_file_volume_source.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -47,7 +50,7 @@ class V1AzureFileVolumeSource(object): def __init__(self, read_only=None, secret_name=None, share_name=None, local_vars_configuration=None): # noqa: E501 """V1AzureFileVolumeSource - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._read_only = None @@ -78,7 +81,7 @@ def read_only(self, read_only): readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. # noqa: E501 :param read_only: The read_only of this V1AzureFileVolumeSource. # noqa: E501 - :type: bool + :type read_only: bool """ self._read_only = read_only @@ -101,7 +104,7 @@ def secret_name(self, secret_name): secretName is the name of secret that contains Azure Storage Account Name and Key # noqa: E501 :param secret_name: The secret_name of this V1AzureFileVolumeSource. # noqa: E501 - :type: str + :type secret_name: str """ if self.local_vars_configuration.client_side_validation and secret_name is None: # noqa: E501 raise ValueError("Invalid value for `secret_name`, must not be `None`") # noqa: E501 @@ -126,34 +129,42 @@ def share_name(self, share_name): shareName is the azure share Name # noqa: E501 :param share_name: The share_name of this V1AzureFileVolumeSource. # noqa: E501 - :type: str + :type share_name: str """ if self.local_vars_configuration.client_side_validation and share_name is None: # noqa: E501 raise ValueError("Invalid value for `share_name`, must not be `None`") # noqa: E501 self._share_name = share_name - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_binding.py b/kubernetes/client/models/v1_binding.py index 2db9a8c711..05233956dc 100644 --- a/kubernetes/client/models/v1_binding.py +++ b/kubernetes/client/models/v1_binding.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -49,7 +52,7 @@ class V1Binding(object): def __init__(self, api_version=None, kind=None, metadata=None, target=None, local_vars_configuration=None): # noqa: E501 """V1Binding - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._api_version = None @@ -84,7 +87,7 @@ def api_version(self, api_version): APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501 :param api_version: The api_version of this V1Binding. # noqa: E501 - :type: str + :type api_version: str """ self._api_version = api_version @@ -107,7 +110,7 @@ def kind(self, kind): Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501 :param kind: The kind of this V1Binding. # noqa: E501 - :type: str + :type kind: str """ self._kind = kind @@ -128,7 +131,7 @@ def metadata(self, metadata): :param metadata: The metadata of this V1Binding. # noqa: E501 - :type: V1ObjectMeta + :type metadata: V1ObjectMeta """ self._metadata = metadata @@ -149,34 +152,42 @@ def target(self, target): :param target: The target of this V1Binding. # noqa: E501 - :type: V1ObjectReference + :type target: V1ObjectReference """ if self.local_vars_configuration.client_side_validation and target is None: # noqa: E501 raise ValueError("Invalid value for `target`, must not be `None`") # noqa: E501 self._target = target - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_bound_object_reference.py b/kubernetes/client/models/v1_bound_object_reference.py index bc8c625863..5e094c1390 100644 --- a/kubernetes/client/models/v1_bound_object_reference.py +++ b/kubernetes/client/models/v1_bound_object_reference.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -49,7 +52,7 @@ class V1BoundObjectReference(object): def __init__(self, api_version=None, kind=None, name=None, uid=None, local_vars_configuration=None): # noqa: E501 """V1BoundObjectReference - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._api_version = None @@ -85,7 +88,7 @@ def api_version(self, api_version): API version of the referent. # noqa: E501 :param api_version: The api_version of this V1BoundObjectReference. # noqa: E501 - :type: str + :type api_version: str """ self._api_version = api_version @@ -108,7 +111,7 @@ def kind(self, kind): Kind of the referent. Valid kinds are 'Pod' and 'Secret'. # noqa: E501 :param kind: The kind of this V1BoundObjectReference. # noqa: E501 - :type: str + :type kind: str """ self._kind = kind @@ -131,7 +134,7 @@ def name(self, name): Name of the referent. # noqa: E501 :param name: The name of this V1BoundObjectReference. # noqa: E501 - :type: str + :type name: str """ self._name = name @@ -154,32 +157,40 @@ def uid(self, uid): UID of the referent. # noqa: E501 :param uid: The uid of this V1BoundObjectReference. # noqa: E501 - :type: str + :type uid: str """ self._uid = uid - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_capabilities.py b/kubernetes/client/models/v1_capabilities.py index 3e6525d450..d11288b9f8 100644 --- a/kubernetes/client/models/v1_capabilities.py +++ b/kubernetes/client/models/v1_capabilities.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -45,7 +48,7 @@ class V1Capabilities(object): def __init__(self, add=None, drop=None, local_vars_configuration=None): # noqa: E501 """V1Capabilities - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._add = None @@ -75,7 +78,7 @@ def add(self, add): Added capabilities # noqa: E501 :param add: The add of this V1Capabilities. # noqa: E501 - :type: list[str] + :type add: list[str] """ self._add = add @@ -98,32 +101,40 @@ def drop(self, drop): Removed capabilities # noqa: E501 :param drop: The drop of this V1Capabilities. # noqa: E501 - :type: list[str] + :type drop: list[str] """ self._drop = drop - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_capacity_request_policy.py b/kubernetes/client/models/v1_capacity_request_policy.py new file mode 100644 index 0000000000..92de6e4989 --- /dev/null +++ b/kubernetes/client/models/v1_capacity_request_policy.py @@ -0,0 +1,187 @@ +# coding: utf-8 + +""" + Kubernetes + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: release-1.35 + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from kubernetes.client.configuration import Configuration + + +class V1CapacityRequestPolicy(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'default': 'str', + 'valid_range': 'V1CapacityRequestPolicyRange', + 'valid_values': 'list[str]' + } + + attribute_map = { + 'default': 'default', + 'valid_range': 'validRange', + 'valid_values': 'validValues' + } + + def __init__(self, default=None, valid_range=None, valid_values=None, local_vars_configuration=None): # noqa: E501 + """V1CapacityRequestPolicy - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._default = None + self._valid_range = None + self._valid_values = None + self.discriminator = None + + if default is not None: + self.default = default + if valid_range is not None: + self.valid_range = valid_range + if valid_values is not None: + self.valid_values = valid_values + + @property + def default(self): + """Gets the default of this V1CapacityRequestPolicy. # noqa: E501 + + Default specifies how much of this capacity is consumed by a request that does not contain an entry for it in DeviceRequest's Capacity. # noqa: E501 + + :return: The default of this V1CapacityRequestPolicy. # noqa: E501 + :rtype: str + """ + return self._default + + @default.setter + def default(self, default): + """Sets the default of this V1CapacityRequestPolicy. + + Default specifies how much of this capacity is consumed by a request that does not contain an entry for it in DeviceRequest's Capacity. # noqa: E501 + + :param default: The default of this V1CapacityRequestPolicy. # noqa: E501 + :type default: str + """ + + self._default = default + + @property + def valid_range(self): + """Gets the valid_range of this V1CapacityRequestPolicy. # noqa: E501 + + + :return: The valid_range of this V1CapacityRequestPolicy. # noqa: E501 + :rtype: V1CapacityRequestPolicyRange + """ + return self._valid_range + + @valid_range.setter + def valid_range(self, valid_range): + """Sets the valid_range of this V1CapacityRequestPolicy. + + + :param valid_range: The valid_range of this V1CapacityRequestPolicy. # noqa: E501 + :type valid_range: V1CapacityRequestPolicyRange + """ + + self._valid_range = valid_range + + @property + def valid_values(self): + """Gets the valid_values of this V1CapacityRequestPolicy. # noqa: E501 + + ValidValues defines a set of acceptable quantity values in consuming requests. Must not contain more than 10 entries. Must be sorted in ascending order. If this field is set, Default must be defined and it must be included in ValidValues list. If the requested amount does not match any valid value but smaller than some valid values, the scheduler calculates the smallest valid value that is greater than or equal to the request. That is: min(ceil(requestedValue) ∈ validValues), where requestedValue ≤ max(validValues). If the requested amount exceeds all valid values, the request violates the policy, and this device cannot be allocated. # noqa: E501 + + :return: The valid_values of this V1CapacityRequestPolicy. # noqa: E501 + :rtype: list[str] + """ + return self._valid_values + + @valid_values.setter + def valid_values(self, valid_values): + """Sets the valid_values of this V1CapacityRequestPolicy. + + ValidValues defines a set of acceptable quantity values in consuming requests. Must not contain more than 10 entries. Must be sorted in ascending order. If this field is set, Default must be defined and it must be included in ValidValues list. If the requested amount does not match any valid value but smaller than some valid values, the scheduler calculates the smallest valid value that is greater than or equal to the request. That is: min(ceil(requestedValue) ∈ validValues), where requestedValue ≤ max(validValues). If the requested amount exceeds all valid values, the request violates the policy, and this device cannot be allocated. # noqa: E501 + + :param valid_values: The valid_values of this V1CapacityRequestPolicy. # noqa: E501 + :type valid_values: list[str] + """ + + self._valid_values = valid_values + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1CapacityRequestPolicy): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1CapacityRequestPolicy): + return True + + return self.to_dict() != other.to_dict() diff --git a/kubernetes/client/models/v1_capacity_request_policy_range.py b/kubernetes/client/models/v1_capacity_request_policy_range.py new file mode 100644 index 0000000000..2e0564e2a2 --- /dev/null +++ b/kubernetes/client/models/v1_capacity_request_policy_range.py @@ -0,0 +1,190 @@ +# coding: utf-8 + +""" + Kubernetes + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: release-1.35 + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from kubernetes.client.configuration import Configuration + + +class V1CapacityRequestPolicyRange(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'max': 'str', + 'min': 'str', + 'step': 'str' + } + + attribute_map = { + 'max': 'max', + 'min': 'min', + 'step': 'step' + } + + def __init__(self, max=None, min=None, step=None, local_vars_configuration=None): # noqa: E501 + """V1CapacityRequestPolicyRange - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._max = None + self._min = None + self._step = None + self.discriminator = None + + if max is not None: + self.max = max + self.min = min + if step is not None: + self.step = step + + @property + def max(self): + """Gets the max of this V1CapacityRequestPolicyRange. # noqa: E501 + + Max defines the upper limit for capacity that can be requested. Max must be less than or equal to the capacity value. Min and requestPolicy.default must be less than or equal to the maximum. # noqa: E501 + + :return: The max of this V1CapacityRequestPolicyRange. # noqa: E501 + :rtype: str + """ + return self._max + + @max.setter + def max(self, max): + """Sets the max of this V1CapacityRequestPolicyRange. + + Max defines the upper limit for capacity that can be requested. Max must be less than or equal to the capacity value. Min and requestPolicy.default must be less than or equal to the maximum. # noqa: E501 + + :param max: The max of this V1CapacityRequestPolicyRange. # noqa: E501 + :type max: str + """ + + self._max = max + + @property + def min(self): + """Gets the min of this V1CapacityRequestPolicyRange. # noqa: E501 + + Min specifies the minimum capacity allowed for a consumption request. Min must be greater than or equal to zero, and less than or equal to the capacity value. requestPolicy.default must be more than or equal to the minimum. # noqa: E501 + + :return: The min of this V1CapacityRequestPolicyRange. # noqa: E501 + :rtype: str + """ + return self._min + + @min.setter + def min(self, min): + """Sets the min of this V1CapacityRequestPolicyRange. + + Min specifies the minimum capacity allowed for a consumption request. Min must be greater than or equal to zero, and less than or equal to the capacity value. requestPolicy.default must be more than or equal to the minimum. # noqa: E501 + + :param min: The min of this V1CapacityRequestPolicyRange. # noqa: E501 + :type min: str + """ + if self.local_vars_configuration.client_side_validation and min is None: # noqa: E501 + raise ValueError("Invalid value for `min`, must not be `None`") # noqa: E501 + + self._min = min + + @property + def step(self): + """Gets the step of this V1CapacityRequestPolicyRange. # noqa: E501 + + Step defines the step size between valid capacity amounts within the range. Max (if set) and requestPolicy.default must be a multiple of Step. Min + Step must be less than or equal to the capacity value. # noqa: E501 + + :return: The step of this V1CapacityRequestPolicyRange. # noqa: E501 + :rtype: str + """ + return self._step + + @step.setter + def step(self, step): + """Sets the step of this V1CapacityRequestPolicyRange. + + Step defines the step size between valid capacity amounts within the range. Max (if set) and requestPolicy.default must be a multiple of Step. Min + Step must be less than or equal to the capacity value. # noqa: E501 + + :param step: The step of this V1CapacityRequestPolicyRange. # noqa: E501 + :type step: str + """ + + self._step = step + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1CapacityRequestPolicyRange): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1CapacityRequestPolicyRange): + return True + + return self.to_dict() != other.to_dict() diff --git a/kubernetes/client/models/v1_capacity_requirements.py b/kubernetes/client/models/v1_capacity_requirements.py new file mode 100644 index 0000000000..2fb0f4831b --- /dev/null +++ b/kubernetes/client/models/v1_capacity_requirements.py @@ -0,0 +1,133 @@ +# coding: utf-8 + +""" + Kubernetes + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: release-1.35 + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from kubernetes.client.configuration import Configuration + + +class V1CapacityRequirements(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'requests': 'dict[str, str]' + } + + attribute_map = { + 'requests': 'requests' + } + + def __init__(self, requests=None, local_vars_configuration=None): # noqa: E501 + """V1CapacityRequirements - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._requests = None + self.discriminator = None + + if requests is not None: + self.requests = requests + + @property + def requests(self): + """Gets the requests of this V1CapacityRequirements. # noqa: E501 + + Requests represent individual device resource requests for distinct resources, all of which must be provided by the device. This value is used as an additional filtering condition against the available capacity on the device. This is semantically equivalent to a CEL selector with `device.capacity[]..compareTo(quantity()) >= 0`. For example, device.capacity['test-driver.cdi.k8s.io'].counters.compareTo(quantity('2')) >= 0. When a requestPolicy is defined, the requested amount is adjusted upward to the nearest valid value based on the policy. If the requested amount cannot be adjusted to a valid value—because it exceeds what the requestPolicy allows— the device is considered ineligible for allocation. For any capacity that is not explicitly requested: - If no requestPolicy is set, the default consumed capacity is equal to the full device capacity (i.e., the whole device is claimed). - If a requestPolicy is set, the default consumed capacity is determined according to that policy. If the device allows multiple allocation, the aggregated amount across all requests must not exceed the capacity value. The consumed capacity, which may be adjusted based on the requestPolicy if defined, is recorded in the resource claim’s status.devices[*].consumedCapacity field. # noqa: E501 + + :return: The requests of this V1CapacityRequirements. # noqa: E501 + :rtype: dict[str, str] + """ + return self._requests + + @requests.setter + def requests(self, requests): + """Sets the requests of this V1CapacityRequirements. + + Requests represent individual device resource requests for distinct resources, all of which must be provided by the device. This value is used as an additional filtering condition against the available capacity on the device. This is semantically equivalent to a CEL selector with `device.capacity[]..compareTo(quantity()) >= 0`. For example, device.capacity['test-driver.cdi.k8s.io'].counters.compareTo(quantity('2')) >= 0. When a requestPolicy is defined, the requested amount is adjusted upward to the nearest valid value based on the policy. If the requested amount cannot be adjusted to a valid value—because it exceeds what the requestPolicy allows— the device is considered ineligible for allocation. For any capacity that is not explicitly requested: - If no requestPolicy is set, the default consumed capacity is equal to the full device capacity (i.e., the whole device is claimed). - If a requestPolicy is set, the default consumed capacity is determined according to that policy. If the device allows multiple allocation, the aggregated amount across all requests must not exceed the capacity value. The consumed capacity, which may be adjusted based on the requestPolicy if defined, is recorded in the resource claim’s status.devices[*].consumedCapacity field. # noqa: E501 + + :param requests: The requests of this V1CapacityRequirements. # noqa: E501 + :type requests: dict[str, str] + """ + + self._requests = requests + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1CapacityRequirements): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1CapacityRequirements): + return True + + return self.to_dict() != other.to_dict() diff --git a/kubernetes/client/models/v1_cel_device_selector.py b/kubernetes/client/models/v1_cel_device_selector.py new file mode 100644 index 0000000000..c1c64de4ae --- /dev/null +++ b/kubernetes/client/models/v1_cel_device_selector.py @@ -0,0 +1,134 @@ +# coding: utf-8 + +""" + Kubernetes + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: release-1.35 + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from kubernetes.client.configuration import Configuration + + +class V1CELDeviceSelector(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'expression': 'str' + } + + attribute_map = { + 'expression': 'expression' + } + + def __init__(self, expression=None, local_vars_configuration=None): # noqa: E501 + """V1CELDeviceSelector - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._expression = None + self.discriminator = None + + self.expression = expression + + @property + def expression(self): + """Gets the expression of this V1CELDeviceSelector. # noqa: E501 + + Expression is a CEL expression which evaluates a single device. It must evaluate to true when the device under consideration satisfies the desired criteria, and false when it does not. Any other result is an error and causes allocation of devices to abort. The expression's input is an object named \"device\", which carries the following properties: - driver (string): the name of the driver which defines this device. - attributes (map[string]object): the device's attributes, grouped by prefix (e.g. device.attributes[\"dra.example.com\"] evaluates to an object with all of the attributes which were prefixed by \"dra.example.com\". - capacity (map[string]object): the device's capacities, grouped by prefix. - allowMultipleAllocations (bool): the allowMultipleAllocations property of the device (v1.34+ with the DRAConsumableCapacity feature enabled). Example: Consider a device with driver=\"dra.example.com\", which exposes two attributes named \"model\" and \"ext.example.com/family\" and which exposes one capacity named \"modules\". This input to this expression would have the following fields: device.driver device.attributes[\"dra.example.com\"].model device.attributes[\"ext.example.com\"].family device.capacity[\"dra.example.com\"].modules The device.driver field can be used to check for a specific driver, either as a high-level precondition (i.e. you only want to consider devices from this driver) or as part of a multi-clause expression that is meant to consider devices from different drivers. The value type of each attribute is defined by the device definition, and users who write these expressions must consult the documentation for their specific drivers. The value type of each capacity is Quantity. If an unknown prefix is used as a lookup in either device.attributes or device.capacity, an empty map will be returned. Any reference to an unknown field will cause an evaluation error and allocation to abort. A robust expression should check for the existence of attributes before referencing them. For ease of use, the cel.bind() function is enabled, and can be used to simplify expressions that access multiple attributes with the same domain. For example: cel.bind(dra, device.attributes[\"dra.example.com\"], dra.someBool && dra.anotherBool) The length of the expression must be smaller or equal to 10 Ki. The cost of evaluating it is also limited based on the estimated number of logical steps. # noqa: E501 + + :return: The expression of this V1CELDeviceSelector. # noqa: E501 + :rtype: str + """ + return self._expression + + @expression.setter + def expression(self, expression): + """Sets the expression of this V1CELDeviceSelector. + + Expression is a CEL expression which evaluates a single device. It must evaluate to true when the device under consideration satisfies the desired criteria, and false when it does not. Any other result is an error and causes allocation of devices to abort. The expression's input is an object named \"device\", which carries the following properties: - driver (string): the name of the driver which defines this device. - attributes (map[string]object): the device's attributes, grouped by prefix (e.g. device.attributes[\"dra.example.com\"] evaluates to an object with all of the attributes which were prefixed by \"dra.example.com\". - capacity (map[string]object): the device's capacities, grouped by prefix. - allowMultipleAllocations (bool): the allowMultipleAllocations property of the device (v1.34+ with the DRAConsumableCapacity feature enabled). Example: Consider a device with driver=\"dra.example.com\", which exposes two attributes named \"model\" and \"ext.example.com/family\" and which exposes one capacity named \"modules\". This input to this expression would have the following fields: device.driver device.attributes[\"dra.example.com\"].model device.attributes[\"ext.example.com\"].family device.capacity[\"dra.example.com\"].modules The device.driver field can be used to check for a specific driver, either as a high-level precondition (i.e. you only want to consider devices from this driver) or as part of a multi-clause expression that is meant to consider devices from different drivers. The value type of each attribute is defined by the device definition, and users who write these expressions must consult the documentation for their specific drivers. The value type of each capacity is Quantity. If an unknown prefix is used as a lookup in either device.attributes or device.capacity, an empty map will be returned. Any reference to an unknown field will cause an evaluation error and allocation to abort. A robust expression should check for the existence of attributes before referencing them. For ease of use, the cel.bind() function is enabled, and can be used to simplify expressions that access multiple attributes with the same domain. For example: cel.bind(dra, device.attributes[\"dra.example.com\"], dra.someBool && dra.anotherBool) The length of the expression must be smaller or equal to 10 Ki. The cost of evaluating it is also limited based on the estimated number of logical steps. # noqa: E501 + + :param expression: The expression of this V1CELDeviceSelector. # noqa: E501 + :type expression: str + """ + if self.local_vars_configuration.client_side_validation and expression is None: # noqa: E501 + raise ValueError("Invalid value for `expression`, must not be `None`") # noqa: E501 + + self._expression = expression + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1CELDeviceSelector): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1CELDeviceSelector): + return True + + return self.to_dict() != other.to_dict() diff --git a/kubernetes/client/models/v1_ceph_fs_persistent_volume_source.py b/kubernetes/client/models/v1_ceph_fs_persistent_volume_source.py index 1b1c8263c3..9fb8c2431a 100644 --- a/kubernetes/client/models/v1_ceph_fs_persistent_volume_source.py +++ b/kubernetes/client/models/v1_ceph_fs_persistent_volume_source.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -53,7 +56,7 @@ class V1CephFSPersistentVolumeSource(object): def __init__(self, monitors=None, path=None, read_only=None, secret_file=None, secret_ref=None, user=None, local_vars_configuration=None): # noqa: E501 """V1CephFSPersistentVolumeSource - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._monitors = None @@ -94,7 +97,7 @@ def monitors(self, monitors): monitors is Required: Monitors is a collection of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it # noqa: E501 :param monitors: The monitors of this V1CephFSPersistentVolumeSource. # noqa: E501 - :type: list[str] + :type monitors: list[str] """ if self.local_vars_configuration.client_side_validation and monitors is None: # noqa: E501 raise ValueError("Invalid value for `monitors`, must not be `None`") # noqa: E501 @@ -119,7 +122,7 @@ def path(self, path): path is Optional: Used as the mounted root, rather than the full Ceph tree, default is / # noqa: E501 :param path: The path of this V1CephFSPersistentVolumeSource. # noqa: E501 - :type: str + :type path: str """ self._path = path @@ -142,7 +145,7 @@ def read_only(self, read_only): readOnly is Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it # noqa: E501 :param read_only: The read_only of this V1CephFSPersistentVolumeSource. # noqa: E501 - :type: bool + :type read_only: bool """ self._read_only = read_only @@ -165,7 +168,7 @@ def secret_file(self, secret_file): secretFile is Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it # noqa: E501 :param secret_file: The secret_file of this V1CephFSPersistentVolumeSource. # noqa: E501 - :type: str + :type secret_file: str """ self._secret_file = secret_file @@ -186,7 +189,7 @@ def secret_ref(self, secret_ref): :param secret_ref: The secret_ref of this V1CephFSPersistentVolumeSource. # noqa: E501 - :type: V1SecretReference + :type secret_ref: V1SecretReference """ self._secret_ref = secret_ref @@ -209,32 +212,40 @@ def user(self, user): user is Optional: User is the rados user name, default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it # noqa: E501 :param user: The user of this V1CephFSPersistentVolumeSource. # noqa: E501 - :type: str + :type user: str """ self._user = user - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_ceph_fs_volume_source.py b/kubernetes/client/models/v1_ceph_fs_volume_source.py index 9861cb27b0..b49d3f3da5 100644 --- a/kubernetes/client/models/v1_ceph_fs_volume_source.py +++ b/kubernetes/client/models/v1_ceph_fs_volume_source.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -53,7 +56,7 @@ class V1CephFSVolumeSource(object): def __init__(self, monitors=None, path=None, read_only=None, secret_file=None, secret_ref=None, user=None, local_vars_configuration=None): # noqa: E501 """V1CephFSVolumeSource - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._monitors = None @@ -94,7 +97,7 @@ def monitors(self, monitors): monitors is Required: Monitors is a collection of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it # noqa: E501 :param monitors: The monitors of this V1CephFSVolumeSource. # noqa: E501 - :type: list[str] + :type monitors: list[str] """ if self.local_vars_configuration.client_side_validation and monitors is None: # noqa: E501 raise ValueError("Invalid value for `monitors`, must not be `None`") # noqa: E501 @@ -119,7 +122,7 @@ def path(self, path): path is Optional: Used as the mounted root, rather than the full Ceph tree, default is / # noqa: E501 :param path: The path of this V1CephFSVolumeSource. # noqa: E501 - :type: str + :type path: str """ self._path = path @@ -142,7 +145,7 @@ def read_only(self, read_only): readOnly is Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it # noqa: E501 :param read_only: The read_only of this V1CephFSVolumeSource. # noqa: E501 - :type: bool + :type read_only: bool """ self._read_only = read_only @@ -165,7 +168,7 @@ def secret_file(self, secret_file): secretFile is Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it # noqa: E501 :param secret_file: The secret_file of this V1CephFSVolumeSource. # noqa: E501 - :type: str + :type secret_file: str """ self._secret_file = secret_file @@ -186,7 +189,7 @@ def secret_ref(self, secret_ref): :param secret_ref: The secret_ref of this V1CephFSVolumeSource. # noqa: E501 - :type: V1LocalObjectReference + :type secret_ref: V1LocalObjectReference """ self._secret_ref = secret_ref @@ -209,32 +212,40 @@ def user(self, user): user is optional: User is the rados user name, default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it # noqa: E501 :param user: The user of this V1CephFSVolumeSource. # noqa: E501 - :type: str + :type user: str """ self._user = user - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_certificate_signing_request.py b/kubernetes/client/models/v1_certificate_signing_request.py index ac8f0a2a6f..31e2bd89c6 100644 --- a/kubernetes/client/models/v1_certificate_signing_request.py +++ b/kubernetes/client/models/v1_certificate_signing_request.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -51,7 +54,7 @@ class V1CertificateSigningRequest(object): def __init__(self, api_version=None, kind=None, metadata=None, spec=None, status=None, local_vars_configuration=None): # noqa: E501 """V1CertificateSigningRequest - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._api_version = None @@ -89,7 +92,7 @@ def api_version(self, api_version): APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501 :param api_version: The api_version of this V1CertificateSigningRequest. # noqa: E501 - :type: str + :type api_version: str """ self._api_version = api_version @@ -112,7 +115,7 @@ def kind(self, kind): Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501 :param kind: The kind of this V1CertificateSigningRequest. # noqa: E501 - :type: str + :type kind: str """ self._kind = kind @@ -133,7 +136,7 @@ def metadata(self, metadata): :param metadata: The metadata of this V1CertificateSigningRequest. # noqa: E501 - :type: V1ObjectMeta + :type metadata: V1ObjectMeta """ self._metadata = metadata @@ -154,7 +157,7 @@ def spec(self, spec): :param spec: The spec of this V1CertificateSigningRequest. # noqa: E501 - :type: V1CertificateSigningRequestSpec + :type spec: V1CertificateSigningRequestSpec """ if self.local_vars_configuration.client_side_validation and spec is None: # noqa: E501 raise ValueError("Invalid value for `spec`, must not be `None`") # noqa: E501 @@ -177,32 +180,40 @@ def status(self, status): :param status: The status of this V1CertificateSigningRequest. # noqa: E501 - :type: V1CertificateSigningRequestStatus + :type status: V1CertificateSigningRequestStatus """ self._status = status - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_certificate_signing_request_condition.py b/kubernetes/client/models/v1_certificate_signing_request_condition.py index 1b3cf992cf..f734ea629f 100644 --- a/kubernetes/client/models/v1_certificate_signing_request_condition.py +++ b/kubernetes/client/models/v1_certificate_signing_request_condition.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -53,7 +56,7 @@ class V1CertificateSigningRequestCondition(object): def __init__(self, last_transition_time=None, last_update_time=None, message=None, reason=None, status=None, type=None, local_vars_configuration=None): # noqa: E501 """V1CertificateSigningRequestCondition - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._last_transition_time = None @@ -93,7 +96,7 @@ def last_transition_time(self, last_transition_time): lastTransitionTime is the time the condition last transitioned from one status to another. If unset, when a new condition type is added or an existing condition's status is changed, the server defaults this to the current time. # noqa: E501 :param last_transition_time: The last_transition_time of this V1CertificateSigningRequestCondition. # noqa: E501 - :type: datetime + :type last_transition_time: datetime """ self._last_transition_time = last_transition_time @@ -116,7 +119,7 @@ def last_update_time(self, last_update_time): lastUpdateTime is the time of the last update to this condition # noqa: E501 :param last_update_time: The last_update_time of this V1CertificateSigningRequestCondition. # noqa: E501 - :type: datetime + :type last_update_time: datetime """ self._last_update_time = last_update_time @@ -139,7 +142,7 @@ def message(self, message): message contains a human readable message with details about the request state # noqa: E501 :param message: The message of this V1CertificateSigningRequestCondition. # noqa: E501 - :type: str + :type message: str """ self._message = message @@ -162,7 +165,7 @@ def reason(self, reason): reason indicates a brief reason for the request state # noqa: E501 :param reason: The reason of this V1CertificateSigningRequestCondition. # noqa: E501 - :type: str + :type reason: str """ self._reason = reason @@ -185,7 +188,7 @@ def status(self, status): status of the condition, one of True, False, Unknown. Approved, Denied, and Failed conditions may not be \"False\" or \"Unknown\". # noqa: E501 :param status: The status of this V1CertificateSigningRequestCondition. # noqa: E501 - :type: str + :type status: str """ if self.local_vars_configuration.client_side_validation and status is None: # noqa: E501 raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 @@ -210,34 +213,42 @@ def type(self, type): type of the condition. Known conditions are \"Approved\", \"Denied\", and \"Failed\". An \"Approved\" condition is added via the /approval subresource, indicating the request was approved and should be issued by the signer. A \"Denied\" condition is added via the /approval subresource, indicating the request was denied and should not be issued by the signer. A \"Failed\" condition is added via the /status subresource, indicating the signer failed to issue the certificate. Approved and Denied conditions are mutually exclusive. Approved, Denied, and Failed conditions cannot be removed once added. Only one condition of a given type is allowed. # noqa: E501 :param type: The type of this V1CertificateSigningRequestCondition. # noqa: E501 - :type: str + :type type: str """ if self.local_vars_configuration.client_side_validation and type is None: # noqa: E501 raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 self._type = type - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_certificate_signing_request_list.py b/kubernetes/client/models/v1_certificate_signing_request_list.py index bbe453848d..821bfaf6e7 100644 --- a/kubernetes/client/models/v1_certificate_signing_request_list.py +++ b/kubernetes/client/models/v1_certificate_signing_request_list.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -49,7 +52,7 @@ class V1CertificateSigningRequestList(object): def __init__(self, api_version=None, items=None, kind=None, metadata=None, local_vars_configuration=None): # noqa: E501 """V1CertificateSigningRequestList - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._api_version = None @@ -84,7 +87,7 @@ def api_version(self, api_version): APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501 :param api_version: The api_version of this V1CertificateSigningRequestList. # noqa: E501 - :type: str + :type api_version: str """ self._api_version = api_version @@ -107,7 +110,7 @@ def items(self, items): items is a collection of CertificateSigningRequest objects # noqa: E501 :param items: The items of this V1CertificateSigningRequestList. # noqa: E501 - :type: list[V1CertificateSigningRequest] + :type items: list[V1CertificateSigningRequest] """ if self.local_vars_configuration.client_side_validation and items is None: # noqa: E501 raise ValueError("Invalid value for `items`, must not be `None`") # noqa: E501 @@ -132,7 +135,7 @@ def kind(self, kind): Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501 :param kind: The kind of this V1CertificateSigningRequestList. # noqa: E501 - :type: str + :type kind: str """ self._kind = kind @@ -153,32 +156,40 @@ def metadata(self, metadata): :param metadata: The metadata of this V1CertificateSigningRequestList. # noqa: E501 - :type: V1ListMeta + :type metadata: V1ListMeta """ self._metadata = metadata - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_certificate_signing_request_spec.py b/kubernetes/client/models/v1_certificate_signing_request_spec.py index bbaa3ca778..b02812ff0d 100644 --- a/kubernetes/client/models/v1_certificate_signing_request_spec.py +++ b/kubernetes/client/models/v1_certificate_signing_request_spec.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -34,7 +37,7 @@ class V1CertificateSigningRequestSpec(object): """ openapi_types = { 'expiration_seconds': 'int', - 'extra': 'dict(str, list[str])', + 'extra': 'dict[str, list[str]]', 'groups': 'list[str]', 'request': 'str', 'signer_name': 'str', @@ -57,7 +60,7 @@ class V1CertificateSigningRequestSpec(object): def __init__(self, expiration_seconds=None, extra=None, groups=None, request=None, signer_name=None, uid=None, usages=None, username=None, local_vars_configuration=None): # noqa: E501 """V1CertificateSigningRequestSpec - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._expiration_seconds = None @@ -103,7 +106,7 @@ def expiration_seconds(self, expiration_seconds): expirationSeconds is the requested duration of validity of the issued certificate. The certificate signer may issue a certificate with a different validity duration so a client must check the delta between the notBefore and and notAfter fields in the issued certificate to determine the actual duration. The v1.22+ in-tree implementations of the well-known Kubernetes signers will honor this field as long as the requested duration is not greater than the maximum duration they will honor per the --cluster-signing-duration CLI flag to the Kubernetes controller manager. Certificate signers may not honor this field for various reasons: 1. Old signer that is unaware of the field (such as the in-tree implementations prior to v1.22) 2. Signer whose configured maximum is shorter than the requested duration 3. Signer whose configured minimum is longer than the requested duration The minimum valid value for expirationSeconds is 600, i.e. 10 minutes. # noqa: E501 :param expiration_seconds: The expiration_seconds of this V1CertificateSigningRequestSpec. # noqa: E501 - :type: int + :type expiration_seconds: int """ self._expiration_seconds = expiration_seconds @@ -115,7 +118,7 @@ def extra(self): extra contains extra attributes of the user that created the CertificateSigningRequest. Populated by the API server on creation and immutable. # noqa: E501 :return: The extra of this V1CertificateSigningRequestSpec. # noqa: E501 - :rtype: dict(str, list[str]) + :rtype: dict[str, list[str]] """ return self._extra @@ -126,7 +129,7 @@ def extra(self, extra): extra contains extra attributes of the user that created the CertificateSigningRequest. Populated by the API server on creation and immutable. # noqa: E501 :param extra: The extra of this V1CertificateSigningRequestSpec. # noqa: E501 - :type: dict(str, list[str]) + :type extra: dict[str, list[str]] """ self._extra = extra @@ -149,7 +152,7 @@ def groups(self, groups): groups contains group membership of the user that created the CertificateSigningRequest. Populated by the API server on creation and immutable. # noqa: E501 :param groups: The groups of this V1CertificateSigningRequestSpec. # noqa: E501 - :type: list[str] + :type groups: list[str] """ self._groups = groups @@ -172,7 +175,7 @@ def request(self, request): request contains an x509 certificate signing request encoded in a \"CERTIFICATE REQUEST\" PEM block. When serialized as JSON or YAML, the data is additionally base64-encoded. # noqa: E501 :param request: The request of this V1CertificateSigningRequestSpec. # noqa: E501 - :type: str + :type request: str """ if self.local_vars_configuration.client_side_validation and request is None: # noqa: E501 raise ValueError("Invalid value for `request`, must not be `None`") # noqa: E501 @@ -200,7 +203,7 @@ def signer_name(self, signer_name): signerName indicates the requested signer, and is a qualified name. List/watch requests for CertificateSigningRequests can filter on this field using a \"spec.signerName=NAME\" fieldSelector. Well-known Kubernetes signers are: 1. \"kubernetes.io/kube-apiserver-client\": issues client certificates that can be used to authenticate to kube-apiserver. Requests for this signer are never auto-approved by kube-controller-manager, can be issued by the \"csrsigning\" controller in kube-controller-manager. 2. \"kubernetes.io/kube-apiserver-client-kubelet\": issues client certificates that kubelets use to authenticate to kube-apiserver. Requests for this signer can be auto-approved by the \"csrapproving\" controller in kube-controller-manager, and can be issued by the \"csrsigning\" controller in kube-controller-manager. 3. \"kubernetes.io/kubelet-serving\" issues serving certificates that kubelets use to serve TLS endpoints, which kube-apiserver can connect to securely. Requests for this signer are never auto-approved by kube-controller-manager, and can be issued by the \"csrsigning\" controller in kube-controller-manager. More details are available at https://k8s.io/docs/reference/access-authn-authz/certificate-signing-requests/#kubernetes-signers Custom signerNames can also be specified. The signer defines: 1. Trust distribution: how trust (CA bundles) are distributed. 2. Permitted subjects: and behavior when a disallowed subject is requested. 3. Required, permitted, or forbidden x509 extensions in the request (including whether subjectAltNames are allowed, which types, restrictions on allowed values) and behavior when a disallowed extension is requested. 4. Required, permitted, or forbidden key usages / extended key usages. 5. Expiration/certificate lifetime: whether it is fixed by the signer, configurable by the admin. 6. Whether or not requests for CA certificates are allowed. # noqa: E501 :param signer_name: The signer_name of this V1CertificateSigningRequestSpec. # noqa: E501 - :type: str + :type signer_name: str """ if self.local_vars_configuration.client_side_validation and signer_name is None: # noqa: E501 raise ValueError("Invalid value for `signer_name`, must not be `None`") # noqa: E501 @@ -225,7 +228,7 @@ def uid(self, uid): uid contains the uid of the user that created the CertificateSigningRequest. Populated by the API server on creation and immutable. # noqa: E501 :param uid: The uid of this V1CertificateSigningRequestSpec. # noqa: E501 - :type: str + :type uid: str """ self._uid = uid @@ -248,7 +251,7 @@ def usages(self, usages): usages specifies a set of key usages requested in the issued certificate. Requests for TLS client certificates typically request: \"digital signature\", \"key encipherment\", \"client auth\". Requests for TLS serving certificates typically request: \"key encipherment\", \"digital signature\", \"server auth\". Valid values are: \"signing\", \"digital signature\", \"content commitment\", \"key encipherment\", \"key agreement\", \"data encipherment\", \"cert sign\", \"crl sign\", \"encipher only\", \"decipher only\", \"any\", \"server auth\", \"client auth\", \"code signing\", \"email protection\", \"s/mime\", \"ipsec end system\", \"ipsec tunnel\", \"ipsec user\", \"timestamping\", \"ocsp signing\", \"microsoft sgc\", \"netscape sgc\" # noqa: E501 :param usages: The usages of this V1CertificateSigningRequestSpec. # noqa: E501 - :type: list[str] + :type usages: list[str] """ self._usages = usages @@ -271,32 +274,40 @@ def username(self, username): username contains the name of the user that created the CertificateSigningRequest. Populated by the API server on creation and immutable. # noqa: E501 :param username: The username of this V1CertificateSigningRequestSpec. # noqa: E501 - :type: str + :type username: str """ self._username = username - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_certificate_signing_request_status.py b/kubernetes/client/models/v1_certificate_signing_request_status.py index f1b6801554..dd8c3a918c 100644 --- a/kubernetes/client/models/v1_certificate_signing_request_status.py +++ b/kubernetes/client/models/v1_certificate_signing_request_status.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -45,7 +48,7 @@ class V1CertificateSigningRequestStatus(object): def __init__(self, certificate=None, conditions=None, local_vars_configuration=None): # noqa: E501 """V1CertificateSigningRequestStatus - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._certificate = None @@ -75,7 +78,7 @@ def certificate(self, certificate): certificate is populated with an issued certificate by the signer after an Approved condition is present. This field is set via the /status subresource. Once populated, this field is immutable. If the certificate signing request is denied, a condition of type \"Denied\" is added and this field remains empty. If the signer cannot issue the certificate, a condition of type \"Failed\" is added and this field remains empty. Validation requirements: 1. certificate must contain one or more PEM blocks. 2. All PEM blocks must have the \"CERTIFICATE\" label, contain no headers, and the encoded data must be a BER-encoded ASN.1 Certificate structure as described in section 4 of RFC5280. 3. Non-PEM content may appear before or after the \"CERTIFICATE\" PEM blocks and is unvalidated, to allow for explanatory text as described in section 5.2 of RFC7468. If more than one PEM block is present, and the definition of the requested spec.signerName does not indicate otherwise, the first block is the issued certificate, and subsequent blocks should be treated as intermediate certificates and presented in TLS handshakes. The certificate is encoded in PEM format. When serialized as JSON or YAML, the data is additionally base64-encoded, so it consists of: base64( -----BEGIN CERTIFICATE----- ... -----END CERTIFICATE----- ) # noqa: E501 :param certificate: The certificate of this V1CertificateSigningRequestStatus. # noqa: E501 - :type: str + :type certificate: str """ if (self.local_vars_configuration.client_side_validation and certificate is not None and not re.search(r'^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$', certificate)): # noqa: E501 @@ -101,32 +104,40 @@ def conditions(self, conditions): conditions applied to the request. Known conditions are \"Approved\", \"Denied\", and \"Failed\". # noqa: E501 :param conditions: The conditions of this V1CertificateSigningRequestStatus. # noqa: E501 - :type: list[V1CertificateSigningRequestCondition] + :type conditions: list[V1CertificateSigningRequestCondition] """ self._conditions = conditions - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_cinder_persistent_volume_source.py b/kubernetes/client/models/v1_cinder_persistent_volume_source.py index 65eeb2fe19..dedaf8523a 100644 --- a/kubernetes/client/models/v1_cinder_persistent_volume_source.py +++ b/kubernetes/client/models/v1_cinder_persistent_volume_source.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -49,7 +52,7 @@ class V1CinderPersistentVolumeSource(object): def __init__(self, fs_type=None, read_only=None, secret_ref=None, volume_id=None, local_vars_configuration=None): # noqa: E501 """V1CinderPersistentVolumeSource - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._fs_type = None @@ -84,7 +87,7 @@ def fs_type(self, fs_type): fsType Filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md # noqa: E501 :param fs_type: The fs_type of this V1CinderPersistentVolumeSource. # noqa: E501 - :type: str + :type fs_type: str """ self._fs_type = fs_type @@ -107,7 +110,7 @@ def read_only(self, read_only): readOnly is Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/mysql-cinder-pd/README.md # noqa: E501 :param read_only: The read_only of this V1CinderPersistentVolumeSource. # noqa: E501 - :type: bool + :type read_only: bool """ self._read_only = read_only @@ -128,7 +131,7 @@ def secret_ref(self, secret_ref): :param secret_ref: The secret_ref of this V1CinderPersistentVolumeSource. # noqa: E501 - :type: V1SecretReference + :type secret_ref: V1SecretReference """ self._secret_ref = secret_ref @@ -151,34 +154,42 @@ def volume_id(self, volume_id): volumeID used to identify the volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md # noqa: E501 :param volume_id: The volume_id of this V1CinderPersistentVolumeSource. # noqa: E501 - :type: str + :type volume_id: str """ if self.local_vars_configuration.client_side_validation and volume_id is None: # noqa: E501 raise ValueError("Invalid value for `volume_id`, must not be `None`") # noqa: E501 self._volume_id = volume_id - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_cinder_volume_source.py b/kubernetes/client/models/v1_cinder_volume_source.py index 38cb3a59b2..99aa196c5e 100644 --- a/kubernetes/client/models/v1_cinder_volume_source.py +++ b/kubernetes/client/models/v1_cinder_volume_source.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -49,7 +52,7 @@ class V1CinderVolumeSource(object): def __init__(self, fs_type=None, read_only=None, secret_ref=None, volume_id=None, local_vars_configuration=None): # noqa: E501 """V1CinderVolumeSource - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._fs_type = None @@ -84,7 +87,7 @@ def fs_type(self, fs_type): fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md # noqa: E501 :param fs_type: The fs_type of this V1CinderVolumeSource. # noqa: E501 - :type: str + :type fs_type: str """ self._fs_type = fs_type @@ -107,7 +110,7 @@ def read_only(self, read_only): readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/mysql-cinder-pd/README.md # noqa: E501 :param read_only: The read_only of this V1CinderVolumeSource. # noqa: E501 - :type: bool + :type read_only: bool """ self._read_only = read_only @@ -128,7 +131,7 @@ def secret_ref(self, secret_ref): :param secret_ref: The secret_ref of this V1CinderVolumeSource. # noqa: E501 - :type: V1LocalObjectReference + :type secret_ref: V1LocalObjectReference """ self._secret_ref = secret_ref @@ -151,34 +154,42 @@ def volume_id(self, volume_id): volumeID used to identify the volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md # noqa: E501 :param volume_id: The volume_id of this V1CinderVolumeSource. # noqa: E501 - :type: str + :type volume_id: str """ if self.local_vars_configuration.client_side_validation and volume_id is None: # noqa: E501 raise ValueError("Invalid value for `volume_id`, must not be `None`") # noqa: E501 self._volume_id = volume_id - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_claim_source.py b/kubernetes/client/models/v1_claim_source.py deleted file mode 100644 index 7c7c417766..0000000000 --- a/kubernetes/client/models/v1_claim_source.py +++ /dev/null @@ -1,150 +0,0 @@ -# coding: utf-8 - -""" - Kubernetes - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - - The version of the OpenAPI document: release-1.30 - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from kubernetes.client.configuration import Configuration - - -class V1ClaimSource(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'resource_claim_name': 'str', - 'resource_claim_template_name': 'str' - } - - attribute_map = { - 'resource_claim_name': 'resourceClaimName', - 'resource_claim_template_name': 'resourceClaimTemplateName' - } - - def __init__(self, resource_claim_name=None, resource_claim_template_name=None, local_vars_configuration=None): # noqa: E501 - """V1ClaimSource - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._resource_claim_name = None - self._resource_claim_template_name = None - self.discriminator = None - - if resource_claim_name is not None: - self.resource_claim_name = resource_claim_name - if resource_claim_template_name is not None: - self.resource_claim_template_name = resource_claim_template_name - - @property - def resource_claim_name(self): - """Gets the resource_claim_name of this V1ClaimSource. # noqa: E501 - - ResourceClaimName is the name of a ResourceClaim object in the same namespace as this pod. # noqa: E501 - - :return: The resource_claim_name of this V1ClaimSource. # noqa: E501 - :rtype: str - """ - return self._resource_claim_name - - @resource_claim_name.setter - def resource_claim_name(self, resource_claim_name): - """Sets the resource_claim_name of this V1ClaimSource. - - ResourceClaimName is the name of a ResourceClaim object in the same namespace as this pod. # noqa: E501 - - :param resource_claim_name: The resource_claim_name of this V1ClaimSource. # noqa: E501 - :type: str - """ - - self._resource_claim_name = resource_claim_name - - @property - def resource_claim_template_name(self): - """Gets the resource_claim_template_name of this V1ClaimSource. # noqa: E501 - - ResourceClaimTemplateName is the name of a ResourceClaimTemplate object in the same namespace as this pod. The template will be used to create a new ResourceClaim, which will be bound to this pod. When this pod is deleted, the ResourceClaim will also be deleted. The pod name and resource name, along with a generated component, will be used to form a unique name for the ResourceClaim, which will be recorded in pod.status.resourceClaimStatuses. This field is immutable and no changes will be made to the corresponding ResourceClaim by the control plane after creating the ResourceClaim. # noqa: E501 - - :return: The resource_claim_template_name of this V1ClaimSource. # noqa: E501 - :rtype: str - """ - return self._resource_claim_template_name - - @resource_claim_template_name.setter - def resource_claim_template_name(self, resource_claim_template_name): - """Sets the resource_claim_template_name of this V1ClaimSource. - - ResourceClaimTemplateName is the name of a ResourceClaimTemplate object in the same namespace as this pod. The template will be used to create a new ResourceClaim, which will be bound to this pod. When this pod is deleted, the ResourceClaim will also be deleted. The pod name and resource name, along with a generated component, will be used to form a unique name for the ResourceClaim, which will be recorded in pod.status.resourceClaimStatuses. This field is immutable and no changes will be made to the corresponding ResourceClaim by the control plane after creating the ResourceClaim. # noqa: E501 - - :param resource_claim_template_name: The resource_claim_template_name of this V1ClaimSource. # noqa: E501 - :type: str - """ - - self._resource_claim_template_name = resource_claim_template_name - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, V1ClaimSource): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, V1ClaimSource): - return True - - return self.to_dict() != other.to_dict() diff --git a/kubernetes/client/models/v1_client_ip_config.py b/kubernetes/client/models/v1_client_ip_config.py index 5588c858d8..bad489deb1 100644 --- a/kubernetes/client/models/v1_client_ip_config.py +++ b/kubernetes/client/models/v1_client_ip_config.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -43,7 +46,7 @@ class V1ClientIPConfig(object): def __init__(self, timeout_seconds=None, local_vars_configuration=None): # noqa: E501 """V1ClientIPConfig - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._timeout_seconds = None @@ -70,32 +73,40 @@ def timeout_seconds(self, timeout_seconds): timeoutSeconds specifies the seconds of ClientIP type session sticky time. The value must be >0 && <=86400(for 1 day) if ServiceAffinity == \"ClientIP\". Default value is 10800(for 3 hours). # noqa: E501 :param timeout_seconds: The timeout_seconds of this V1ClientIPConfig. # noqa: E501 - :type: int + :type timeout_seconds: int """ self._timeout_seconds = timeout_seconds - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_cluster_role.py b/kubernetes/client/models/v1_cluster_role.py index 55d03ac3c2..e98070edac 100644 --- a/kubernetes/client/models/v1_cluster_role.py +++ b/kubernetes/client/models/v1_cluster_role.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -51,7 +54,7 @@ class V1ClusterRole(object): def __init__(self, aggregation_rule=None, api_version=None, kind=None, metadata=None, rules=None, local_vars_configuration=None): # noqa: E501 """V1ClusterRole - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._aggregation_rule = None @@ -88,7 +91,7 @@ def aggregation_rule(self, aggregation_rule): :param aggregation_rule: The aggregation_rule of this V1ClusterRole. # noqa: E501 - :type: V1AggregationRule + :type aggregation_rule: V1AggregationRule """ self._aggregation_rule = aggregation_rule @@ -111,7 +114,7 @@ def api_version(self, api_version): APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501 :param api_version: The api_version of this V1ClusterRole. # noqa: E501 - :type: str + :type api_version: str """ self._api_version = api_version @@ -134,7 +137,7 @@ def kind(self, kind): Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501 :param kind: The kind of this V1ClusterRole. # noqa: E501 - :type: str + :type kind: str """ self._kind = kind @@ -155,7 +158,7 @@ def metadata(self, metadata): :param metadata: The metadata of this V1ClusterRole. # noqa: E501 - :type: V1ObjectMeta + :type metadata: V1ObjectMeta """ self._metadata = metadata @@ -178,32 +181,40 @@ def rules(self, rules): Rules holds all the PolicyRules for this ClusterRole # noqa: E501 :param rules: The rules of this V1ClusterRole. # noqa: E501 - :type: list[V1PolicyRule] + :type rules: list[V1PolicyRule] """ self._rules = rules - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_cluster_role_binding.py b/kubernetes/client/models/v1_cluster_role_binding.py index 11d9165095..96acb83e11 100644 --- a/kubernetes/client/models/v1_cluster_role_binding.py +++ b/kubernetes/client/models/v1_cluster_role_binding.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -51,7 +54,7 @@ class V1ClusterRoleBinding(object): def __init__(self, api_version=None, kind=None, metadata=None, role_ref=None, subjects=None, local_vars_configuration=None): # noqa: E501 """V1ClusterRoleBinding - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._api_version = None @@ -89,7 +92,7 @@ def api_version(self, api_version): APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501 :param api_version: The api_version of this V1ClusterRoleBinding. # noqa: E501 - :type: str + :type api_version: str """ self._api_version = api_version @@ -112,7 +115,7 @@ def kind(self, kind): Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501 :param kind: The kind of this V1ClusterRoleBinding. # noqa: E501 - :type: str + :type kind: str """ self._kind = kind @@ -133,7 +136,7 @@ def metadata(self, metadata): :param metadata: The metadata of this V1ClusterRoleBinding. # noqa: E501 - :type: V1ObjectMeta + :type metadata: V1ObjectMeta """ self._metadata = metadata @@ -154,7 +157,7 @@ def role_ref(self, role_ref): :param role_ref: The role_ref of this V1ClusterRoleBinding. # noqa: E501 - :type: V1RoleRef + :type role_ref: V1RoleRef """ if self.local_vars_configuration.client_side_validation and role_ref is None: # noqa: E501 raise ValueError("Invalid value for `role_ref`, must not be `None`") # noqa: E501 @@ -179,32 +182,40 @@ def subjects(self, subjects): Subjects holds references to the objects the role applies to. # noqa: E501 :param subjects: The subjects of this V1ClusterRoleBinding. # noqa: E501 - :type: list[RbacV1Subject] + :type subjects: list[RbacV1Subject] """ self._subjects = subjects - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_cluster_role_binding_list.py b/kubernetes/client/models/v1_cluster_role_binding_list.py index 0e1c13f8e2..253bc83188 100644 --- a/kubernetes/client/models/v1_cluster_role_binding_list.py +++ b/kubernetes/client/models/v1_cluster_role_binding_list.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -49,7 +52,7 @@ class V1ClusterRoleBindingList(object): def __init__(self, api_version=None, items=None, kind=None, metadata=None, local_vars_configuration=None): # noqa: E501 """V1ClusterRoleBindingList - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._api_version = None @@ -84,7 +87,7 @@ def api_version(self, api_version): APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501 :param api_version: The api_version of this V1ClusterRoleBindingList. # noqa: E501 - :type: str + :type api_version: str """ self._api_version = api_version @@ -107,7 +110,7 @@ def items(self, items): Items is a list of ClusterRoleBindings # noqa: E501 :param items: The items of this V1ClusterRoleBindingList. # noqa: E501 - :type: list[V1ClusterRoleBinding] + :type items: list[V1ClusterRoleBinding] """ if self.local_vars_configuration.client_side_validation and items is None: # noqa: E501 raise ValueError("Invalid value for `items`, must not be `None`") # noqa: E501 @@ -132,7 +135,7 @@ def kind(self, kind): Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501 :param kind: The kind of this V1ClusterRoleBindingList. # noqa: E501 - :type: str + :type kind: str """ self._kind = kind @@ -153,32 +156,40 @@ def metadata(self, metadata): :param metadata: The metadata of this V1ClusterRoleBindingList. # noqa: E501 - :type: V1ListMeta + :type metadata: V1ListMeta """ self._metadata = metadata - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_cluster_role_list.py b/kubernetes/client/models/v1_cluster_role_list.py index 10107d34d9..92be1635e5 100644 --- a/kubernetes/client/models/v1_cluster_role_list.py +++ b/kubernetes/client/models/v1_cluster_role_list.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -49,7 +52,7 @@ class V1ClusterRoleList(object): def __init__(self, api_version=None, items=None, kind=None, metadata=None, local_vars_configuration=None): # noqa: E501 """V1ClusterRoleList - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._api_version = None @@ -84,7 +87,7 @@ def api_version(self, api_version): APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501 :param api_version: The api_version of this V1ClusterRoleList. # noqa: E501 - :type: str + :type api_version: str """ self._api_version = api_version @@ -107,7 +110,7 @@ def items(self, items): Items is a list of ClusterRoles # noqa: E501 :param items: The items of this V1ClusterRoleList. # noqa: E501 - :type: list[V1ClusterRole] + :type items: list[V1ClusterRole] """ if self.local_vars_configuration.client_side_validation and items is None: # noqa: E501 raise ValueError("Invalid value for `items`, must not be `None`") # noqa: E501 @@ -132,7 +135,7 @@ def kind(self, kind): Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501 :param kind: The kind of this V1ClusterRoleList. # noqa: E501 - :type: str + :type kind: str """ self._kind = kind @@ -153,32 +156,40 @@ def metadata(self, metadata): :param metadata: The metadata of this V1ClusterRoleList. # noqa: E501 - :type: V1ListMeta + :type metadata: V1ListMeta """ self._metadata = metadata - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_cluster_trust_bundle_projection.py b/kubernetes/client/models/v1_cluster_trust_bundle_projection.py index 3bd9e978cb..4b728303cf 100644 --- a/kubernetes/client/models/v1_cluster_trust_bundle_projection.py +++ b/kubernetes/client/models/v1_cluster_trust_bundle_projection.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -51,7 +54,7 @@ class V1ClusterTrustBundleProjection(object): def __init__(self, label_selector=None, name=None, optional=None, path=None, signer_name=None, local_vars_configuration=None): # noqa: E501 """V1ClusterTrustBundleProjection - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._label_selector = None @@ -87,7 +90,7 @@ def label_selector(self, label_selector): :param label_selector: The label_selector of this V1ClusterTrustBundleProjection. # noqa: E501 - :type: V1LabelSelector + :type label_selector: V1LabelSelector """ self._label_selector = label_selector @@ -110,7 +113,7 @@ def name(self, name): Select a single ClusterTrustBundle by object name. Mutually-exclusive with signerName and labelSelector. # noqa: E501 :param name: The name of this V1ClusterTrustBundleProjection. # noqa: E501 - :type: str + :type name: str """ self._name = name @@ -133,7 +136,7 @@ def optional(self, optional): If true, don't block pod startup if the referenced ClusterTrustBundle(s) aren't available. If using name, then the named ClusterTrustBundle is allowed not to exist. If using signerName, then the combination of signerName and labelSelector is allowed to match zero ClusterTrustBundles. # noqa: E501 :param optional: The optional of this V1ClusterTrustBundleProjection. # noqa: E501 - :type: bool + :type optional: bool """ self._optional = optional @@ -156,7 +159,7 @@ def path(self, path): Relative path from the volume root to write the bundle. # noqa: E501 :param path: The path of this V1ClusterTrustBundleProjection. # noqa: E501 - :type: str + :type path: str """ if self.local_vars_configuration.client_side_validation and path is None: # noqa: E501 raise ValueError("Invalid value for `path`, must not be `None`") # noqa: E501 @@ -181,32 +184,40 @@ def signer_name(self, signer_name): Select all ClusterTrustBundles that match this signer name. Mutually-exclusive with name. The contents of all selected ClusterTrustBundles will be unified and deduplicated. # noqa: E501 :param signer_name: The signer_name of this V1ClusterTrustBundleProjection. # noqa: E501 - :type: str + :type signer_name: str """ self._signer_name = signer_name - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_component_condition.py b/kubernetes/client/models/v1_component_condition.py index 701777cb2b..bd1dd1321c 100644 --- a/kubernetes/client/models/v1_component_condition.py +++ b/kubernetes/client/models/v1_component_condition.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -49,7 +52,7 @@ class V1ComponentCondition(object): def __init__(self, error=None, message=None, status=None, type=None, local_vars_configuration=None): # noqa: E501 """V1ComponentCondition - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._error = None @@ -83,7 +86,7 @@ def error(self, error): Condition error code for a component. For example, a health check error code. # noqa: E501 :param error: The error of this V1ComponentCondition. # noqa: E501 - :type: str + :type error: str """ self._error = error @@ -106,7 +109,7 @@ def message(self, message): Message about the condition for a component. For example, information about a health check. # noqa: E501 :param message: The message of this V1ComponentCondition. # noqa: E501 - :type: str + :type message: str """ self._message = message @@ -129,7 +132,7 @@ def status(self, status): Status of the condition for a component. Valid values for \"Healthy\": \"True\", \"False\", or \"Unknown\". # noqa: E501 :param status: The status of this V1ComponentCondition. # noqa: E501 - :type: str + :type status: str """ if self.local_vars_configuration.client_side_validation and status is None: # noqa: E501 raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 @@ -154,34 +157,42 @@ def type(self, type): Type of condition for a component. Valid value: \"Healthy\" # noqa: E501 :param type: The type of this V1ComponentCondition. # noqa: E501 - :type: str + :type type: str """ if self.local_vars_configuration.client_side_validation and type is None: # noqa: E501 raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 self._type = type - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_component_status.py b/kubernetes/client/models/v1_component_status.py index 511db22e5d..2c03bf2e8c 100644 --- a/kubernetes/client/models/v1_component_status.py +++ b/kubernetes/client/models/v1_component_status.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -49,7 +52,7 @@ class V1ComponentStatus(object): def __init__(self, api_version=None, conditions=None, kind=None, metadata=None, local_vars_configuration=None): # noqa: E501 """V1ComponentStatus - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._api_version = None @@ -85,7 +88,7 @@ def api_version(self, api_version): APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501 :param api_version: The api_version of this V1ComponentStatus. # noqa: E501 - :type: str + :type api_version: str """ self._api_version = api_version @@ -108,7 +111,7 @@ def conditions(self, conditions): List of component conditions observed # noqa: E501 :param conditions: The conditions of this V1ComponentStatus. # noqa: E501 - :type: list[V1ComponentCondition] + :type conditions: list[V1ComponentCondition] """ self._conditions = conditions @@ -131,7 +134,7 @@ def kind(self, kind): Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501 :param kind: The kind of this V1ComponentStatus. # noqa: E501 - :type: str + :type kind: str """ self._kind = kind @@ -152,32 +155,40 @@ def metadata(self, metadata): :param metadata: The metadata of this V1ComponentStatus. # noqa: E501 - :type: V1ObjectMeta + :type metadata: V1ObjectMeta """ self._metadata = metadata - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_component_status_list.py b/kubernetes/client/models/v1_component_status_list.py index f1106a20c0..e4fe49b8d0 100644 --- a/kubernetes/client/models/v1_component_status_list.py +++ b/kubernetes/client/models/v1_component_status_list.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -49,7 +52,7 @@ class V1ComponentStatusList(object): def __init__(self, api_version=None, items=None, kind=None, metadata=None, local_vars_configuration=None): # noqa: E501 """V1ComponentStatusList - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._api_version = None @@ -84,7 +87,7 @@ def api_version(self, api_version): APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501 :param api_version: The api_version of this V1ComponentStatusList. # noqa: E501 - :type: str + :type api_version: str """ self._api_version = api_version @@ -107,7 +110,7 @@ def items(self, items): List of ComponentStatus objects. # noqa: E501 :param items: The items of this V1ComponentStatusList. # noqa: E501 - :type: list[V1ComponentStatus] + :type items: list[V1ComponentStatus] """ if self.local_vars_configuration.client_side_validation and items is None: # noqa: E501 raise ValueError("Invalid value for `items`, must not be `None`") # noqa: E501 @@ -132,7 +135,7 @@ def kind(self, kind): Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501 :param kind: The kind of this V1ComponentStatusList. # noqa: E501 - :type: str + :type kind: str """ self._kind = kind @@ -153,32 +156,40 @@ def metadata(self, metadata): :param metadata: The metadata of this V1ComponentStatusList. # noqa: E501 - :type: V1ListMeta + :type metadata: V1ListMeta """ self._metadata = metadata - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_condition.py b/kubernetes/client/models/v1_condition.py index 0bae1adba0..585fed6580 100644 --- a/kubernetes/client/models/v1_condition.py +++ b/kubernetes/client/models/v1_condition.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -53,7 +56,7 @@ class V1Condition(object): def __init__(self, last_transition_time=None, message=None, observed_generation=None, reason=None, status=None, type=None, local_vars_configuration=None): # noqa: E501 """V1Condition - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._last_transition_time = None @@ -90,7 +93,7 @@ def last_transition_time(self, last_transition_time): lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. # noqa: E501 :param last_transition_time: The last_transition_time of this V1Condition. # noqa: E501 - :type: datetime + :type last_transition_time: datetime """ if self.local_vars_configuration.client_side_validation and last_transition_time is None: # noqa: E501 raise ValueError("Invalid value for `last_transition_time`, must not be `None`") # noqa: E501 @@ -115,7 +118,7 @@ def message(self, message): message is a human readable message indicating details about the transition. This may be an empty string. # noqa: E501 :param message: The message of this V1Condition. # noqa: E501 - :type: str + :type message: str """ if self.local_vars_configuration.client_side_validation and message is None: # noqa: E501 raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 @@ -140,7 +143,7 @@ def observed_generation(self, observed_generation): observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance. # noqa: E501 :param observed_generation: The observed_generation of this V1Condition. # noqa: E501 - :type: int + :type observed_generation: int """ self._observed_generation = observed_generation @@ -163,7 +166,7 @@ def reason(self, reason): reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty. # noqa: E501 :param reason: The reason of this V1Condition. # noqa: E501 - :type: str + :type reason: str """ if self.local_vars_configuration.client_side_validation and reason is None: # noqa: E501 raise ValueError("Invalid value for `reason`, must not be `None`") # noqa: E501 @@ -188,7 +191,7 @@ def status(self, status): status of the condition, one of True, False, Unknown. # noqa: E501 :param status: The status of this V1Condition. # noqa: E501 - :type: str + :type status: str """ if self.local_vars_configuration.client_side_validation and status is None: # noqa: E501 raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 @@ -213,34 +216,42 @@ def type(self, type): type of condition in CamelCase or in foo.example.com/CamelCase. # noqa: E501 :param type: The type of this V1Condition. # noqa: E501 - :type: str + :type type: str """ if self.local_vars_configuration.client_side_validation and type is None: # noqa: E501 raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 self._type = type - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_config_map.py b/kubernetes/client/models/v1_config_map.py index 27c0aa1dbc..d7b560db10 100644 --- a/kubernetes/client/models/v1_config_map.py +++ b/kubernetes/client/models/v1_config_map.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -34,8 +37,8 @@ class V1ConfigMap(object): """ openapi_types = { 'api_version': 'str', - 'binary_data': 'dict(str, str)', - 'data': 'dict(str, str)', + 'binary_data': 'dict[str, str]', + 'data': 'dict[str, str]', 'immutable': 'bool', 'kind': 'str', 'metadata': 'V1ObjectMeta' @@ -53,7 +56,7 @@ class V1ConfigMap(object): def __init__(self, api_version=None, binary_data=None, data=None, immutable=None, kind=None, metadata=None, local_vars_configuration=None): # noqa: E501 """V1ConfigMap - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._api_version = None @@ -95,7 +98,7 @@ def api_version(self, api_version): APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501 :param api_version: The api_version of this V1ConfigMap. # noqa: E501 - :type: str + :type api_version: str """ self._api_version = api_version @@ -107,7 +110,7 @@ def binary_data(self): BinaryData contains the binary data. Each key must consist of alphanumeric characters, '-', '_' or '.'. BinaryData can contain byte sequences that are not in the UTF-8 range. The keys stored in BinaryData must not overlap with the ones in the Data field, this is enforced during validation process. Using this field will require 1.10+ apiserver and kubelet. # noqa: E501 :return: The binary_data of this V1ConfigMap. # noqa: E501 - :rtype: dict(str, str) + :rtype: dict[str, str] """ return self._binary_data @@ -118,7 +121,7 @@ def binary_data(self, binary_data): BinaryData contains the binary data. Each key must consist of alphanumeric characters, '-', '_' or '.'. BinaryData can contain byte sequences that are not in the UTF-8 range. The keys stored in BinaryData must not overlap with the ones in the Data field, this is enforced during validation process. Using this field will require 1.10+ apiserver and kubelet. # noqa: E501 :param binary_data: The binary_data of this V1ConfigMap. # noqa: E501 - :type: dict(str, str) + :type binary_data: dict[str, str] """ self._binary_data = binary_data @@ -130,7 +133,7 @@ def data(self): Data contains the configuration data. Each key must consist of alphanumeric characters, '-', '_' or '.'. Values with non-UTF-8 byte sequences must use the BinaryData field. The keys stored in Data must not overlap with the keys in the BinaryData field, this is enforced during validation process. # noqa: E501 :return: The data of this V1ConfigMap. # noqa: E501 - :rtype: dict(str, str) + :rtype: dict[str, str] """ return self._data @@ -141,7 +144,7 @@ def data(self, data): Data contains the configuration data. Each key must consist of alphanumeric characters, '-', '_' or '.'. Values with non-UTF-8 byte sequences must use the BinaryData field. The keys stored in Data must not overlap with the keys in the BinaryData field, this is enforced during validation process. # noqa: E501 :param data: The data of this V1ConfigMap. # noqa: E501 - :type: dict(str, str) + :type data: dict[str, str] """ self._data = data @@ -164,7 +167,7 @@ def immutable(self, immutable): Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. # noqa: E501 :param immutable: The immutable of this V1ConfigMap. # noqa: E501 - :type: bool + :type immutable: bool """ self._immutable = immutable @@ -187,7 +190,7 @@ def kind(self, kind): Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501 :param kind: The kind of this V1ConfigMap. # noqa: E501 - :type: str + :type kind: str """ self._kind = kind @@ -208,32 +211,40 @@ def metadata(self, metadata): :param metadata: The metadata of this V1ConfigMap. # noqa: E501 - :type: V1ObjectMeta + :type metadata: V1ObjectMeta """ self._metadata = metadata - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_config_map_env_source.py b/kubernetes/client/models/v1_config_map_env_source.py index c5167aa892..8b258d1887 100644 --- a/kubernetes/client/models/v1_config_map_env_source.py +++ b/kubernetes/client/models/v1_config_map_env_source.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -45,7 +48,7 @@ class V1ConfigMapEnvSource(object): def __init__(self, name=None, optional=None, local_vars_configuration=None): # noqa: E501 """V1ConfigMapEnvSource - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._name = None @@ -75,7 +78,7 @@ def name(self, name): Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names # noqa: E501 :param name: The name of this V1ConfigMapEnvSource. # noqa: E501 - :type: str + :type name: str """ self._name = name @@ -98,32 +101,40 @@ def optional(self, optional): Specify whether the ConfigMap must be defined # noqa: E501 :param optional: The optional of this V1ConfigMapEnvSource. # noqa: E501 - :type: bool + :type optional: bool """ self._optional = optional - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_config_map_key_selector.py b/kubernetes/client/models/v1_config_map_key_selector.py index d3d8ae5524..6254f6887c 100644 --- a/kubernetes/client/models/v1_config_map_key_selector.py +++ b/kubernetes/client/models/v1_config_map_key_selector.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -47,7 +50,7 @@ class V1ConfigMapKeySelector(object): def __init__(self, key=None, name=None, optional=None, local_vars_configuration=None): # noqa: E501 """V1ConfigMapKeySelector - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._key = None @@ -79,7 +82,7 @@ def key(self, key): The key to select. # noqa: E501 :param key: The key of this V1ConfigMapKeySelector. # noqa: E501 - :type: str + :type key: str """ if self.local_vars_configuration.client_side_validation and key is None: # noqa: E501 raise ValueError("Invalid value for `key`, must not be `None`") # noqa: E501 @@ -104,7 +107,7 @@ def name(self, name): Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names # noqa: E501 :param name: The name of this V1ConfigMapKeySelector. # noqa: E501 - :type: str + :type name: str """ self._name = name @@ -127,32 +130,40 @@ def optional(self, optional): Specify whether the ConfigMap or its key must be defined # noqa: E501 :param optional: The optional of this V1ConfigMapKeySelector. # noqa: E501 - :type: bool + :type optional: bool """ self._optional = optional - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_config_map_list.py b/kubernetes/client/models/v1_config_map_list.py index 1e9383f030..8640edb8b8 100644 --- a/kubernetes/client/models/v1_config_map_list.py +++ b/kubernetes/client/models/v1_config_map_list.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -49,7 +52,7 @@ class V1ConfigMapList(object): def __init__(self, api_version=None, items=None, kind=None, metadata=None, local_vars_configuration=None): # noqa: E501 """V1ConfigMapList - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._api_version = None @@ -84,7 +87,7 @@ def api_version(self, api_version): APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501 :param api_version: The api_version of this V1ConfigMapList. # noqa: E501 - :type: str + :type api_version: str """ self._api_version = api_version @@ -107,7 +110,7 @@ def items(self, items): Items is the list of ConfigMaps. # noqa: E501 :param items: The items of this V1ConfigMapList. # noqa: E501 - :type: list[V1ConfigMap] + :type items: list[V1ConfigMap] """ if self.local_vars_configuration.client_side_validation and items is None: # noqa: E501 raise ValueError("Invalid value for `items`, must not be `None`") # noqa: E501 @@ -132,7 +135,7 @@ def kind(self, kind): Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501 :param kind: The kind of this V1ConfigMapList. # noqa: E501 - :type: str + :type kind: str """ self._kind = kind @@ -153,32 +156,40 @@ def metadata(self, metadata): :param metadata: The metadata of this V1ConfigMapList. # noqa: E501 - :type: V1ListMeta + :type metadata: V1ListMeta """ self._metadata = metadata - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_config_map_node_config_source.py b/kubernetes/client/models/v1_config_map_node_config_source.py index ee58987fe2..e8b2788746 100644 --- a/kubernetes/client/models/v1_config_map_node_config_source.py +++ b/kubernetes/client/models/v1_config_map_node_config_source.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -51,7 +54,7 @@ class V1ConfigMapNodeConfigSource(object): def __init__(self, kubelet_config_key=None, name=None, namespace=None, resource_version=None, uid=None, local_vars_configuration=None): # noqa: E501 """V1ConfigMapNodeConfigSource - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._kubelet_config_key = None @@ -87,7 +90,7 @@ def kubelet_config_key(self, kubelet_config_key): KubeletConfigKey declares which key of the referenced ConfigMap corresponds to the KubeletConfiguration structure This field is required in all cases. # noqa: E501 :param kubelet_config_key: The kubelet_config_key of this V1ConfigMapNodeConfigSource. # noqa: E501 - :type: str + :type kubelet_config_key: str """ if self.local_vars_configuration.client_side_validation and kubelet_config_key is None: # noqa: E501 raise ValueError("Invalid value for `kubelet_config_key`, must not be `None`") # noqa: E501 @@ -112,7 +115,7 @@ def name(self, name): Name is the metadata.name of the referenced ConfigMap. This field is required in all cases. # noqa: E501 :param name: The name of this V1ConfigMapNodeConfigSource. # noqa: E501 - :type: str + :type name: str """ if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 @@ -137,7 +140,7 @@ def namespace(self, namespace): Namespace is the metadata.namespace of the referenced ConfigMap. This field is required in all cases. # noqa: E501 :param namespace: The namespace of this V1ConfigMapNodeConfigSource. # noqa: E501 - :type: str + :type namespace: str """ if self.local_vars_configuration.client_side_validation and namespace is None: # noqa: E501 raise ValueError("Invalid value for `namespace`, must not be `None`") # noqa: E501 @@ -162,7 +165,7 @@ def resource_version(self, resource_version): ResourceVersion is the metadata.ResourceVersion of the referenced ConfigMap. This field is forbidden in Node.Spec, and required in Node.Status. # noqa: E501 :param resource_version: The resource_version of this V1ConfigMapNodeConfigSource. # noqa: E501 - :type: str + :type resource_version: str """ self._resource_version = resource_version @@ -185,32 +188,40 @@ def uid(self, uid): UID is the metadata.UID of the referenced ConfigMap. This field is forbidden in Node.Spec, and required in Node.Status. # noqa: E501 :param uid: The uid of this V1ConfigMapNodeConfigSource. # noqa: E501 - :type: str + :type uid: str """ self._uid = uid - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_config_map_projection.py b/kubernetes/client/models/v1_config_map_projection.py index e77e88d4c2..5c848d9593 100644 --- a/kubernetes/client/models/v1_config_map_projection.py +++ b/kubernetes/client/models/v1_config_map_projection.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -47,7 +50,7 @@ class V1ConfigMapProjection(object): def __init__(self, items=None, name=None, optional=None, local_vars_configuration=None): # noqa: E501 """V1ConfigMapProjection - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._items = None @@ -80,7 +83,7 @@ def items(self, items): items if unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. # noqa: E501 :param items: The items of this V1ConfigMapProjection. # noqa: E501 - :type: list[V1KeyToPath] + :type items: list[V1KeyToPath] """ self._items = items @@ -103,7 +106,7 @@ def name(self, name): Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names # noqa: E501 :param name: The name of this V1ConfigMapProjection. # noqa: E501 - :type: str + :type name: str """ self._name = name @@ -126,32 +129,40 @@ def optional(self, optional): optional specify whether the ConfigMap or its keys must be defined # noqa: E501 :param optional: The optional of this V1ConfigMapProjection. # noqa: E501 - :type: bool + :type optional: bool """ self._optional = optional - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_config_map_volume_source.py b/kubernetes/client/models/v1_config_map_volume_source.py index 6ea5ef9664..17c382db30 100644 --- a/kubernetes/client/models/v1_config_map_volume_source.py +++ b/kubernetes/client/models/v1_config_map_volume_source.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -49,7 +52,7 @@ class V1ConfigMapVolumeSource(object): def __init__(self, default_mode=None, items=None, name=None, optional=None, local_vars_configuration=None): # noqa: E501 """V1ConfigMapVolumeSource - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._default_mode = None @@ -85,7 +88,7 @@ def default_mode(self, default_mode): defaultMode is optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. # noqa: E501 :param default_mode: The default_mode of this V1ConfigMapVolumeSource. # noqa: E501 - :type: int + :type default_mode: int """ self._default_mode = default_mode @@ -108,7 +111,7 @@ def items(self, items): items if unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. # noqa: E501 :param items: The items of this V1ConfigMapVolumeSource. # noqa: E501 - :type: list[V1KeyToPath] + :type items: list[V1KeyToPath] """ self._items = items @@ -131,7 +134,7 @@ def name(self, name): Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names # noqa: E501 :param name: The name of this V1ConfigMapVolumeSource. # noqa: E501 - :type: str + :type name: str """ self._name = name @@ -154,32 +157,40 @@ def optional(self, optional): optional specify whether the ConfigMap or its keys must be defined # noqa: E501 :param optional: The optional of this V1ConfigMapVolumeSource. # noqa: E501 - :type: bool + :type optional: bool """ self._optional = optional - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_container.py b/kubernetes/client/models/v1_container.py index 1e59307429..7d6dec0f22 100644 --- a/kubernetes/client/models/v1_container.py +++ b/kubernetes/client/models/v1_container.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -47,6 +50,7 @@ class V1Container(object): 'resize_policy': 'list[V1ContainerResizePolicy]', 'resources': 'V1ResourceRequirements', 'restart_policy': 'str', + 'restart_policy_rules': 'list[V1ContainerRestartRule]', 'security_context': 'V1SecurityContext', 'startup_probe': 'V1Probe', 'stdin': 'bool', @@ -74,6 +78,7 @@ class V1Container(object): 'resize_policy': 'resizePolicy', 'resources': 'resources', 'restart_policy': 'restartPolicy', + 'restart_policy_rules': 'restartPolicyRules', 'security_context': 'securityContext', 'startup_probe': 'startupProbe', 'stdin': 'stdin', @@ -86,10 +91,10 @@ class V1Container(object): 'working_dir': 'workingDir' } - def __init__(self, args=None, command=None, env=None, env_from=None, image=None, image_pull_policy=None, lifecycle=None, liveness_probe=None, name=None, ports=None, readiness_probe=None, resize_policy=None, resources=None, restart_policy=None, security_context=None, startup_probe=None, stdin=None, stdin_once=None, termination_message_path=None, termination_message_policy=None, tty=None, volume_devices=None, volume_mounts=None, working_dir=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, args=None, command=None, env=None, env_from=None, image=None, image_pull_policy=None, lifecycle=None, liveness_probe=None, name=None, ports=None, readiness_probe=None, resize_policy=None, resources=None, restart_policy=None, restart_policy_rules=None, security_context=None, startup_probe=None, stdin=None, stdin_once=None, termination_message_path=None, termination_message_policy=None, tty=None, volume_devices=None, volume_mounts=None, working_dir=None, local_vars_configuration=None): # noqa: E501 """V1Container - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._args = None @@ -106,6 +111,7 @@ def __init__(self, args=None, command=None, env=None, env_from=None, image=None, self._resize_policy = None self._resources = None self._restart_policy = None + self._restart_policy_rules = None self._security_context = None self._startup_probe = None self._stdin = None @@ -145,6 +151,8 @@ def __init__(self, args=None, command=None, env=None, env_from=None, image=None, self.resources = resources if restart_policy is not None: self.restart_policy = restart_policy + if restart_policy_rules is not None: + self.restart_policy_rules = restart_policy_rules if security_context is not None: self.security_context = security_context if startup_probe is not None: @@ -184,7 +192,7 @@ def args(self, args): Arguments to the entrypoint. The container image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell # noqa: E501 :param args: The args of this V1Container. # noqa: E501 - :type: list[str] + :type args: list[str] """ self._args = args @@ -207,7 +215,7 @@ def command(self, command): Entrypoint array. Not executed within a shell. The container image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell # noqa: E501 :param command: The command of this V1Container. # noqa: E501 - :type: list[str] + :type command: list[str] """ self._command = command @@ -230,7 +238,7 @@ def env(self, env): List of environment variables to set in the container. Cannot be updated. # noqa: E501 :param env: The env of this V1Container. # noqa: E501 - :type: list[V1EnvVar] + :type env: list[V1EnvVar] """ self._env = env @@ -239,7 +247,7 @@ def env(self, env): def env_from(self): """Gets the env_from of this V1Container. # noqa: E501 - List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. # noqa: E501 + List of sources to populate environment variables in the container. The keys defined within a source may consist of any printable ASCII characters except '='. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. # noqa: E501 :return: The env_from of this V1Container. # noqa: E501 :rtype: list[V1EnvFromSource] @@ -250,10 +258,10 @@ def env_from(self): def env_from(self, env_from): """Sets the env_from of this V1Container. - List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. # noqa: E501 + List of sources to populate environment variables in the container. The keys defined within a source may consist of any printable ASCII characters except '='. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. # noqa: E501 :param env_from: The env_from of this V1Container. # noqa: E501 - :type: list[V1EnvFromSource] + :type env_from: list[V1EnvFromSource] """ self._env_from = env_from @@ -276,7 +284,7 @@ def image(self, image): Container image name. More info: https://kubernetes.io/docs/concepts/containers/images This field is optional to allow higher level config management to default or override container images in workload controllers like Deployments and StatefulSets. # noqa: E501 :param image: The image of this V1Container. # noqa: E501 - :type: str + :type image: str """ self._image = image @@ -299,7 +307,7 @@ def image_pull_policy(self, image_pull_policy): Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images # noqa: E501 :param image_pull_policy: The image_pull_policy of this V1Container. # noqa: E501 - :type: str + :type image_pull_policy: str """ self._image_pull_policy = image_pull_policy @@ -320,7 +328,7 @@ def lifecycle(self, lifecycle): :param lifecycle: The lifecycle of this V1Container. # noqa: E501 - :type: V1Lifecycle + :type lifecycle: V1Lifecycle """ self._lifecycle = lifecycle @@ -341,7 +349,7 @@ def liveness_probe(self, liveness_probe): :param liveness_probe: The liveness_probe of this V1Container. # noqa: E501 - :type: V1Probe + :type liveness_probe: V1Probe """ self._liveness_probe = liveness_probe @@ -364,7 +372,7 @@ def name(self, name): Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. # noqa: E501 :param name: The name of this V1Container. # noqa: E501 - :type: str + :type name: str """ if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 @@ -389,7 +397,7 @@ def ports(self, ports): List of ports to expose from the container. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default \"0.0.0.0\" address inside a container will be accessible from the network. Modifying this array with strategic merge patch may corrupt the data. For more information See https://github.com/kubernetes/kubernetes/issues/108255. Cannot be updated. # noqa: E501 :param ports: The ports of this V1Container. # noqa: E501 - :type: list[V1ContainerPort] + :type ports: list[V1ContainerPort] """ self._ports = ports @@ -410,7 +418,7 @@ def readiness_probe(self, readiness_probe): :param readiness_probe: The readiness_probe of this V1Container. # noqa: E501 - :type: V1Probe + :type readiness_probe: V1Probe """ self._readiness_probe = readiness_probe @@ -419,7 +427,7 @@ def readiness_probe(self, readiness_probe): def resize_policy(self): """Gets the resize_policy of this V1Container. # noqa: E501 - Resources resize policy for the container. # noqa: E501 + Resources resize policy for the container. This field cannot be set on ephemeral containers. # noqa: E501 :return: The resize_policy of this V1Container. # noqa: E501 :rtype: list[V1ContainerResizePolicy] @@ -430,10 +438,10 @@ def resize_policy(self): def resize_policy(self, resize_policy): """Sets the resize_policy of this V1Container. - Resources resize policy for the container. # noqa: E501 + Resources resize policy for the container. This field cannot be set on ephemeral containers. # noqa: E501 :param resize_policy: The resize_policy of this V1Container. # noqa: E501 - :type: list[V1ContainerResizePolicy] + :type resize_policy: list[V1ContainerResizePolicy] """ self._resize_policy = resize_policy @@ -454,7 +462,7 @@ def resources(self, resources): :param resources: The resources of this V1Container. # noqa: E501 - :type: V1ResourceRequirements + :type resources: V1ResourceRequirements """ self._resources = resources @@ -463,7 +471,7 @@ def resources(self, resources): def restart_policy(self): """Gets the restart_policy of this V1Container. # noqa: E501 - RestartPolicy defines the restart behavior of individual containers in a pod. This field may only be set for init containers, and the only allowed value is \"Always\". For non-init containers or when this field is not specified, the restart behavior is defined by the Pod's restart policy and the container type. Setting the RestartPolicy as \"Always\" for the init container will have the following effect: this init container will be continually restarted on exit until all regular containers have terminated. Once all regular containers have completed, all init containers with restartPolicy \"Always\" will be shut down. This lifecycle differs from normal init containers and is often referred to as a \"sidecar\" container. Although this init container still starts in the init container sequence, it does not wait for the container to complete before proceeding to the next init container. Instead, the next init container starts immediately after this init container is started, or after any startupProbe has successfully completed. # noqa: E501 + RestartPolicy defines the restart behavior of individual containers in a pod. This overrides the pod-level restart policy. When this field is not specified, the restart behavior is defined by the Pod's restart policy and the container type. Additionally, setting the RestartPolicy as \"Always\" for the init container will have the following effect: this init container will be continually restarted on exit until all regular containers have terminated. Once all regular containers have completed, all init containers with restartPolicy \"Always\" will be shut down. This lifecycle differs from normal init containers and is often referred to as a \"sidecar\" container. Although this init container still starts in the init container sequence, it does not wait for the container to complete before proceeding to the next init container. Instead, the next init container starts immediately after this init container is started, or after any startupProbe has successfully completed. # noqa: E501 :return: The restart_policy of this V1Container. # noqa: E501 :rtype: str @@ -474,14 +482,37 @@ def restart_policy(self): def restart_policy(self, restart_policy): """Sets the restart_policy of this V1Container. - RestartPolicy defines the restart behavior of individual containers in a pod. This field may only be set for init containers, and the only allowed value is \"Always\". For non-init containers or when this field is not specified, the restart behavior is defined by the Pod's restart policy and the container type. Setting the RestartPolicy as \"Always\" for the init container will have the following effect: this init container will be continually restarted on exit until all regular containers have terminated. Once all regular containers have completed, all init containers with restartPolicy \"Always\" will be shut down. This lifecycle differs from normal init containers and is often referred to as a \"sidecar\" container. Although this init container still starts in the init container sequence, it does not wait for the container to complete before proceeding to the next init container. Instead, the next init container starts immediately after this init container is started, or after any startupProbe has successfully completed. # noqa: E501 + RestartPolicy defines the restart behavior of individual containers in a pod. This overrides the pod-level restart policy. When this field is not specified, the restart behavior is defined by the Pod's restart policy and the container type. Additionally, setting the RestartPolicy as \"Always\" for the init container will have the following effect: this init container will be continually restarted on exit until all regular containers have terminated. Once all regular containers have completed, all init containers with restartPolicy \"Always\" will be shut down. This lifecycle differs from normal init containers and is often referred to as a \"sidecar\" container. Although this init container still starts in the init container sequence, it does not wait for the container to complete before proceeding to the next init container. Instead, the next init container starts immediately after this init container is started, or after any startupProbe has successfully completed. # noqa: E501 :param restart_policy: The restart_policy of this V1Container. # noqa: E501 - :type: str + :type restart_policy: str """ self._restart_policy = restart_policy + @property + def restart_policy_rules(self): + """Gets the restart_policy_rules of this V1Container. # noqa: E501 + + Represents a list of rules to be checked to determine if the container should be restarted on exit. The rules are evaluated in order. Once a rule matches a container exit condition, the remaining rules are ignored. If no rule matches the container exit condition, the Container-level restart policy determines the whether the container is restarted or not. Constraints on the rules: - At most 20 rules are allowed. - Rules can have the same action. - Identical rules are not forbidden in validations. When rules are specified, container MUST set RestartPolicy explicitly even it if matches the Pod's RestartPolicy. # noqa: E501 + + :return: The restart_policy_rules of this V1Container. # noqa: E501 + :rtype: list[V1ContainerRestartRule] + """ + return self._restart_policy_rules + + @restart_policy_rules.setter + def restart_policy_rules(self, restart_policy_rules): + """Sets the restart_policy_rules of this V1Container. + + Represents a list of rules to be checked to determine if the container should be restarted on exit. The rules are evaluated in order. Once a rule matches a container exit condition, the remaining rules are ignored. If no rule matches the container exit condition, the Container-level restart policy determines the whether the container is restarted or not. Constraints on the rules: - At most 20 rules are allowed. - Rules can have the same action. - Identical rules are not forbidden in validations. When rules are specified, container MUST set RestartPolicy explicitly even it if matches the Pod's RestartPolicy. # noqa: E501 + + :param restart_policy_rules: The restart_policy_rules of this V1Container. # noqa: E501 + :type restart_policy_rules: list[V1ContainerRestartRule] + """ + + self._restart_policy_rules = restart_policy_rules + @property def security_context(self): """Gets the security_context of this V1Container. # noqa: E501 @@ -498,7 +529,7 @@ def security_context(self, security_context): :param security_context: The security_context of this V1Container. # noqa: E501 - :type: V1SecurityContext + :type security_context: V1SecurityContext """ self._security_context = security_context @@ -519,7 +550,7 @@ def startup_probe(self, startup_probe): :param startup_probe: The startup_probe of this V1Container. # noqa: E501 - :type: V1Probe + :type startup_probe: V1Probe """ self._startup_probe = startup_probe @@ -542,7 +573,7 @@ def stdin(self, stdin): Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. Default is false. # noqa: E501 :param stdin: The stdin of this V1Container. # noqa: E501 - :type: bool + :type stdin: bool """ self._stdin = stdin @@ -565,7 +596,7 @@ def stdin_once(self, stdin_once): Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. Default is false # noqa: E501 :param stdin_once: The stdin_once of this V1Container. # noqa: E501 - :type: bool + :type stdin_once: bool """ self._stdin_once = stdin_once @@ -588,7 +619,7 @@ def termination_message_path(self, termination_message_path): Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated. # noqa: E501 :param termination_message_path: The termination_message_path of this V1Container. # noqa: E501 - :type: str + :type termination_message_path: str """ self._termination_message_path = termination_message_path @@ -611,7 +642,7 @@ def termination_message_policy(self, termination_message_policy): Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated. # noqa: E501 :param termination_message_policy: The termination_message_policy of this V1Container. # noqa: E501 - :type: str + :type termination_message_policy: str """ self._termination_message_policy = termination_message_policy @@ -634,7 +665,7 @@ def tty(self, tty): Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false. # noqa: E501 :param tty: The tty of this V1Container. # noqa: E501 - :type: bool + :type tty: bool """ self._tty = tty @@ -657,7 +688,7 @@ def volume_devices(self, volume_devices): volumeDevices is the list of block devices to be used by the container. # noqa: E501 :param volume_devices: The volume_devices of this V1Container. # noqa: E501 - :type: list[V1VolumeDevice] + :type volume_devices: list[V1VolumeDevice] """ self._volume_devices = volume_devices @@ -680,7 +711,7 @@ def volume_mounts(self, volume_mounts): Pod volumes to mount into the container's filesystem. Cannot be updated. # noqa: E501 :param volume_mounts: The volume_mounts of this V1Container. # noqa: E501 - :type: list[V1VolumeMount] + :type volume_mounts: list[V1VolumeMount] """ self._volume_mounts = volume_mounts @@ -703,32 +734,40 @@ def working_dir(self, working_dir): Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated. # noqa: E501 :param working_dir: The working_dir of this V1Container. # noqa: E501 - :type: str + :type working_dir: str """ self._working_dir = working_dir - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_container_extended_resource_request.py b/kubernetes/client/models/v1_container_extended_resource_request.py new file mode 100644 index 0000000000..57ffd53050 --- /dev/null +++ b/kubernetes/client/models/v1_container_extended_resource_request.py @@ -0,0 +1,192 @@ +# coding: utf-8 + +""" + Kubernetes + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: release-1.35 + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from kubernetes.client.configuration import Configuration + + +class V1ContainerExtendedResourceRequest(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'container_name': 'str', + 'request_name': 'str', + 'resource_name': 'str' + } + + attribute_map = { + 'container_name': 'containerName', + 'request_name': 'requestName', + 'resource_name': 'resourceName' + } + + def __init__(self, container_name=None, request_name=None, resource_name=None, local_vars_configuration=None): # noqa: E501 + """V1ContainerExtendedResourceRequest - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._container_name = None + self._request_name = None + self._resource_name = None + self.discriminator = None + + self.container_name = container_name + self.request_name = request_name + self.resource_name = resource_name + + @property + def container_name(self): + """Gets the container_name of this V1ContainerExtendedResourceRequest. # noqa: E501 + + The name of the container requesting resources. # noqa: E501 + + :return: The container_name of this V1ContainerExtendedResourceRequest. # noqa: E501 + :rtype: str + """ + return self._container_name + + @container_name.setter + def container_name(self, container_name): + """Sets the container_name of this V1ContainerExtendedResourceRequest. + + The name of the container requesting resources. # noqa: E501 + + :param container_name: The container_name of this V1ContainerExtendedResourceRequest. # noqa: E501 + :type container_name: str + """ + if self.local_vars_configuration.client_side_validation and container_name is None: # noqa: E501 + raise ValueError("Invalid value for `container_name`, must not be `None`") # noqa: E501 + + self._container_name = container_name + + @property + def request_name(self): + """Gets the request_name of this V1ContainerExtendedResourceRequest. # noqa: E501 + + The name of the request in the special ResourceClaim which corresponds to the extended resource. # noqa: E501 + + :return: The request_name of this V1ContainerExtendedResourceRequest. # noqa: E501 + :rtype: str + """ + return self._request_name + + @request_name.setter + def request_name(self, request_name): + """Sets the request_name of this V1ContainerExtendedResourceRequest. + + The name of the request in the special ResourceClaim which corresponds to the extended resource. # noqa: E501 + + :param request_name: The request_name of this V1ContainerExtendedResourceRequest. # noqa: E501 + :type request_name: str + """ + if self.local_vars_configuration.client_side_validation and request_name is None: # noqa: E501 + raise ValueError("Invalid value for `request_name`, must not be `None`") # noqa: E501 + + self._request_name = request_name + + @property + def resource_name(self): + """Gets the resource_name of this V1ContainerExtendedResourceRequest. # noqa: E501 + + The name of the extended resource in that container which gets backed by DRA. # noqa: E501 + + :return: The resource_name of this V1ContainerExtendedResourceRequest. # noqa: E501 + :rtype: str + """ + return self._resource_name + + @resource_name.setter + def resource_name(self, resource_name): + """Sets the resource_name of this V1ContainerExtendedResourceRequest. + + The name of the extended resource in that container which gets backed by DRA. # noqa: E501 + + :param resource_name: The resource_name of this V1ContainerExtendedResourceRequest. # noqa: E501 + :type resource_name: str + """ + if self.local_vars_configuration.client_side_validation and resource_name is None: # noqa: E501 + raise ValueError("Invalid value for `resource_name`, must not be `None`") # noqa: E501 + + self._resource_name = resource_name + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1ContainerExtendedResourceRequest): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1ContainerExtendedResourceRequest): + return True + + return self.to_dict() != other.to_dict() diff --git a/kubernetes/client/models/v1_container_image.py b/kubernetes/client/models/v1_container_image.py index 4651d82503..99a357e9bc 100644 --- a/kubernetes/client/models/v1_container_image.py +++ b/kubernetes/client/models/v1_container_image.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -45,7 +48,7 @@ class V1ContainerImage(object): def __init__(self, names=None, size_bytes=None, local_vars_configuration=None): # noqa: E501 """V1ContainerImage - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._names = None @@ -75,7 +78,7 @@ def names(self, names): Names by which this image is known. e.g. [\"kubernetes.example/hyperkube:v1.0.7\", \"cloud-vendor.registry.example/cloud-vendor/hyperkube:v1.0.7\"] # noqa: E501 :param names: The names of this V1ContainerImage. # noqa: E501 - :type: list[str] + :type names: list[str] """ self._names = names @@ -98,32 +101,40 @@ def size_bytes(self, size_bytes): The size of the image in bytes. # noqa: E501 :param size_bytes: The size_bytes of this V1ContainerImage. # noqa: E501 - :type: int + :type size_bytes: int """ self._size_bytes = size_bytes - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_container_port.py b/kubernetes/client/models/v1_container_port.py index 7a72cb282a..d7dd899f28 100644 --- a/kubernetes/client/models/v1_container_port.py +++ b/kubernetes/client/models/v1_container_port.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -51,7 +54,7 @@ class V1ContainerPort(object): def __init__(self, container_port=None, host_ip=None, host_port=None, name=None, protocol=None, local_vars_configuration=None): # noqa: E501 """V1ContainerPort - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._container_port = None @@ -89,7 +92,7 @@ def container_port(self, container_port): Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536. # noqa: E501 :param container_port: The container_port of this V1ContainerPort. # noqa: E501 - :type: int + :type container_port: int """ if self.local_vars_configuration.client_side_validation and container_port is None: # noqa: E501 raise ValueError("Invalid value for `container_port`, must not be `None`") # noqa: E501 @@ -114,7 +117,7 @@ def host_ip(self, host_ip): What host IP to bind the external port to. # noqa: E501 :param host_ip: The host_ip of this V1ContainerPort. # noqa: E501 - :type: str + :type host_ip: str """ self._host_ip = host_ip @@ -137,7 +140,7 @@ def host_port(self, host_port): Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this. # noqa: E501 :param host_port: The host_port of this V1ContainerPort. # noqa: E501 - :type: int + :type host_port: int """ self._host_port = host_port @@ -160,7 +163,7 @@ def name(self, name): If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services. # noqa: E501 :param name: The name of this V1ContainerPort. # noqa: E501 - :type: str + :type name: str """ self._name = name @@ -183,32 +186,40 @@ def protocol(self, protocol): Protocol for port. Must be UDP, TCP, or SCTP. Defaults to \"TCP\". # noqa: E501 :param protocol: The protocol of this V1ContainerPort. # noqa: E501 - :type: str + :type protocol: str """ self._protocol = protocol - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_container_resize_policy.py b/kubernetes/client/models/v1_container_resize_policy.py index bda0c7596a..5a0ec38f0d 100644 --- a/kubernetes/client/models/v1_container_resize_policy.py +++ b/kubernetes/client/models/v1_container_resize_policy.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -45,7 +48,7 @@ class V1ContainerResizePolicy(object): def __init__(self, resource_name=None, restart_policy=None, local_vars_configuration=None): # noqa: E501 """V1ContainerResizePolicy - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._resource_name = None @@ -73,7 +76,7 @@ def resource_name(self, resource_name): Name of the resource to which this resource resize policy applies. Supported values: cpu, memory. # noqa: E501 :param resource_name: The resource_name of this V1ContainerResizePolicy. # noqa: E501 - :type: str + :type resource_name: str """ if self.local_vars_configuration.client_side_validation and resource_name is None: # noqa: E501 raise ValueError("Invalid value for `resource_name`, must not be `None`") # noqa: E501 @@ -98,34 +101,42 @@ def restart_policy(self, restart_policy): Restart policy to apply when specified resource is resized. If not specified, it defaults to NotRequired. # noqa: E501 :param restart_policy: The restart_policy of this V1ContainerResizePolicy. # noqa: E501 - :type: str + :type restart_policy: str """ if self.local_vars_configuration.client_side_validation and restart_policy is None: # noqa: E501 raise ValueError("Invalid value for `restart_policy`, must not be `None`") # noqa: E501 self._restart_policy = restart_policy - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_container_restart_rule.py b/kubernetes/client/models/v1_container_restart_rule.py new file mode 100644 index 0000000000..c053b4749d --- /dev/null +++ b/kubernetes/client/models/v1_container_restart_rule.py @@ -0,0 +1,160 @@ +# coding: utf-8 + +""" + Kubernetes + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: release-1.35 + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from kubernetes.client.configuration import Configuration + + +class V1ContainerRestartRule(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'action': 'str', + 'exit_codes': 'V1ContainerRestartRuleOnExitCodes' + } + + attribute_map = { + 'action': 'action', + 'exit_codes': 'exitCodes' + } + + def __init__(self, action=None, exit_codes=None, local_vars_configuration=None): # noqa: E501 + """V1ContainerRestartRule - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._action = None + self._exit_codes = None + self.discriminator = None + + self.action = action + if exit_codes is not None: + self.exit_codes = exit_codes + + @property + def action(self): + """Gets the action of this V1ContainerRestartRule. # noqa: E501 + + Specifies the action taken on a container exit if the requirements are satisfied. The only possible value is \"Restart\" to restart the container. # noqa: E501 + + :return: The action of this V1ContainerRestartRule. # noqa: E501 + :rtype: str + """ + return self._action + + @action.setter + def action(self, action): + """Sets the action of this V1ContainerRestartRule. + + Specifies the action taken on a container exit if the requirements are satisfied. The only possible value is \"Restart\" to restart the container. # noqa: E501 + + :param action: The action of this V1ContainerRestartRule. # noqa: E501 + :type action: str + """ + if self.local_vars_configuration.client_side_validation and action is None: # noqa: E501 + raise ValueError("Invalid value for `action`, must not be `None`") # noqa: E501 + + self._action = action + + @property + def exit_codes(self): + """Gets the exit_codes of this V1ContainerRestartRule. # noqa: E501 + + + :return: The exit_codes of this V1ContainerRestartRule. # noqa: E501 + :rtype: V1ContainerRestartRuleOnExitCodes + """ + return self._exit_codes + + @exit_codes.setter + def exit_codes(self, exit_codes): + """Sets the exit_codes of this V1ContainerRestartRule. + + + :param exit_codes: The exit_codes of this V1ContainerRestartRule. # noqa: E501 + :type exit_codes: V1ContainerRestartRuleOnExitCodes + """ + + self._exit_codes = exit_codes + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1ContainerRestartRule): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1ContainerRestartRule): + return True + + return self.to_dict() != other.to_dict() diff --git a/kubernetes/client/models/v1_container_restart_rule_on_exit_codes.py b/kubernetes/client/models/v1_container_restart_rule_on_exit_codes.py new file mode 100644 index 0000000000..fd43677891 --- /dev/null +++ b/kubernetes/client/models/v1_container_restart_rule_on_exit_codes.py @@ -0,0 +1,162 @@ +# coding: utf-8 + +""" + Kubernetes + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: release-1.35 + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from kubernetes.client.configuration import Configuration + + +class V1ContainerRestartRuleOnExitCodes(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'operator': 'str', + 'values': 'list[int]' + } + + attribute_map = { + 'operator': 'operator', + 'values': 'values' + } + + def __init__(self, operator=None, values=None, local_vars_configuration=None): # noqa: E501 + """V1ContainerRestartRuleOnExitCodes - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._operator = None + self._values = None + self.discriminator = None + + self.operator = operator + if values is not None: + self.values = values + + @property + def operator(self): + """Gets the operator of this V1ContainerRestartRuleOnExitCodes. # noqa: E501 + + Represents the relationship between the container exit code(s) and the specified values. Possible values are: - In: the requirement is satisfied if the container exit code is in the set of specified values. - NotIn: the requirement is satisfied if the container exit code is not in the set of specified values. # noqa: E501 + + :return: The operator of this V1ContainerRestartRuleOnExitCodes. # noqa: E501 + :rtype: str + """ + return self._operator + + @operator.setter + def operator(self, operator): + """Sets the operator of this V1ContainerRestartRuleOnExitCodes. + + Represents the relationship between the container exit code(s) and the specified values. Possible values are: - In: the requirement is satisfied if the container exit code is in the set of specified values. - NotIn: the requirement is satisfied if the container exit code is not in the set of specified values. # noqa: E501 + + :param operator: The operator of this V1ContainerRestartRuleOnExitCodes. # noqa: E501 + :type operator: str + """ + if self.local_vars_configuration.client_side_validation and operator is None: # noqa: E501 + raise ValueError("Invalid value for `operator`, must not be `None`") # noqa: E501 + + self._operator = operator + + @property + def values(self): + """Gets the values of this V1ContainerRestartRuleOnExitCodes. # noqa: E501 + + Specifies the set of values to check for container exit codes. At most 255 elements are allowed. # noqa: E501 + + :return: The values of this V1ContainerRestartRuleOnExitCodes. # noqa: E501 + :rtype: list[int] + """ + return self._values + + @values.setter + def values(self, values): + """Sets the values of this V1ContainerRestartRuleOnExitCodes. + + Specifies the set of values to check for container exit codes. At most 255 elements are allowed. # noqa: E501 + + :param values: The values of this V1ContainerRestartRuleOnExitCodes. # noqa: E501 + :type values: list[int] + """ + + self._values = values + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1ContainerRestartRuleOnExitCodes): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1ContainerRestartRuleOnExitCodes): + return True + + return self.to_dict() != other.to_dict() diff --git a/kubernetes/client/models/v1_container_state.py b/kubernetes/client/models/v1_container_state.py index cc6c45b534..aed5dd5d74 100644 --- a/kubernetes/client/models/v1_container_state.py +++ b/kubernetes/client/models/v1_container_state.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -47,7 +50,7 @@ class V1ContainerState(object): def __init__(self, running=None, terminated=None, waiting=None, local_vars_configuration=None): # noqa: E501 """V1ContainerState - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._running = None @@ -78,7 +81,7 @@ def running(self, running): :param running: The running of this V1ContainerState. # noqa: E501 - :type: V1ContainerStateRunning + :type running: V1ContainerStateRunning """ self._running = running @@ -99,7 +102,7 @@ def terminated(self, terminated): :param terminated: The terminated of this V1ContainerState. # noqa: E501 - :type: V1ContainerStateTerminated + :type terminated: V1ContainerStateTerminated """ self._terminated = terminated @@ -120,32 +123,40 @@ def waiting(self, waiting): :param waiting: The waiting of this V1ContainerState. # noqa: E501 - :type: V1ContainerStateWaiting + :type waiting: V1ContainerStateWaiting """ self._waiting = waiting - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_container_state_running.py b/kubernetes/client/models/v1_container_state_running.py index d1b00f14e7..88d88eabfa 100644 --- a/kubernetes/client/models/v1_container_state_running.py +++ b/kubernetes/client/models/v1_container_state_running.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -43,7 +46,7 @@ class V1ContainerStateRunning(object): def __init__(self, started_at=None, local_vars_configuration=None): # noqa: E501 """V1ContainerStateRunning - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._started_at = None @@ -70,32 +73,40 @@ def started_at(self, started_at): Time at which the container was last (re-)started # noqa: E501 :param started_at: The started_at of this V1ContainerStateRunning. # noqa: E501 - :type: datetime + :type started_at: datetime """ self._started_at = started_at - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_container_state_terminated.py b/kubernetes/client/models/v1_container_state_terminated.py index 7f7cd08385..03b441105d 100644 --- a/kubernetes/client/models/v1_container_state_terminated.py +++ b/kubernetes/client/models/v1_container_state_terminated.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -55,7 +58,7 @@ class V1ContainerStateTerminated(object): def __init__(self, container_id=None, exit_code=None, finished_at=None, message=None, reason=None, signal=None, started_at=None, local_vars_configuration=None): # noqa: E501 """V1ContainerStateTerminated - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._container_id = None @@ -99,7 +102,7 @@ def container_id(self, container_id): Container's ID in the format '://' # noqa: E501 :param container_id: The container_id of this V1ContainerStateTerminated. # noqa: E501 - :type: str + :type container_id: str """ self._container_id = container_id @@ -122,7 +125,7 @@ def exit_code(self, exit_code): Exit status from the last termination of the container # noqa: E501 :param exit_code: The exit_code of this V1ContainerStateTerminated. # noqa: E501 - :type: int + :type exit_code: int """ if self.local_vars_configuration.client_side_validation and exit_code is None: # noqa: E501 raise ValueError("Invalid value for `exit_code`, must not be `None`") # noqa: E501 @@ -147,7 +150,7 @@ def finished_at(self, finished_at): Time at which the container last terminated # noqa: E501 :param finished_at: The finished_at of this V1ContainerStateTerminated. # noqa: E501 - :type: datetime + :type finished_at: datetime """ self._finished_at = finished_at @@ -170,7 +173,7 @@ def message(self, message): Message regarding the last termination of the container # noqa: E501 :param message: The message of this V1ContainerStateTerminated. # noqa: E501 - :type: str + :type message: str """ self._message = message @@ -193,7 +196,7 @@ def reason(self, reason): (brief) reason from the last termination of the container # noqa: E501 :param reason: The reason of this V1ContainerStateTerminated. # noqa: E501 - :type: str + :type reason: str """ self._reason = reason @@ -216,7 +219,7 @@ def signal(self, signal): Signal from the last termination of the container # noqa: E501 :param signal: The signal of this V1ContainerStateTerminated. # noqa: E501 - :type: int + :type signal: int """ self._signal = signal @@ -239,32 +242,40 @@ def started_at(self, started_at): Time at which previous execution of the container started # noqa: E501 :param started_at: The started_at of this V1ContainerStateTerminated. # noqa: E501 - :type: datetime + :type started_at: datetime """ self._started_at = started_at - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_container_state_waiting.py b/kubernetes/client/models/v1_container_state_waiting.py index 84a3a643f3..126d6dd332 100644 --- a/kubernetes/client/models/v1_container_state_waiting.py +++ b/kubernetes/client/models/v1_container_state_waiting.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -45,7 +48,7 @@ class V1ContainerStateWaiting(object): def __init__(self, message=None, reason=None, local_vars_configuration=None): # noqa: E501 """V1ContainerStateWaiting - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._message = None @@ -75,7 +78,7 @@ def message(self, message): Message regarding why the container is not yet running. # noqa: E501 :param message: The message of this V1ContainerStateWaiting. # noqa: E501 - :type: str + :type message: str """ self._message = message @@ -98,32 +101,40 @@ def reason(self, reason): (brief) reason the container is not yet running. # noqa: E501 :param reason: The reason of this V1ContainerStateWaiting. # noqa: E501 - :type: str + :type reason: str """ self._reason = reason - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_container_status.py b/kubernetes/client/models/v1_container_status.py index 3e6654b386..80919ea980 100644 --- a/kubernetes/client/models/v1_container_status.py +++ b/kubernetes/client/models/v1_container_status.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -33,7 +36,8 @@ class V1ContainerStatus(object): and the value is json key in definition. """ openapi_types = { - 'allocated_resources': 'dict(str, str)', + 'allocated_resources': 'dict[str, str]', + 'allocated_resources_status': 'list[V1ResourceStatus]', 'container_id': 'str', 'image': 'str', 'image_id': 'str', @@ -44,11 +48,14 @@ class V1ContainerStatus(object): 'restart_count': 'int', 'started': 'bool', 'state': 'V1ContainerState', + 'stop_signal': 'str', + 'user': 'V1ContainerUser', 'volume_mounts': 'list[V1VolumeMountStatus]' } attribute_map = { 'allocated_resources': 'allocatedResources', + 'allocated_resources_status': 'allocatedResourcesStatus', 'container_id': 'containerID', 'image': 'image', 'image_id': 'imageID', @@ -59,16 +66,19 @@ class V1ContainerStatus(object): 'restart_count': 'restartCount', 'started': 'started', 'state': 'state', + 'stop_signal': 'stopSignal', + 'user': 'user', 'volume_mounts': 'volumeMounts' } - def __init__(self, allocated_resources=None, container_id=None, image=None, image_id=None, last_state=None, name=None, ready=None, resources=None, restart_count=None, started=None, state=None, volume_mounts=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, allocated_resources=None, allocated_resources_status=None, container_id=None, image=None, image_id=None, last_state=None, name=None, ready=None, resources=None, restart_count=None, started=None, state=None, stop_signal=None, user=None, volume_mounts=None, local_vars_configuration=None): # noqa: E501 """V1ContainerStatus - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._allocated_resources = None + self._allocated_resources_status = None self._container_id = None self._image = None self._image_id = None @@ -79,11 +89,15 @@ def __init__(self, allocated_resources=None, container_id=None, image=None, imag self._restart_count = None self._started = None self._state = None + self._stop_signal = None + self._user = None self._volume_mounts = None self.discriminator = None if allocated_resources is not None: self.allocated_resources = allocated_resources + if allocated_resources_status is not None: + self.allocated_resources_status = allocated_resources_status if container_id is not None: self.container_id = container_id self.image = image @@ -99,6 +113,10 @@ def __init__(self, allocated_resources=None, container_id=None, image=None, imag self.started = started if state is not None: self.state = state + if stop_signal is not None: + self.stop_signal = stop_signal + if user is not None: + self.user = user if volume_mounts is not None: self.volume_mounts = volume_mounts @@ -109,7 +127,7 @@ def allocated_resources(self): AllocatedResources represents the compute resources allocated for this container by the node. Kubelet sets this value to Container.Resources.Requests upon successful pod admission and after successfully admitting desired pod resize. # noqa: E501 :return: The allocated_resources of this V1ContainerStatus. # noqa: E501 - :rtype: dict(str, str) + :rtype: dict[str, str] """ return self._allocated_resources @@ -120,11 +138,34 @@ def allocated_resources(self, allocated_resources): AllocatedResources represents the compute resources allocated for this container by the node. Kubelet sets this value to Container.Resources.Requests upon successful pod admission and after successfully admitting desired pod resize. # noqa: E501 :param allocated_resources: The allocated_resources of this V1ContainerStatus. # noqa: E501 - :type: dict(str, str) + :type allocated_resources: dict[str, str] """ self._allocated_resources = allocated_resources + @property + def allocated_resources_status(self): + """Gets the allocated_resources_status of this V1ContainerStatus. # noqa: E501 + + AllocatedResourcesStatus represents the status of various resources allocated for this Pod. # noqa: E501 + + :return: The allocated_resources_status of this V1ContainerStatus. # noqa: E501 + :rtype: list[V1ResourceStatus] + """ + return self._allocated_resources_status + + @allocated_resources_status.setter + def allocated_resources_status(self, allocated_resources_status): + """Sets the allocated_resources_status of this V1ContainerStatus. + + AllocatedResourcesStatus represents the status of various resources allocated for this Pod. # noqa: E501 + + :param allocated_resources_status: The allocated_resources_status of this V1ContainerStatus. # noqa: E501 + :type allocated_resources_status: list[V1ResourceStatus] + """ + + self._allocated_resources_status = allocated_resources_status + @property def container_id(self): """Gets the container_id of this V1ContainerStatus. # noqa: E501 @@ -143,7 +184,7 @@ def container_id(self, container_id): ContainerID is the ID of the container in the format '://'. Where type is a container runtime identifier, returned from Version call of CRI API (for example \"containerd\"). # noqa: E501 :param container_id: The container_id of this V1ContainerStatus. # noqa: E501 - :type: str + :type container_id: str """ self._container_id = container_id @@ -166,7 +207,7 @@ def image(self, image): Image is the name of container image that the container is running. The container image may not match the image used in the PodSpec, as it may have been resolved by the runtime. More info: https://kubernetes.io/docs/concepts/containers/images. # noqa: E501 :param image: The image of this V1ContainerStatus. # noqa: E501 - :type: str + :type image: str """ if self.local_vars_configuration.client_side_validation and image is None: # noqa: E501 raise ValueError("Invalid value for `image`, must not be `None`") # noqa: E501 @@ -191,7 +232,7 @@ def image_id(self, image_id): ImageID is the image ID of the container's image. The image ID may not match the image ID of the image used in the PodSpec, as it may have been resolved by the runtime. # noqa: E501 :param image_id: The image_id of this V1ContainerStatus. # noqa: E501 - :type: str + :type image_id: str """ if self.local_vars_configuration.client_side_validation and image_id is None: # noqa: E501 raise ValueError("Invalid value for `image_id`, must not be `None`") # noqa: E501 @@ -214,7 +255,7 @@ def last_state(self, last_state): :param last_state: The last_state of this V1ContainerStatus. # noqa: E501 - :type: V1ContainerState + :type last_state: V1ContainerState """ self._last_state = last_state @@ -237,7 +278,7 @@ def name(self, name): Name is a DNS_LABEL representing the unique name of the container. Each container in a pod must have a unique name across all container types. Cannot be updated. # noqa: E501 :param name: The name of this V1ContainerStatus. # noqa: E501 - :type: str + :type name: str """ if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 @@ -262,7 +303,7 @@ def ready(self, ready): Ready specifies whether the container is currently passing its readiness check. The value will change as readiness probes keep executing. If no readiness probes are specified, this field defaults to true once the container is fully started (see Started field). The value is typically used to determine whether a container is ready to accept traffic. # noqa: E501 :param ready: The ready of this V1ContainerStatus. # noqa: E501 - :type: bool + :type ready: bool """ if self.local_vars_configuration.client_side_validation and ready is None: # noqa: E501 raise ValueError("Invalid value for `ready`, must not be `None`") # noqa: E501 @@ -285,7 +326,7 @@ def resources(self, resources): :param resources: The resources of this V1ContainerStatus. # noqa: E501 - :type: V1ResourceRequirements + :type resources: V1ResourceRequirements """ self._resources = resources @@ -308,7 +349,7 @@ def restart_count(self, restart_count): RestartCount holds the number of times the container has been restarted. Kubelet makes an effort to always increment the value, but there are cases when the state may be lost due to node restarts and then the value may be reset to 0. The value is never negative. # noqa: E501 :param restart_count: The restart_count of this V1ContainerStatus. # noqa: E501 - :type: int + :type restart_count: int """ if self.local_vars_configuration.client_side_validation and restart_count is None: # noqa: E501 raise ValueError("Invalid value for `restart_count`, must not be `None`") # noqa: E501 @@ -333,7 +374,7 @@ def started(self, started): Started indicates whether the container has finished its postStart lifecycle hook and passed its startup probe. Initialized as false, becomes true after startupProbe is considered successful. Resets to false when the container is restarted, or if kubelet loses state temporarily. In both cases, startup probes will run again. Is always true when no startupProbe is defined and container is running and has passed the postStart lifecycle hook. The null value must be treated the same as false. # noqa: E501 :param started: The started of this V1ContainerStatus. # noqa: E501 - :type: bool + :type started: bool """ self._started = started @@ -354,11 +395,55 @@ def state(self, state): :param state: The state of this V1ContainerStatus. # noqa: E501 - :type: V1ContainerState + :type state: V1ContainerState """ self._state = state + @property + def stop_signal(self): + """Gets the stop_signal of this V1ContainerStatus. # noqa: E501 + + StopSignal reports the effective stop signal for this container # noqa: E501 + + :return: The stop_signal of this V1ContainerStatus. # noqa: E501 + :rtype: str + """ + return self._stop_signal + + @stop_signal.setter + def stop_signal(self, stop_signal): + """Sets the stop_signal of this V1ContainerStatus. + + StopSignal reports the effective stop signal for this container # noqa: E501 + + :param stop_signal: The stop_signal of this V1ContainerStatus. # noqa: E501 + :type stop_signal: str + """ + + self._stop_signal = stop_signal + + @property + def user(self): + """Gets the user of this V1ContainerStatus. # noqa: E501 + + + :return: The user of this V1ContainerStatus. # noqa: E501 + :rtype: V1ContainerUser + """ + return self._user + + @user.setter + def user(self, user): + """Sets the user of this V1ContainerStatus. + + + :param user: The user of this V1ContainerStatus. # noqa: E501 + :type user: V1ContainerUser + """ + + self._user = user + @property def volume_mounts(self): """Gets the volume_mounts of this V1ContainerStatus. # noqa: E501 @@ -377,32 +462,40 @@ def volume_mounts(self, volume_mounts): Status of volume mounts. # noqa: E501 :param volume_mounts: The volume_mounts of this V1ContainerStatus. # noqa: E501 - :type: list[V1VolumeMountStatus] + :type volume_mounts: list[V1VolumeMountStatus] """ self._volume_mounts = volume_mounts - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_container_user.py b/kubernetes/client/models/v1_container_user.py new file mode 100644 index 0000000000..91d5237cb8 --- /dev/null +++ b/kubernetes/client/models/v1_container_user.py @@ -0,0 +1,131 @@ +# coding: utf-8 + +""" + Kubernetes + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: release-1.35 + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from kubernetes.client.configuration import Configuration + + +class V1ContainerUser(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'linux': 'V1LinuxContainerUser' + } + + attribute_map = { + 'linux': 'linux' + } + + def __init__(self, linux=None, local_vars_configuration=None): # noqa: E501 + """V1ContainerUser - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._linux = None + self.discriminator = None + + if linux is not None: + self.linux = linux + + @property + def linux(self): + """Gets the linux of this V1ContainerUser. # noqa: E501 + + + :return: The linux of this V1ContainerUser. # noqa: E501 + :rtype: V1LinuxContainerUser + """ + return self._linux + + @linux.setter + def linux(self, linux): + """Sets the linux of this V1ContainerUser. + + + :param linux: The linux of this V1ContainerUser. # noqa: E501 + :type linux: V1LinuxContainerUser + """ + + self._linux = linux + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1ContainerUser): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1ContainerUser): + return True + + return self.to_dict() != other.to_dict() diff --git a/kubernetes/client/models/v1_controller_revision.py b/kubernetes/client/models/v1_controller_revision.py index f3e4376d2a..96f76cc4b6 100644 --- a/kubernetes/client/models/v1_controller_revision.py +++ b/kubernetes/client/models/v1_controller_revision.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -51,7 +54,7 @@ class V1ControllerRevision(object): def __init__(self, api_version=None, data=None, kind=None, metadata=None, revision=None, local_vars_configuration=None): # noqa: E501 """V1ControllerRevision - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._api_version = None @@ -89,7 +92,7 @@ def api_version(self, api_version): APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501 :param api_version: The api_version of this V1ControllerRevision. # noqa: E501 - :type: str + :type api_version: str """ self._api_version = api_version @@ -112,7 +115,7 @@ def data(self, data): Data is the serialized representation of the state. # noqa: E501 :param data: The data of this V1ControllerRevision. # noqa: E501 - :type: object + :type data: object """ self._data = data @@ -135,7 +138,7 @@ def kind(self, kind): Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501 :param kind: The kind of this V1ControllerRevision. # noqa: E501 - :type: str + :type kind: str """ self._kind = kind @@ -156,7 +159,7 @@ def metadata(self, metadata): :param metadata: The metadata of this V1ControllerRevision. # noqa: E501 - :type: V1ObjectMeta + :type metadata: V1ObjectMeta """ self._metadata = metadata @@ -179,34 +182,42 @@ def revision(self, revision): Revision indicates the revision of the state represented by Data. # noqa: E501 :param revision: The revision of this V1ControllerRevision. # noqa: E501 - :type: int + :type revision: int """ if self.local_vars_configuration.client_side_validation and revision is None: # noqa: E501 raise ValueError("Invalid value for `revision`, must not be `None`") # noqa: E501 self._revision = revision - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_controller_revision_list.py b/kubernetes/client/models/v1_controller_revision_list.py index d7b79cafaa..4ec388e5e6 100644 --- a/kubernetes/client/models/v1_controller_revision_list.py +++ b/kubernetes/client/models/v1_controller_revision_list.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -49,7 +52,7 @@ class V1ControllerRevisionList(object): def __init__(self, api_version=None, items=None, kind=None, metadata=None, local_vars_configuration=None): # noqa: E501 """V1ControllerRevisionList - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._api_version = None @@ -84,7 +87,7 @@ def api_version(self, api_version): APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501 :param api_version: The api_version of this V1ControllerRevisionList. # noqa: E501 - :type: str + :type api_version: str """ self._api_version = api_version @@ -107,7 +110,7 @@ def items(self, items): Items is the list of ControllerRevisions # noqa: E501 :param items: The items of this V1ControllerRevisionList. # noqa: E501 - :type: list[V1ControllerRevision] + :type items: list[V1ControllerRevision] """ if self.local_vars_configuration.client_side_validation and items is None: # noqa: E501 raise ValueError("Invalid value for `items`, must not be `None`") # noqa: E501 @@ -132,7 +135,7 @@ def kind(self, kind): Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501 :param kind: The kind of this V1ControllerRevisionList. # noqa: E501 - :type: str + :type kind: str """ self._kind = kind @@ -153,32 +156,40 @@ def metadata(self, metadata): :param metadata: The metadata of this V1ControllerRevisionList. # noqa: E501 - :type: V1ListMeta + :type metadata: V1ListMeta """ self._metadata = metadata - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_counter.py b/kubernetes/client/models/v1_counter.py new file mode 100644 index 0000000000..660bb418b6 --- /dev/null +++ b/kubernetes/client/models/v1_counter.py @@ -0,0 +1,134 @@ +# coding: utf-8 + +""" + Kubernetes + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: release-1.35 + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from kubernetes.client.configuration import Configuration + + +class V1Counter(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'value': 'str' + } + + attribute_map = { + 'value': 'value' + } + + def __init__(self, value=None, local_vars_configuration=None): # noqa: E501 + """V1Counter - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._value = None + self.discriminator = None + + self.value = value + + @property + def value(self): + """Gets the value of this V1Counter. # noqa: E501 + + Value defines how much of a certain device counter is available. # noqa: E501 + + :return: The value of this V1Counter. # noqa: E501 + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """Sets the value of this V1Counter. + + Value defines how much of a certain device counter is available. # noqa: E501 + + :param value: The value of this V1Counter. # noqa: E501 + :type value: str + """ + if self.local_vars_configuration.client_side_validation and value is None: # noqa: E501 + raise ValueError("Invalid value for `value`, must not be `None`") # noqa: E501 + + self._value = value + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1Counter): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1Counter): + return True + + return self.to_dict() != other.to_dict() diff --git a/kubernetes/client/models/v1_counter_set.py b/kubernetes/client/models/v1_counter_set.py new file mode 100644 index 0000000000..dbcc7abc5f --- /dev/null +++ b/kubernetes/client/models/v1_counter_set.py @@ -0,0 +1,163 @@ +# coding: utf-8 + +""" + Kubernetes + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: release-1.35 + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from kubernetes.client.configuration import Configuration + + +class V1CounterSet(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'counters': 'dict[str, V1Counter]', + 'name': 'str' + } + + attribute_map = { + 'counters': 'counters', + 'name': 'name' + } + + def __init__(self, counters=None, name=None, local_vars_configuration=None): # noqa: E501 + """V1CounterSet - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._counters = None + self._name = None + self.discriminator = None + + self.counters = counters + self.name = name + + @property + def counters(self): + """Gets the counters of this V1CounterSet. # noqa: E501 + + Counters defines the set of counters for this CounterSet The name of each counter must be unique in that set and must be a DNS label. The maximum number of counters is 32. # noqa: E501 + + :return: The counters of this V1CounterSet. # noqa: E501 + :rtype: dict[str, V1Counter] + """ + return self._counters + + @counters.setter + def counters(self, counters): + """Sets the counters of this V1CounterSet. + + Counters defines the set of counters for this CounterSet The name of each counter must be unique in that set and must be a DNS label. The maximum number of counters is 32. # noqa: E501 + + :param counters: The counters of this V1CounterSet. # noqa: E501 + :type counters: dict[str, V1Counter] + """ + if self.local_vars_configuration.client_side_validation and counters is None: # noqa: E501 + raise ValueError("Invalid value for `counters`, must not be `None`") # noqa: E501 + + self._counters = counters + + @property + def name(self): + """Gets the name of this V1CounterSet. # noqa: E501 + + Name defines the name of the counter set. It must be a DNS label. # noqa: E501 + + :return: The name of this V1CounterSet. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this V1CounterSet. + + Name defines the name of the counter set. It must be a DNS label. # noqa: E501 + + :param name: The name of this V1CounterSet. # noqa: E501 + :type name: str + """ + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1CounterSet): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1CounterSet): + return True + + return self.to_dict() != other.to_dict() diff --git a/kubernetes/client/models/v1_cron_job.py b/kubernetes/client/models/v1_cron_job.py index 36ae161398..e2207a4d02 100644 --- a/kubernetes/client/models/v1_cron_job.py +++ b/kubernetes/client/models/v1_cron_job.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -51,7 +54,7 @@ class V1CronJob(object): def __init__(self, api_version=None, kind=None, metadata=None, spec=None, status=None, local_vars_configuration=None): # noqa: E501 """V1CronJob - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._api_version = None @@ -90,7 +93,7 @@ def api_version(self, api_version): APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501 :param api_version: The api_version of this V1CronJob. # noqa: E501 - :type: str + :type api_version: str """ self._api_version = api_version @@ -113,7 +116,7 @@ def kind(self, kind): Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501 :param kind: The kind of this V1CronJob. # noqa: E501 - :type: str + :type kind: str """ self._kind = kind @@ -134,7 +137,7 @@ def metadata(self, metadata): :param metadata: The metadata of this V1CronJob. # noqa: E501 - :type: V1ObjectMeta + :type metadata: V1ObjectMeta """ self._metadata = metadata @@ -155,7 +158,7 @@ def spec(self, spec): :param spec: The spec of this V1CronJob. # noqa: E501 - :type: V1CronJobSpec + :type spec: V1CronJobSpec """ self._spec = spec @@ -176,32 +179,40 @@ def status(self, status): :param status: The status of this V1CronJob. # noqa: E501 - :type: V1CronJobStatus + :type status: V1CronJobStatus """ self._status = status - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_cron_job_list.py b/kubernetes/client/models/v1_cron_job_list.py index f378b159d3..b51bc2138f 100644 --- a/kubernetes/client/models/v1_cron_job_list.py +++ b/kubernetes/client/models/v1_cron_job_list.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -49,7 +52,7 @@ class V1CronJobList(object): def __init__(self, api_version=None, items=None, kind=None, metadata=None, local_vars_configuration=None): # noqa: E501 """V1CronJobList - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._api_version = None @@ -84,7 +87,7 @@ def api_version(self, api_version): APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501 :param api_version: The api_version of this V1CronJobList. # noqa: E501 - :type: str + :type api_version: str """ self._api_version = api_version @@ -107,7 +110,7 @@ def items(self, items): items is the list of CronJobs. # noqa: E501 :param items: The items of this V1CronJobList. # noqa: E501 - :type: list[V1CronJob] + :type items: list[V1CronJob] """ if self.local_vars_configuration.client_side_validation and items is None: # noqa: E501 raise ValueError("Invalid value for `items`, must not be `None`") # noqa: E501 @@ -132,7 +135,7 @@ def kind(self, kind): Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501 :param kind: The kind of this V1CronJobList. # noqa: E501 - :type: str + :type kind: str """ self._kind = kind @@ -153,32 +156,40 @@ def metadata(self, metadata): :param metadata: The metadata of this V1CronJobList. # noqa: E501 - :type: V1ListMeta + :type metadata: V1ListMeta """ self._metadata = metadata - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_cron_job_spec.py b/kubernetes/client/models/v1_cron_job_spec.py index 8060eeef0a..dd805c91cb 100644 --- a/kubernetes/client/models/v1_cron_job_spec.py +++ b/kubernetes/client/models/v1_cron_job_spec.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -57,7 +60,7 @@ class V1CronJobSpec(object): def __init__(self, concurrency_policy=None, failed_jobs_history_limit=None, job_template=None, schedule=None, starting_deadline_seconds=None, successful_jobs_history_limit=None, suspend=None, time_zone=None, local_vars_configuration=None): # noqa: E501 """V1CronJobSpec - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._concurrency_policy = None @@ -103,7 +106,7 @@ def concurrency_policy(self, concurrency_policy): Specifies how to treat concurrent executions of a Job. Valid values are: - \"Allow\" (default): allows CronJobs to run concurrently; - \"Forbid\": forbids concurrent runs, skipping next run if previous run hasn't finished yet; - \"Replace\": cancels currently running job and replaces it with a new one # noqa: E501 :param concurrency_policy: The concurrency_policy of this V1CronJobSpec. # noqa: E501 - :type: str + :type concurrency_policy: str """ self._concurrency_policy = concurrency_policy @@ -126,7 +129,7 @@ def failed_jobs_history_limit(self, failed_jobs_history_limit): The number of failed finished jobs to retain. Value must be non-negative integer. Defaults to 1. # noqa: E501 :param failed_jobs_history_limit: The failed_jobs_history_limit of this V1CronJobSpec. # noqa: E501 - :type: int + :type failed_jobs_history_limit: int """ self._failed_jobs_history_limit = failed_jobs_history_limit @@ -147,7 +150,7 @@ def job_template(self, job_template): :param job_template: The job_template of this V1CronJobSpec. # noqa: E501 - :type: V1JobTemplateSpec + :type job_template: V1JobTemplateSpec """ if self.local_vars_configuration.client_side_validation and job_template is None: # noqa: E501 raise ValueError("Invalid value for `job_template`, must not be `None`") # noqa: E501 @@ -172,7 +175,7 @@ def schedule(self, schedule): The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron. # noqa: E501 :param schedule: The schedule of this V1CronJobSpec. # noqa: E501 - :type: str + :type schedule: str """ if self.local_vars_configuration.client_side_validation and schedule is None: # noqa: E501 raise ValueError("Invalid value for `schedule`, must not be `None`") # noqa: E501 @@ -197,7 +200,7 @@ def starting_deadline_seconds(self, starting_deadline_seconds): Optional deadline in seconds for starting the job if it misses scheduled time for any reason. Missed jobs executions will be counted as failed ones. # noqa: E501 :param starting_deadline_seconds: The starting_deadline_seconds of this V1CronJobSpec. # noqa: E501 - :type: int + :type starting_deadline_seconds: int """ self._starting_deadline_seconds = starting_deadline_seconds @@ -220,7 +223,7 @@ def successful_jobs_history_limit(self, successful_jobs_history_limit): The number of successful finished jobs to retain. Value must be non-negative integer. Defaults to 3. # noqa: E501 :param successful_jobs_history_limit: The successful_jobs_history_limit of this V1CronJobSpec. # noqa: E501 - :type: int + :type successful_jobs_history_limit: int """ self._successful_jobs_history_limit = successful_jobs_history_limit @@ -243,7 +246,7 @@ def suspend(self, suspend): This flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false. # noqa: E501 :param suspend: The suspend of this V1CronJobSpec. # noqa: E501 - :type: bool + :type suspend: bool """ self._suspend = suspend @@ -266,32 +269,40 @@ def time_zone(self, time_zone): The time zone name for the given schedule, see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones. If not specified, this will default to the time zone of the kube-controller-manager process. The set of valid time zone names and the time zone offset is loaded from the system-wide time zone database by the API server during CronJob validation and the controller manager during execution. If no system-wide time zone database can be found a bundled version of the database is used instead. If the time zone name becomes invalid during the lifetime of a CronJob or due to a change in host configuration, the controller will stop creating new new Jobs and will create a system event with the reason UnknownTimeZone. More information can be found in https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/#time-zones # noqa: E501 :param time_zone: The time_zone of this V1CronJobSpec. # noqa: E501 - :type: str + :type time_zone: str """ self._time_zone = time_zone - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_cron_job_status.py b/kubernetes/client/models/v1_cron_job_status.py index 15679b2f55..c3dfebb2b7 100644 --- a/kubernetes/client/models/v1_cron_job_status.py +++ b/kubernetes/client/models/v1_cron_job_status.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -47,7 +50,7 @@ class V1CronJobStatus(object): def __init__(self, active=None, last_schedule_time=None, last_successful_time=None, local_vars_configuration=None): # noqa: E501 """V1CronJobStatus - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._active = None @@ -80,7 +83,7 @@ def active(self, active): A list of pointers to currently running jobs. # noqa: E501 :param active: The active of this V1CronJobStatus. # noqa: E501 - :type: list[V1ObjectReference] + :type active: list[V1ObjectReference] """ self._active = active @@ -103,7 +106,7 @@ def last_schedule_time(self, last_schedule_time): Information when was the last time the job was successfully scheduled. # noqa: E501 :param last_schedule_time: The last_schedule_time of this V1CronJobStatus. # noqa: E501 - :type: datetime + :type last_schedule_time: datetime """ self._last_schedule_time = last_schedule_time @@ -126,32 +129,40 @@ def last_successful_time(self, last_successful_time): Information when was the last time the job successfully completed. # noqa: E501 :param last_successful_time: The last_successful_time of this V1CronJobStatus. # noqa: E501 - :type: datetime + :type last_successful_time: datetime """ self._last_successful_time = last_successful_time - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_cross_version_object_reference.py b/kubernetes/client/models/v1_cross_version_object_reference.py index b0c8790b06..17bf542eee 100644 --- a/kubernetes/client/models/v1_cross_version_object_reference.py +++ b/kubernetes/client/models/v1_cross_version_object_reference.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -47,7 +50,7 @@ class V1CrossVersionObjectReference(object): def __init__(self, api_version=None, kind=None, name=None, local_vars_configuration=None): # noqa: E501 """V1CrossVersionObjectReference - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._api_version = None @@ -78,7 +81,7 @@ def api_version(self, api_version): apiVersion is the API version of the referent # noqa: E501 :param api_version: The api_version of this V1CrossVersionObjectReference. # noqa: E501 - :type: str + :type api_version: str """ self._api_version = api_version @@ -101,7 +104,7 @@ def kind(self, kind): kind is the kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501 :param kind: The kind of this V1CrossVersionObjectReference. # noqa: E501 - :type: str + :type kind: str """ if self.local_vars_configuration.client_side_validation and kind is None: # noqa: E501 raise ValueError("Invalid value for `kind`, must not be `None`") # noqa: E501 @@ -126,34 +129,42 @@ def name(self, name): name is the name of the referent; More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names # noqa: E501 :param name: The name of this V1CrossVersionObjectReference. # noqa: E501 - :type: str + :type name: str """ if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 self._name = name - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_csi_driver.py b/kubernetes/client/models/v1_csi_driver.py index 332db219d4..13d9933ba0 100644 --- a/kubernetes/client/models/v1_csi_driver.py +++ b/kubernetes/client/models/v1_csi_driver.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -49,7 +52,7 @@ class V1CSIDriver(object): def __init__(self, api_version=None, kind=None, metadata=None, spec=None, local_vars_configuration=None): # noqa: E501 """V1CSIDriver - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._api_version = None @@ -84,7 +87,7 @@ def api_version(self, api_version): APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501 :param api_version: The api_version of this V1CSIDriver. # noqa: E501 - :type: str + :type api_version: str """ self._api_version = api_version @@ -107,7 +110,7 @@ def kind(self, kind): Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501 :param kind: The kind of this V1CSIDriver. # noqa: E501 - :type: str + :type kind: str """ self._kind = kind @@ -128,7 +131,7 @@ def metadata(self, metadata): :param metadata: The metadata of this V1CSIDriver. # noqa: E501 - :type: V1ObjectMeta + :type metadata: V1ObjectMeta """ self._metadata = metadata @@ -149,34 +152,42 @@ def spec(self, spec): :param spec: The spec of this V1CSIDriver. # noqa: E501 - :type: V1CSIDriverSpec + :type spec: V1CSIDriverSpec """ if self.local_vars_configuration.client_side_validation and spec is None: # noqa: E501 raise ValueError("Invalid value for `spec`, must not be `None`") # noqa: E501 self._spec = spec - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_csi_driver_list.py b/kubernetes/client/models/v1_csi_driver_list.py index ac02518c86..21ba007f99 100644 --- a/kubernetes/client/models/v1_csi_driver_list.py +++ b/kubernetes/client/models/v1_csi_driver_list.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -49,7 +52,7 @@ class V1CSIDriverList(object): def __init__(self, api_version=None, items=None, kind=None, metadata=None, local_vars_configuration=None): # noqa: E501 """V1CSIDriverList - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._api_version = None @@ -84,7 +87,7 @@ def api_version(self, api_version): APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501 :param api_version: The api_version of this V1CSIDriverList. # noqa: E501 - :type: str + :type api_version: str """ self._api_version = api_version @@ -107,7 +110,7 @@ def items(self, items): items is the list of CSIDriver # noqa: E501 :param items: The items of this V1CSIDriverList. # noqa: E501 - :type: list[V1CSIDriver] + :type items: list[V1CSIDriver] """ if self.local_vars_configuration.client_side_validation and items is None: # noqa: E501 raise ValueError("Invalid value for `items`, must not be `None`") # noqa: E501 @@ -132,7 +135,7 @@ def kind(self, kind): Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501 :param kind: The kind of this V1CSIDriverList. # noqa: E501 - :type: str + :type kind: str """ self._kind = kind @@ -153,32 +156,40 @@ def metadata(self, metadata): :param metadata: The metadata of this V1CSIDriverList. # noqa: E501 - :type: V1ListMeta + :type metadata: V1ListMeta """ self._metadata = metadata - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_csi_driver_spec.py b/kubernetes/client/models/v1_csi_driver_spec.py index a82171f240..6a665be60a 100644 --- a/kubernetes/client/models/v1_csi_driver_spec.py +++ b/kubernetes/client/models/v1_csi_driver_spec.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -35,9 +38,11 @@ class V1CSIDriverSpec(object): openapi_types = { 'attach_required': 'bool', 'fs_group_policy': 'str', + 'node_allocatable_update_period_seconds': 'int', 'pod_info_on_mount': 'bool', 'requires_republish': 'bool', 'se_linux_mount': 'bool', + 'service_account_token_in_secrets': 'bool', 'storage_capacity': 'bool', 'token_requests': 'list[StorageV1TokenRequest]', 'volume_lifecycle_modes': 'list[str]' @@ -46,25 +51,29 @@ class V1CSIDriverSpec(object): attribute_map = { 'attach_required': 'attachRequired', 'fs_group_policy': 'fsGroupPolicy', + 'node_allocatable_update_period_seconds': 'nodeAllocatableUpdatePeriodSeconds', 'pod_info_on_mount': 'podInfoOnMount', 'requires_republish': 'requiresRepublish', 'se_linux_mount': 'seLinuxMount', + 'service_account_token_in_secrets': 'serviceAccountTokenInSecrets', 'storage_capacity': 'storageCapacity', 'token_requests': 'tokenRequests', 'volume_lifecycle_modes': 'volumeLifecycleModes' } - def __init__(self, attach_required=None, fs_group_policy=None, pod_info_on_mount=None, requires_republish=None, se_linux_mount=None, storage_capacity=None, token_requests=None, volume_lifecycle_modes=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, attach_required=None, fs_group_policy=None, node_allocatable_update_period_seconds=None, pod_info_on_mount=None, requires_republish=None, se_linux_mount=None, service_account_token_in_secrets=None, storage_capacity=None, token_requests=None, volume_lifecycle_modes=None, local_vars_configuration=None): # noqa: E501 """V1CSIDriverSpec - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._attach_required = None self._fs_group_policy = None + self._node_allocatable_update_period_seconds = None self._pod_info_on_mount = None self._requires_republish = None self._se_linux_mount = None + self._service_account_token_in_secrets = None self._storage_capacity = None self._token_requests = None self._volume_lifecycle_modes = None @@ -74,12 +83,16 @@ def __init__(self, attach_required=None, fs_group_policy=None, pod_info_on_mount self.attach_required = attach_required if fs_group_policy is not None: self.fs_group_policy = fs_group_policy + if node_allocatable_update_period_seconds is not None: + self.node_allocatable_update_period_seconds = node_allocatable_update_period_seconds if pod_info_on_mount is not None: self.pod_info_on_mount = pod_info_on_mount if requires_republish is not None: self.requires_republish = requires_republish if se_linux_mount is not None: self.se_linux_mount = se_linux_mount + if service_account_token_in_secrets is not None: + self.service_account_token_in_secrets = service_account_token_in_secrets if storage_capacity is not None: self.storage_capacity = storage_capacity if token_requests is not None: @@ -91,7 +104,7 @@ def __init__(self, attach_required=None, fs_group_policy=None, pod_info_on_mount def attach_required(self): """Gets the attach_required of this V1CSIDriverSpec. # noqa: E501 - attachRequired indicates this CSI volume driver requires an attach operation (because it implements the CSI ControllerPublishVolume() method), and that the Kubernetes attach detach controller should call the attach volume interface which checks the volumeattachment status and waits until the volume is attached before proceeding to mounting. The CSI external-attacher coordinates with CSI volume driver and updates the volumeattachment status when the attach operation is complete. If the CSIDriverRegistry feature gate is enabled and the value is specified to false, the attach operation will be skipped. Otherwise the attach operation will be called. This field is immutable. # noqa: E501 + attachRequired indicates this CSI volume driver requires an attach operation (because it implements the CSI ControllerPublishVolume() method), and that the Kubernetes attach detach controller should call the attach volume interface which checks the volumeattachment status and waits until the volume is attached before proceeding to mounting. The CSI external-attacher coordinates with CSI volume driver and updates the volumeattachment status when the attach operation is complete. If the value is specified to false, the attach operation will be skipped. Otherwise the attach operation will be called. This field is immutable. # noqa: E501 :return: The attach_required of this V1CSIDriverSpec. # noqa: E501 :rtype: bool @@ -102,10 +115,10 @@ def attach_required(self): def attach_required(self, attach_required): """Sets the attach_required of this V1CSIDriverSpec. - attachRequired indicates this CSI volume driver requires an attach operation (because it implements the CSI ControllerPublishVolume() method), and that the Kubernetes attach detach controller should call the attach volume interface which checks the volumeattachment status and waits until the volume is attached before proceeding to mounting. The CSI external-attacher coordinates with CSI volume driver and updates the volumeattachment status when the attach operation is complete. If the CSIDriverRegistry feature gate is enabled and the value is specified to false, the attach operation will be skipped. Otherwise the attach operation will be called. This field is immutable. # noqa: E501 + attachRequired indicates this CSI volume driver requires an attach operation (because it implements the CSI ControllerPublishVolume() method), and that the Kubernetes attach detach controller should call the attach volume interface which checks the volumeattachment status and waits until the volume is attached before proceeding to mounting. The CSI external-attacher coordinates with CSI volume driver and updates the volumeattachment status when the attach operation is complete. If the value is specified to false, the attach operation will be skipped. Otherwise the attach operation will be called. This field is immutable. # noqa: E501 :param attach_required: The attach_required of this V1CSIDriverSpec. # noqa: E501 - :type: bool + :type attach_required: bool """ self._attach_required = attach_required @@ -128,11 +141,34 @@ def fs_group_policy(self, fs_group_policy): fsGroupPolicy defines if the underlying volume supports changing ownership and permission of the volume before being mounted. Refer to the specific FSGroupPolicy values for additional details. This field was immutable in Kubernetes < 1.29 and now is mutable. Defaults to ReadWriteOnceWithFSType, which will examine each volume to determine if Kubernetes should modify ownership and permissions of the volume. With the default policy the defined fsGroup will only be applied if a fstype is defined and the volume's access mode contains ReadWriteOnce. # noqa: E501 :param fs_group_policy: The fs_group_policy of this V1CSIDriverSpec. # noqa: E501 - :type: str + :type fs_group_policy: str """ self._fs_group_policy = fs_group_policy + @property + def node_allocatable_update_period_seconds(self): + """Gets the node_allocatable_update_period_seconds of this V1CSIDriverSpec. # noqa: E501 + + nodeAllocatableUpdatePeriodSeconds specifies the interval between periodic updates of the CSINode allocatable capacity for this driver. When set, both periodic updates and updates triggered by capacity-related failures are enabled. If not set, no updates occur (neither periodic nor upon detecting capacity-related failures), and the allocatable.count remains static. The minimum allowed value for this field is 10 seconds. This is a beta feature and requires the MutableCSINodeAllocatableCount feature gate to be enabled. This field is mutable. # noqa: E501 + + :return: The node_allocatable_update_period_seconds of this V1CSIDriverSpec. # noqa: E501 + :rtype: int + """ + return self._node_allocatable_update_period_seconds + + @node_allocatable_update_period_seconds.setter + def node_allocatable_update_period_seconds(self, node_allocatable_update_period_seconds): + """Sets the node_allocatable_update_period_seconds of this V1CSIDriverSpec. + + nodeAllocatableUpdatePeriodSeconds specifies the interval between periodic updates of the CSINode allocatable capacity for this driver. When set, both periodic updates and updates triggered by capacity-related failures are enabled. If not set, no updates occur (neither periodic nor upon detecting capacity-related failures), and the allocatable.count remains static. The minimum allowed value for this field is 10 seconds. This is a beta feature and requires the MutableCSINodeAllocatableCount feature gate to be enabled. This field is mutable. # noqa: E501 + + :param node_allocatable_update_period_seconds: The node_allocatable_update_period_seconds of this V1CSIDriverSpec. # noqa: E501 + :type node_allocatable_update_period_seconds: int + """ + + self._node_allocatable_update_period_seconds = node_allocatable_update_period_seconds + @property def pod_info_on_mount(self): """Gets the pod_info_on_mount of this V1CSIDriverSpec. # noqa: E501 @@ -151,7 +187,7 @@ def pod_info_on_mount(self, pod_info_on_mount): podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations, if set to true. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeContext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. \"csi.storage.k8s.io/pod.name\": pod.Name \"csi.storage.k8s.io/pod.namespace\": pod.Namespace \"csi.storage.k8s.io/pod.uid\": string(pod.UID) \"csi.storage.k8s.io/ephemeral\": \"true\" if the volume is an ephemeral inline volume defined by a CSIVolumeSource, otherwise \"false\" \"csi.storage.k8s.io/ephemeral\" is a new feature in Kubernetes 1.16. It is only required for drivers which support both the \"Persistent\" and \"Ephemeral\" VolumeLifecycleMode. Other drivers can leave pod info disabled and/or ignore this field. As Kubernetes 1.15 doesn't support this field, drivers can only support one mode when deployed on such a cluster and the deployment determines which mode that is, for example via a command line parameter of the driver. This field was immutable in Kubernetes < 1.29 and now is mutable. # noqa: E501 :param pod_info_on_mount: The pod_info_on_mount of this V1CSIDriverSpec. # noqa: E501 - :type: bool + :type pod_info_on_mount: bool """ self._pod_info_on_mount = pod_info_on_mount @@ -174,7 +210,7 @@ def requires_republish(self, requires_republish): requiresRepublish indicates the CSI driver wants `NodePublishVolume` being periodically called to reflect any possible change in the mounted volume. This field defaults to false. Note: After a successful initial NodePublishVolume call, subsequent calls to NodePublishVolume should only update the contents of the volume. New mount points will not be seen by a running container. # noqa: E501 :param requires_republish: The requires_republish of this V1CSIDriverSpec. # noqa: E501 - :type: bool + :type requires_republish: bool """ self._requires_republish = requires_republish @@ -197,11 +233,34 @@ def se_linux_mount(self, se_linux_mount): seLinuxMount specifies if the CSI driver supports \"-o context\" mount option. When \"true\", the CSI driver must ensure that all volumes provided by this CSI driver can be mounted separately with different `-o context` options. This is typical for storage backends that provide volumes as filesystems on block devices or as independent shared volumes. Kubernetes will call NodeStage / NodePublish with \"-o context=xyz\" mount option when mounting a ReadWriteOncePod volume used in Pod that has explicitly set SELinux context. In the future, it may be expanded to other volume AccessModes. In any case, Kubernetes will ensure that the volume is mounted only with a single SELinux context. When \"false\", Kubernetes won't pass any special SELinux mount options to the driver. This is typical for volumes that represent subdirectories of a bigger shared filesystem. Default is \"false\". # noqa: E501 :param se_linux_mount: The se_linux_mount of this V1CSIDriverSpec. # noqa: E501 - :type: bool + :type se_linux_mount: bool """ self._se_linux_mount = se_linux_mount + @property + def service_account_token_in_secrets(self): + """Gets the service_account_token_in_secrets of this V1CSIDriverSpec. # noqa: E501 + + serviceAccountTokenInSecrets is an opt-in for CSI drivers to indicate that service account tokens should be passed via the Secrets field in NodePublishVolumeRequest instead of the VolumeContext field. The CSI specification provides a dedicated Secrets field for sensitive information like tokens, which is the appropriate mechanism for handling credentials. This addresses security concerns where sensitive tokens were being logged as part of volume context. When \"true\", kubelet will pass the tokens only in the Secrets field with the key \"csi.storage.k8s.io/serviceAccount.tokens\". The CSI driver must be updated to read tokens from the Secrets field instead of VolumeContext. When \"false\" or not set, kubelet will pass the tokens in VolumeContext with the key \"csi.storage.k8s.io/serviceAccount.tokens\" (existing behavior). This maintains backward compatibility with existing CSI drivers. This field can only be set when TokenRequests is configured. The API server will reject CSIDriver specs that set this field without TokenRequests. Default behavior if unset is to pass tokens in the VolumeContext field. # noqa: E501 + + :return: The service_account_token_in_secrets of this V1CSIDriverSpec. # noqa: E501 + :rtype: bool + """ + return self._service_account_token_in_secrets + + @service_account_token_in_secrets.setter + def service_account_token_in_secrets(self, service_account_token_in_secrets): + """Sets the service_account_token_in_secrets of this V1CSIDriverSpec. + + serviceAccountTokenInSecrets is an opt-in for CSI drivers to indicate that service account tokens should be passed via the Secrets field in NodePublishVolumeRequest instead of the VolumeContext field. The CSI specification provides a dedicated Secrets field for sensitive information like tokens, which is the appropriate mechanism for handling credentials. This addresses security concerns where sensitive tokens were being logged as part of volume context. When \"true\", kubelet will pass the tokens only in the Secrets field with the key \"csi.storage.k8s.io/serviceAccount.tokens\". The CSI driver must be updated to read tokens from the Secrets field instead of VolumeContext. When \"false\" or not set, kubelet will pass the tokens in VolumeContext with the key \"csi.storage.k8s.io/serviceAccount.tokens\" (existing behavior). This maintains backward compatibility with existing CSI drivers. This field can only be set when TokenRequests is configured. The API server will reject CSIDriver specs that set this field without TokenRequests. Default behavior if unset is to pass tokens in the VolumeContext field. # noqa: E501 + + :param service_account_token_in_secrets: The service_account_token_in_secrets of this V1CSIDriverSpec. # noqa: E501 + :type service_account_token_in_secrets: bool + """ + + self._service_account_token_in_secrets = service_account_token_in_secrets + @property def storage_capacity(self): """Gets the storage_capacity of this V1CSIDriverSpec. # noqa: E501 @@ -220,7 +279,7 @@ def storage_capacity(self, storage_capacity): storageCapacity indicates that the CSI volume driver wants pod scheduling to consider the storage capacity that the driver deployment will report by creating CSIStorageCapacity objects with capacity information, if set to true. The check can be enabled immediately when deploying a driver. In that case, provisioning new volumes with late binding will pause until the driver deployment has published some suitable CSIStorageCapacity object. Alternatively, the driver can be deployed with the field unset or false and it can be flipped later when storage capacity information has been published. This field was immutable in Kubernetes <= 1.22 and now is mutable. # noqa: E501 :param storage_capacity: The storage_capacity of this V1CSIDriverSpec. # noqa: E501 - :type: bool + :type storage_capacity: bool """ self._storage_capacity = storage_capacity @@ -243,7 +302,7 @@ def token_requests(self, token_requests): tokenRequests indicates the CSI driver needs pods' service account tokens it is mounting volume for to do necessary authentication. Kubelet will pass the tokens in VolumeContext in the CSI NodePublishVolume calls. The CSI driver should parse and validate the following VolumeContext: \"csi.storage.k8s.io/serviceAccount.tokens\": { \"\": { \"token\": , \"expirationTimestamp\": , }, ... } Note: Audience in each TokenRequest should be different and at most one token is empty string. To receive a new token after expiry, RequiresRepublish can be used to trigger NodePublishVolume periodically. # noqa: E501 :param token_requests: The token_requests of this V1CSIDriverSpec. # noqa: E501 - :type: list[StorageV1TokenRequest] + :type token_requests: list[StorageV1TokenRequest] """ self._token_requests = token_requests @@ -266,32 +325,40 @@ def volume_lifecycle_modes(self, volume_lifecycle_modes): volumeLifecycleModes defines what kind of volumes this CSI volume driver supports. The default if the list is empty is \"Persistent\", which is the usage defined by the CSI specification and implemented in Kubernetes via the usual PV/PVC mechanism. The other mode is \"Ephemeral\". In this mode, volumes are defined inline inside the pod spec with CSIVolumeSource and their lifecycle is tied to the lifecycle of that pod. A driver has to be aware of this because it is only going to get a NodePublishVolume call for such a volume. For more information about implementing this mode, see https://kubernetes-csi.github.io/docs/ephemeral-local-volumes.html A driver can support one or more of these modes and more modes may be added in the future. This field is beta. This field is immutable. # noqa: E501 :param volume_lifecycle_modes: The volume_lifecycle_modes of this V1CSIDriverSpec. # noqa: E501 - :type: list[str] + :type volume_lifecycle_modes: list[str] """ self._volume_lifecycle_modes = volume_lifecycle_modes - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_csi_node.py b/kubernetes/client/models/v1_csi_node.py index 402c8a82ae..be86b2ebb3 100644 --- a/kubernetes/client/models/v1_csi_node.py +++ b/kubernetes/client/models/v1_csi_node.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -49,7 +52,7 @@ class V1CSINode(object): def __init__(self, api_version=None, kind=None, metadata=None, spec=None, local_vars_configuration=None): # noqa: E501 """V1CSINode - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._api_version = None @@ -84,7 +87,7 @@ def api_version(self, api_version): APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501 :param api_version: The api_version of this V1CSINode. # noqa: E501 - :type: str + :type api_version: str """ self._api_version = api_version @@ -107,7 +110,7 @@ def kind(self, kind): Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501 :param kind: The kind of this V1CSINode. # noqa: E501 - :type: str + :type kind: str """ self._kind = kind @@ -128,7 +131,7 @@ def metadata(self, metadata): :param metadata: The metadata of this V1CSINode. # noqa: E501 - :type: V1ObjectMeta + :type metadata: V1ObjectMeta """ self._metadata = metadata @@ -149,34 +152,42 @@ def spec(self, spec): :param spec: The spec of this V1CSINode. # noqa: E501 - :type: V1CSINodeSpec + :type spec: V1CSINodeSpec """ if self.local_vars_configuration.client_side_validation and spec is None: # noqa: E501 raise ValueError("Invalid value for `spec`, must not be `None`") # noqa: E501 self._spec = spec - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_csi_node_driver.py b/kubernetes/client/models/v1_csi_node_driver.py index 8feee6badd..098df4dc5b 100644 --- a/kubernetes/client/models/v1_csi_node_driver.py +++ b/kubernetes/client/models/v1_csi_node_driver.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -49,7 +52,7 @@ class V1CSINodeDriver(object): def __init__(self, allocatable=None, name=None, node_id=None, topology_keys=None, local_vars_configuration=None): # noqa: E501 """V1CSINodeDriver - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._allocatable = None @@ -81,7 +84,7 @@ def allocatable(self, allocatable): :param allocatable: The allocatable of this V1CSINodeDriver. # noqa: E501 - :type: V1VolumeNodeResources + :type allocatable: V1VolumeNodeResources """ self._allocatable = allocatable @@ -104,7 +107,7 @@ def name(self, name): name represents the name of the CSI driver that this object refers to. This MUST be the same name returned by the CSI GetPluginName() call for that driver. # noqa: E501 :param name: The name of this V1CSINodeDriver. # noqa: E501 - :type: str + :type name: str """ if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 @@ -129,7 +132,7 @@ def node_id(self, node_id): nodeID of the node from the driver point of view. This field enables Kubernetes to communicate with storage systems that do not share the same nomenclature for nodes. For example, Kubernetes may refer to a given node as \"node1\", but the storage system may refer to the same node as \"nodeA\". When Kubernetes issues a command to the storage system to attach a volume to a specific node, it can use this field to refer to the node name using the ID that the storage system will understand, e.g. \"nodeA\" instead of \"node1\". This field is required. # noqa: E501 :param node_id: The node_id of this V1CSINodeDriver. # noqa: E501 - :type: str + :type node_id: str """ if self.local_vars_configuration.client_side_validation and node_id is None: # noqa: E501 raise ValueError("Invalid value for `node_id`, must not be `None`") # noqa: E501 @@ -154,32 +157,40 @@ def topology_keys(self, topology_keys): topologyKeys is the list of keys supported by the driver. When a driver is initialized on a cluster, it provides a set of topology keys that it understands (e.g. \"company.com/zone\", \"company.com/region\"). When a driver is initialized on a node, it provides the same topology keys along with values. Kubelet will expose these topology keys as labels on its own node object. When Kubernetes does topology aware provisioning, it can use this list to determine which labels it should retrieve from the node object and pass back to the driver. It is possible for different nodes to use different topology keys. This can be empty if driver does not support topology. # noqa: E501 :param topology_keys: The topology_keys of this V1CSINodeDriver. # noqa: E501 - :type: list[str] + :type topology_keys: list[str] """ self._topology_keys = topology_keys - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_csi_node_list.py b/kubernetes/client/models/v1_csi_node_list.py index 3e3bb6f6d9..b3a4727dcf 100644 --- a/kubernetes/client/models/v1_csi_node_list.py +++ b/kubernetes/client/models/v1_csi_node_list.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -49,7 +52,7 @@ class V1CSINodeList(object): def __init__(self, api_version=None, items=None, kind=None, metadata=None, local_vars_configuration=None): # noqa: E501 """V1CSINodeList - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._api_version = None @@ -84,7 +87,7 @@ def api_version(self, api_version): APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501 :param api_version: The api_version of this V1CSINodeList. # noqa: E501 - :type: str + :type api_version: str """ self._api_version = api_version @@ -107,7 +110,7 @@ def items(self, items): items is the list of CSINode # noqa: E501 :param items: The items of this V1CSINodeList. # noqa: E501 - :type: list[V1CSINode] + :type items: list[V1CSINode] """ if self.local_vars_configuration.client_side_validation and items is None: # noqa: E501 raise ValueError("Invalid value for `items`, must not be `None`") # noqa: E501 @@ -132,7 +135,7 @@ def kind(self, kind): Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501 :param kind: The kind of this V1CSINodeList. # noqa: E501 - :type: str + :type kind: str """ self._kind = kind @@ -153,32 +156,40 @@ def metadata(self, metadata): :param metadata: The metadata of this V1CSINodeList. # noqa: E501 - :type: V1ListMeta + :type metadata: V1ListMeta """ self._metadata = metadata - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_csi_node_spec.py b/kubernetes/client/models/v1_csi_node_spec.py index 84cb84ffae..9f7a895011 100644 --- a/kubernetes/client/models/v1_csi_node_spec.py +++ b/kubernetes/client/models/v1_csi_node_spec.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -43,7 +46,7 @@ class V1CSINodeSpec(object): def __init__(self, drivers=None, local_vars_configuration=None): # noqa: E501 """V1CSINodeSpec - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._drivers = None @@ -69,34 +72,42 @@ def drivers(self, drivers): drivers is a list of information of all CSI Drivers existing on a node. If all drivers in the list are uninstalled, this can become empty. # noqa: E501 :param drivers: The drivers of this V1CSINodeSpec. # noqa: E501 - :type: list[V1CSINodeDriver] + :type drivers: list[V1CSINodeDriver] """ if self.local_vars_configuration.client_side_validation and drivers is None: # noqa: E501 raise ValueError("Invalid value for `drivers`, must not be `None`") # noqa: E501 self._drivers = drivers - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_csi_persistent_volume_source.py b/kubernetes/client/models/v1_csi_persistent_volume_source.py index 0616410738..d8a549d498 100644 --- a/kubernetes/client/models/v1_csi_persistent_volume_source.py +++ b/kubernetes/client/models/v1_csi_persistent_volume_source.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -41,7 +44,7 @@ class V1CSIPersistentVolumeSource(object): 'node_publish_secret_ref': 'V1SecretReference', 'node_stage_secret_ref': 'V1SecretReference', 'read_only': 'bool', - 'volume_attributes': 'dict(str, str)', + 'volume_attributes': 'dict[str, str]', 'volume_handle': 'str' } @@ -61,7 +64,7 @@ class V1CSIPersistentVolumeSource(object): def __init__(self, controller_expand_secret_ref=None, controller_publish_secret_ref=None, driver=None, fs_type=None, node_expand_secret_ref=None, node_publish_secret_ref=None, node_stage_secret_ref=None, read_only=None, volume_attributes=None, volume_handle=None, local_vars_configuration=None): # noqa: E501 """V1CSIPersistentVolumeSource - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._controller_expand_secret_ref = None @@ -111,7 +114,7 @@ def controller_expand_secret_ref(self, controller_expand_secret_ref): :param controller_expand_secret_ref: The controller_expand_secret_ref of this V1CSIPersistentVolumeSource. # noqa: E501 - :type: V1SecretReference + :type controller_expand_secret_ref: V1SecretReference """ self._controller_expand_secret_ref = controller_expand_secret_ref @@ -132,7 +135,7 @@ def controller_publish_secret_ref(self, controller_publish_secret_ref): :param controller_publish_secret_ref: The controller_publish_secret_ref of this V1CSIPersistentVolumeSource. # noqa: E501 - :type: V1SecretReference + :type controller_publish_secret_ref: V1SecretReference """ self._controller_publish_secret_ref = controller_publish_secret_ref @@ -155,7 +158,7 @@ def driver(self, driver): driver is the name of the driver to use for this volume. Required. # noqa: E501 :param driver: The driver of this V1CSIPersistentVolumeSource. # noqa: E501 - :type: str + :type driver: str """ if self.local_vars_configuration.client_side_validation and driver is None: # noqa: E501 raise ValueError("Invalid value for `driver`, must not be `None`") # noqa: E501 @@ -180,7 +183,7 @@ def fs_type(self, fs_type): fsType to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". # noqa: E501 :param fs_type: The fs_type of this V1CSIPersistentVolumeSource. # noqa: E501 - :type: str + :type fs_type: str """ self._fs_type = fs_type @@ -201,7 +204,7 @@ def node_expand_secret_ref(self, node_expand_secret_ref): :param node_expand_secret_ref: The node_expand_secret_ref of this V1CSIPersistentVolumeSource. # noqa: E501 - :type: V1SecretReference + :type node_expand_secret_ref: V1SecretReference """ self._node_expand_secret_ref = node_expand_secret_ref @@ -222,7 +225,7 @@ def node_publish_secret_ref(self, node_publish_secret_ref): :param node_publish_secret_ref: The node_publish_secret_ref of this V1CSIPersistentVolumeSource. # noqa: E501 - :type: V1SecretReference + :type node_publish_secret_ref: V1SecretReference """ self._node_publish_secret_ref = node_publish_secret_ref @@ -243,7 +246,7 @@ def node_stage_secret_ref(self, node_stage_secret_ref): :param node_stage_secret_ref: The node_stage_secret_ref of this V1CSIPersistentVolumeSource. # noqa: E501 - :type: V1SecretReference + :type node_stage_secret_ref: V1SecretReference """ self._node_stage_secret_ref = node_stage_secret_ref @@ -266,7 +269,7 @@ def read_only(self, read_only): readOnly value to pass to ControllerPublishVolumeRequest. Defaults to false (read/write). # noqa: E501 :param read_only: The read_only of this V1CSIPersistentVolumeSource. # noqa: E501 - :type: bool + :type read_only: bool """ self._read_only = read_only @@ -278,7 +281,7 @@ def volume_attributes(self): volumeAttributes of the volume to publish. # noqa: E501 :return: The volume_attributes of this V1CSIPersistentVolumeSource. # noqa: E501 - :rtype: dict(str, str) + :rtype: dict[str, str] """ return self._volume_attributes @@ -289,7 +292,7 @@ def volume_attributes(self, volume_attributes): volumeAttributes of the volume to publish. # noqa: E501 :param volume_attributes: The volume_attributes of this V1CSIPersistentVolumeSource. # noqa: E501 - :type: dict(str, str) + :type volume_attributes: dict[str, str] """ self._volume_attributes = volume_attributes @@ -312,34 +315,42 @@ def volume_handle(self, volume_handle): volumeHandle is the unique volume name returned by the CSI volume plugin’s CreateVolume to refer to the volume on all subsequent calls. Required. # noqa: E501 :param volume_handle: The volume_handle of this V1CSIPersistentVolumeSource. # noqa: E501 - :type: str + :type volume_handle: str """ if self.local_vars_configuration.client_side_validation and volume_handle is None: # noqa: E501 raise ValueError("Invalid value for `volume_handle`, must not be `None`") # noqa: E501 self._volume_handle = volume_handle - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_csi_storage_capacity.py b/kubernetes/client/models/v1_csi_storage_capacity.py index b84558ac8a..bf90aab618 100644 --- a/kubernetes/client/models/v1_csi_storage_capacity.py +++ b/kubernetes/client/models/v1_csi_storage_capacity.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -55,7 +58,7 @@ class V1CSIStorageCapacity(object): def __init__(self, api_version=None, capacity=None, kind=None, maximum_volume_size=None, metadata=None, node_topology=None, storage_class_name=None, local_vars_configuration=None): # noqa: E501 """V1CSIStorageCapacity - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._api_version = None @@ -99,7 +102,7 @@ def api_version(self, api_version): APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501 :param api_version: The api_version of this V1CSIStorageCapacity. # noqa: E501 - :type: str + :type api_version: str """ self._api_version = api_version @@ -122,7 +125,7 @@ def capacity(self, capacity): capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. The semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable. # noqa: E501 :param capacity: The capacity of this V1CSIStorageCapacity. # noqa: E501 - :type: str + :type capacity: str """ self._capacity = capacity @@ -145,7 +148,7 @@ def kind(self, kind): Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501 :param kind: The kind of this V1CSIStorageCapacity. # noqa: E501 - :type: str + :type kind: str """ self._kind = kind @@ -168,7 +171,7 @@ def maximum_volume_size(self, maximum_volume_size): maximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. This is defined since CSI spec 1.4.0 as the largest size that may be used in a CreateVolumeRequest.capacity_range.required_bytes field to create a volume with the same parameters as those in GetCapacityRequest. The corresponding value in the Kubernetes API is ResourceRequirements.Requests in a volume claim. # noqa: E501 :param maximum_volume_size: The maximum_volume_size of this V1CSIStorageCapacity. # noqa: E501 - :type: str + :type maximum_volume_size: str """ self._maximum_volume_size = maximum_volume_size @@ -189,7 +192,7 @@ def metadata(self, metadata): :param metadata: The metadata of this V1CSIStorageCapacity. # noqa: E501 - :type: V1ObjectMeta + :type metadata: V1ObjectMeta """ self._metadata = metadata @@ -210,7 +213,7 @@ def node_topology(self, node_topology): :param node_topology: The node_topology of this V1CSIStorageCapacity. # noqa: E501 - :type: V1LabelSelector + :type node_topology: V1LabelSelector """ self._node_topology = node_topology @@ -233,34 +236,42 @@ def storage_class_name(self, storage_class_name): storageClassName represents the name of the StorageClass that the reported capacity applies to. It must meet the same requirements as the name of a StorageClass object (non-empty, DNS subdomain). If that object no longer exists, the CSIStorageCapacity object is obsolete and should be removed by its creator. This field is immutable. # noqa: E501 :param storage_class_name: The storage_class_name of this V1CSIStorageCapacity. # noqa: E501 - :type: str + :type storage_class_name: str """ if self.local_vars_configuration.client_side_validation and storage_class_name is None: # noqa: E501 raise ValueError("Invalid value for `storage_class_name`, must not be `None`") # noqa: E501 self._storage_class_name = storage_class_name - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_csi_storage_capacity_list.py b/kubernetes/client/models/v1_csi_storage_capacity_list.py index ae9ecdfb22..ac8f9b426e 100644 --- a/kubernetes/client/models/v1_csi_storage_capacity_list.py +++ b/kubernetes/client/models/v1_csi_storage_capacity_list.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -49,7 +52,7 @@ class V1CSIStorageCapacityList(object): def __init__(self, api_version=None, items=None, kind=None, metadata=None, local_vars_configuration=None): # noqa: E501 """V1CSIStorageCapacityList - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._api_version = None @@ -84,7 +87,7 @@ def api_version(self, api_version): APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501 :param api_version: The api_version of this V1CSIStorageCapacityList. # noqa: E501 - :type: str + :type api_version: str """ self._api_version = api_version @@ -107,7 +110,7 @@ def items(self, items): items is the list of CSIStorageCapacity objects. # noqa: E501 :param items: The items of this V1CSIStorageCapacityList. # noqa: E501 - :type: list[V1CSIStorageCapacity] + :type items: list[V1CSIStorageCapacity] """ if self.local_vars_configuration.client_side_validation and items is None: # noqa: E501 raise ValueError("Invalid value for `items`, must not be `None`") # noqa: E501 @@ -132,7 +135,7 @@ def kind(self, kind): Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501 :param kind: The kind of this V1CSIStorageCapacityList. # noqa: E501 - :type: str + :type kind: str """ self._kind = kind @@ -153,32 +156,40 @@ def metadata(self, metadata): :param metadata: The metadata of this V1CSIStorageCapacityList. # noqa: E501 - :type: V1ListMeta + :type metadata: V1ListMeta """ self._metadata = metadata - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_csi_volume_source.py b/kubernetes/client/models/v1_csi_volume_source.py index be3bc34997..1090ed086e 100644 --- a/kubernetes/client/models/v1_csi_volume_source.py +++ b/kubernetes/client/models/v1_csi_volume_source.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -37,7 +40,7 @@ class V1CSIVolumeSource(object): 'fs_type': 'str', 'node_publish_secret_ref': 'V1LocalObjectReference', 'read_only': 'bool', - 'volume_attributes': 'dict(str, str)' + 'volume_attributes': 'dict[str, str]' } attribute_map = { @@ -51,7 +54,7 @@ class V1CSIVolumeSource(object): def __init__(self, driver=None, fs_type=None, node_publish_secret_ref=None, read_only=None, volume_attributes=None, local_vars_configuration=None): # noqa: E501 """V1CSIVolumeSource - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._driver = None @@ -89,7 +92,7 @@ def driver(self, driver): driver is the name of the CSI driver that handles this volume. Consult with your admin for the correct name as registered in the cluster. # noqa: E501 :param driver: The driver of this V1CSIVolumeSource. # noqa: E501 - :type: str + :type driver: str """ if self.local_vars_configuration.client_side_validation and driver is None: # noqa: E501 raise ValueError("Invalid value for `driver`, must not be `None`") # noqa: E501 @@ -114,7 +117,7 @@ def fs_type(self, fs_type): fsType to mount. Ex. \"ext4\", \"xfs\", \"ntfs\". If not provided, the empty value is passed to the associated CSI driver which will determine the default filesystem to apply. # noqa: E501 :param fs_type: The fs_type of this V1CSIVolumeSource. # noqa: E501 - :type: str + :type fs_type: str """ self._fs_type = fs_type @@ -135,7 +138,7 @@ def node_publish_secret_ref(self, node_publish_secret_ref): :param node_publish_secret_ref: The node_publish_secret_ref of this V1CSIVolumeSource. # noqa: E501 - :type: V1LocalObjectReference + :type node_publish_secret_ref: V1LocalObjectReference """ self._node_publish_secret_ref = node_publish_secret_ref @@ -158,7 +161,7 @@ def read_only(self, read_only): readOnly specifies a read-only configuration for the volume. Defaults to false (read/write). # noqa: E501 :param read_only: The read_only of this V1CSIVolumeSource. # noqa: E501 - :type: bool + :type read_only: bool """ self._read_only = read_only @@ -170,7 +173,7 @@ def volume_attributes(self): volumeAttributes stores driver-specific properties that are passed to the CSI driver. Consult your driver's documentation for supported values. # noqa: E501 :return: The volume_attributes of this V1CSIVolumeSource. # noqa: E501 - :rtype: dict(str, str) + :rtype: dict[str, str] """ return self._volume_attributes @@ -181,32 +184,40 @@ def volume_attributes(self, volume_attributes): volumeAttributes stores driver-specific properties that are passed to the CSI driver. Consult your driver's documentation for supported values. # noqa: E501 :param volume_attributes: The volume_attributes of this V1CSIVolumeSource. # noqa: E501 - :type: dict(str, str) + :type volume_attributes: dict[str, str] """ self._volume_attributes = volume_attributes - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_custom_resource_column_definition.py b/kubernetes/client/models/v1_custom_resource_column_definition.py index 7bad30dabf..0d09ff8a96 100644 --- a/kubernetes/client/models/v1_custom_resource_column_definition.py +++ b/kubernetes/client/models/v1_custom_resource_column_definition.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -53,7 +56,7 @@ class V1CustomResourceColumnDefinition(object): def __init__(self, description=None, format=None, json_path=None, name=None, priority=None, type=None, local_vars_configuration=None): # noqa: E501 """V1CustomResourceColumnDefinition - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._description = None @@ -92,7 +95,7 @@ def description(self, description): description is a human readable description of this column. # noqa: E501 :param description: The description of this V1CustomResourceColumnDefinition. # noqa: E501 - :type: str + :type description: str """ self._description = description @@ -115,7 +118,7 @@ def format(self, format): format is an optional OpenAPI type definition for this column. The 'name' format is applied to the primary identifier column to assist in clients identifying column is the resource name. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details. # noqa: E501 :param format: The format of this V1CustomResourceColumnDefinition. # noqa: E501 - :type: str + :type format: str """ self._format = format @@ -138,7 +141,7 @@ def json_path(self, json_path): jsonPath is a simple JSON path (i.e. with array notation) which is evaluated against each custom resource to produce the value for this column. # noqa: E501 :param json_path: The json_path of this V1CustomResourceColumnDefinition. # noqa: E501 - :type: str + :type json_path: str """ if self.local_vars_configuration.client_side_validation and json_path is None: # noqa: E501 raise ValueError("Invalid value for `json_path`, must not be `None`") # noqa: E501 @@ -163,7 +166,7 @@ def name(self, name): name is a human readable name for the column. # noqa: E501 :param name: The name of this V1CustomResourceColumnDefinition. # noqa: E501 - :type: str + :type name: str """ if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 @@ -188,7 +191,7 @@ def priority(self, priority): priority is an integer defining the relative importance of this column compared to others. Lower numbers are considered higher priority. Columns that may be omitted in limited space scenarios should be given a priority greater than 0. # noqa: E501 :param priority: The priority of this V1CustomResourceColumnDefinition. # noqa: E501 - :type: int + :type priority: int """ self._priority = priority @@ -211,34 +214,42 @@ def type(self, type): type is an OpenAPI type definition for this column. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details. # noqa: E501 :param type: The type of this V1CustomResourceColumnDefinition. # noqa: E501 - :type: str + :type type: str """ if self.local_vars_configuration.client_side_validation and type is None: # noqa: E501 raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 self._type = type - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_custom_resource_conversion.py b/kubernetes/client/models/v1_custom_resource_conversion.py index e5f28be316..b2654f4f47 100644 --- a/kubernetes/client/models/v1_custom_resource_conversion.py +++ b/kubernetes/client/models/v1_custom_resource_conversion.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -45,7 +48,7 @@ class V1CustomResourceConversion(object): def __init__(self, strategy=None, webhook=None, local_vars_configuration=None): # noqa: E501 """V1CustomResourceConversion - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._strategy = None @@ -74,7 +77,7 @@ def strategy(self, strategy): strategy specifies how custom resources are converted between versions. Allowed values are: - `\"None\"`: The converter only change the apiVersion and would not touch any other field in the custom resource. - `\"Webhook\"`: API Server will call to an external webhook to do the conversion. Additional information is needed for this option. This requires spec.preserveUnknownFields to be false, and spec.conversion.webhook to be set. # noqa: E501 :param strategy: The strategy of this V1CustomResourceConversion. # noqa: E501 - :type: str + :type strategy: str """ if self.local_vars_configuration.client_side_validation and strategy is None: # noqa: E501 raise ValueError("Invalid value for `strategy`, must not be `None`") # noqa: E501 @@ -97,32 +100,40 @@ def webhook(self, webhook): :param webhook: The webhook of this V1CustomResourceConversion. # noqa: E501 - :type: V1WebhookConversion + :type webhook: V1WebhookConversion """ self._webhook = webhook - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_custom_resource_definition.py b/kubernetes/client/models/v1_custom_resource_definition.py index 33461ded34..2e62b37ac3 100644 --- a/kubernetes/client/models/v1_custom_resource_definition.py +++ b/kubernetes/client/models/v1_custom_resource_definition.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -51,7 +54,7 @@ class V1CustomResourceDefinition(object): def __init__(self, api_version=None, kind=None, metadata=None, spec=None, status=None, local_vars_configuration=None): # noqa: E501 """V1CustomResourceDefinition - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._api_version = None @@ -89,7 +92,7 @@ def api_version(self, api_version): APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501 :param api_version: The api_version of this V1CustomResourceDefinition. # noqa: E501 - :type: str + :type api_version: str """ self._api_version = api_version @@ -112,7 +115,7 @@ def kind(self, kind): Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501 :param kind: The kind of this V1CustomResourceDefinition. # noqa: E501 - :type: str + :type kind: str """ self._kind = kind @@ -133,7 +136,7 @@ def metadata(self, metadata): :param metadata: The metadata of this V1CustomResourceDefinition. # noqa: E501 - :type: V1ObjectMeta + :type metadata: V1ObjectMeta """ self._metadata = metadata @@ -154,7 +157,7 @@ def spec(self, spec): :param spec: The spec of this V1CustomResourceDefinition. # noqa: E501 - :type: V1CustomResourceDefinitionSpec + :type spec: V1CustomResourceDefinitionSpec """ if self.local_vars_configuration.client_side_validation and spec is None: # noqa: E501 raise ValueError("Invalid value for `spec`, must not be `None`") # noqa: E501 @@ -177,32 +180,40 @@ def status(self, status): :param status: The status of this V1CustomResourceDefinition. # noqa: E501 - :type: V1CustomResourceDefinitionStatus + :type status: V1CustomResourceDefinitionStatus """ self._status = status - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_custom_resource_definition_condition.py b/kubernetes/client/models/v1_custom_resource_definition_condition.py index d926f4ec64..02042aaaf1 100644 --- a/kubernetes/client/models/v1_custom_resource_definition_condition.py +++ b/kubernetes/client/models/v1_custom_resource_definition_condition.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -35,6 +38,7 @@ class V1CustomResourceDefinitionCondition(object): openapi_types = { 'last_transition_time': 'datetime', 'message': 'str', + 'observed_generation': 'int', 'reason': 'str', 'status': 'str', 'type': 'str' @@ -43,19 +47,21 @@ class V1CustomResourceDefinitionCondition(object): attribute_map = { 'last_transition_time': 'lastTransitionTime', 'message': 'message', + 'observed_generation': 'observedGeneration', 'reason': 'reason', 'status': 'status', 'type': 'type' } - def __init__(self, last_transition_time=None, message=None, reason=None, status=None, type=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, last_transition_time=None, message=None, observed_generation=None, reason=None, status=None, type=None, local_vars_configuration=None): # noqa: E501 """V1CustomResourceDefinitionCondition - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._last_transition_time = None self._message = None + self._observed_generation = None self._reason = None self._status = None self._type = None @@ -65,6 +71,8 @@ def __init__(self, last_transition_time=None, message=None, reason=None, status= self.last_transition_time = last_transition_time if message is not None: self.message = message + if observed_generation is not None: + self.observed_generation = observed_generation if reason is not None: self.reason = reason self.status = status @@ -88,7 +96,7 @@ def last_transition_time(self, last_transition_time): lastTransitionTime last time the condition transitioned from one status to another. # noqa: E501 :param last_transition_time: The last_transition_time of this V1CustomResourceDefinitionCondition. # noqa: E501 - :type: datetime + :type last_transition_time: datetime """ self._last_transition_time = last_transition_time @@ -111,11 +119,34 @@ def message(self, message): message is a human-readable message indicating details about last transition. # noqa: E501 :param message: The message of this V1CustomResourceDefinitionCondition. # noqa: E501 - :type: str + :type message: str """ self._message = message + @property + def observed_generation(self): + """Gets the observed_generation of this V1CustomResourceDefinitionCondition. # noqa: E501 + + observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance. # noqa: E501 + + :return: The observed_generation of this V1CustomResourceDefinitionCondition. # noqa: E501 + :rtype: int + """ + return self._observed_generation + + @observed_generation.setter + def observed_generation(self, observed_generation): + """Sets the observed_generation of this V1CustomResourceDefinitionCondition. + + observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance. # noqa: E501 + + :param observed_generation: The observed_generation of this V1CustomResourceDefinitionCondition. # noqa: E501 + :type observed_generation: int + """ + + self._observed_generation = observed_generation + @property def reason(self): """Gets the reason of this V1CustomResourceDefinitionCondition. # noqa: E501 @@ -134,7 +165,7 @@ def reason(self, reason): reason is a unique, one-word, CamelCase reason for the condition's last transition. # noqa: E501 :param reason: The reason of this V1CustomResourceDefinitionCondition. # noqa: E501 - :type: str + :type reason: str """ self._reason = reason @@ -157,7 +188,7 @@ def status(self, status): status is the status of the condition. Can be True, False, Unknown. # noqa: E501 :param status: The status of this V1CustomResourceDefinitionCondition. # noqa: E501 - :type: str + :type status: str """ if self.local_vars_configuration.client_side_validation and status is None: # noqa: E501 raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 @@ -182,34 +213,42 @@ def type(self, type): type is the type of the condition. Types include Established, NamesAccepted and Terminating. # noqa: E501 :param type: The type of this V1CustomResourceDefinitionCondition. # noqa: E501 - :type: str + :type type: str """ if self.local_vars_configuration.client_side_validation and type is None: # noqa: E501 raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 self._type = type - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_custom_resource_definition_list.py b/kubernetes/client/models/v1_custom_resource_definition_list.py index f45ec3b4e3..44daf3bedc 100644 --- a/kubernetes/client/models/v1_custom_resource_definition_list.py +++ b/kubernetes/client/models/v1_custom_resource_definition_list.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -49,7 +52,7 @@ class V1CustomResourceDefinitionList(object): def __init__(self, api_version=None, items=None, kind=None, metadata=None, local_vars_configuration=None): # noqa: E501 """V1CustomResourceDefinitionList - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._api_version = None @@ -84,7 +87,7 @@ def api_version(self, api_version): APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501 :param api_version: The api_version of this V1CustomResourceDefinitionList. # noqa: E501 - :type: str + :type api_version: str """ self._api_version = api_version @@ -107,7 +110,7 @@ def items(self, items): items list individual CustomResourceDefinition objects # noqa: E501 :param items: The items of this V1CustomResourceDefinitionList. # noqa: E501 - :type: list[V1CustomResourceDefinition] + :type items: list[V1CustomResourceDefinition] """ if self.local_vars_configuration.client_side_validation and items is None: # noqa: E501 raise ValueError("Invalid value for `items`, must not be `None`") # noqa: E501 @@ -132,7 +135,7 @@ def kind(self, kind): Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501 :param kind: The kind of this V1CustomResourceDefinitionList. # noqa: E501 - :type: str + :type kind: str """ self._kind = kind @@ -153,32 +156,40 @@ def metadata(self, metadata): :param metadata: The metadata of this V1CustomResourceDefinitionList. # noqa: E501 - :type: V1ListMeta + :type metadata: V1ListMeta """ self._metadata = metadata - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_custom_resource_definition_names.py b/kubernetes/client/models/v1_custom_resource_definition_names.py index d8f30604b3..0e60b0e4db 100644 --- a/kubernetes/client/models/v1_custom_resource_definition_names.py +++ b/kubernetes/client/models/v1_custom_resource_definition_names.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -53,7 +56,7 @@ class V1CustomResourceDefinitionNames(object): def __init__(self, categories=None, kind=None, list_kind=None, plural=None, short_names=None, singular=None, local_vars_configuration=None): # noqa: E501 """V1CustomResourceDefinitionNames - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._categories = None @@ -93,7 +96,7 @@ def categories(self, categories): categories is a list of grouped resources this custom resource belongs to (e.g. 'all'). This is published in API discovery documents, and used by clients to support invocations like `kubectl get all`. # noqa: E501 :param categories: The categories of this V1CustomResourceDefinitionNames. # noqa: E501 - :type: list[str] + :type categories: list[str] """ self._categories = categories @@ -116,7 +119,7 @@ def kind(self, kind): kind is the serialized kind of the resource. It is normally CamelCase and singular. Custom resource instances will use this value as the `kind` attribute in API calls. # noqa: E501 :param kind: The kind of this V1CustomResourceDefinitionNames. # noqa: E501 - :type: str + :type kind: str """ if self.local_vars_configuration.client_side_validation and kind is None: # noqa: E501 raise ValueError("Invalid value for `kind`, must not be `None`") # noqa: E501 @@ -141,7 +144,7 @@ def list_kind(self, list_kind): listKind is the serialized kind of the list for this resource. Defaults to \"`kind`List\". # noqa: E501 :param list_kind: The list_kind of this V1CustomResourceDefinitionNames. # noqa: E501 - :type: str + :type list_kind: str """ self._list_kind = list_kind @@ -164,7 +167,7 @@ def plural(self, plural): plural is the plural name of the resource to serve. The custom resources are served under `/apis///.../`. Must match the name of the CustomResourceDefinition (in the form `.`). Must be all lowercase. # noqa: E501 :param plural: The plural of this V1CustomResourceDefinitionNames. # noqa: E501 - :type: str + :type plural: str """ if self.local_vars_configuration.client_side_validation and plural is None: # noqa: E501 raise ValueError("Invalid value for `plural`, must not be `None`") # noqa: E501 @@ -189,7 +192,7 @@ def short_names(self, short_names): shortNames are short names for the resource, exposed in API discovery documents, and used by clients to support invocations like `kubectl get `. It must be all lowercase. # noqa: E501 :param short_names: The short_names of this V1CustomResourceDefinitionNames. # noqa: E501 - :type: list[str] + :type short_names: list[str] """ self._short_names = short_names @@ -212,32 +215,40 @@ def singular(self, singular): singular is the singular name of the resource. It must be all lowercase. Defaults to lowercased `kind`. # noqa: E501 :param singular: The singular of this V1CustomResourceDefinitionNames. # noqa: E501 - :type: str + :type singular: str """ self._singular = singular - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_custom_resource_definition_spec.py b/kubernetes/client/models/v1_custom_resource_definition_spec.py index cf4a2e056f..81138ace07 100644 --- a/kubernetes/client/models/v1_custom_resource_definition_spec.py +++ b/kubernetes/client/models/v1_custom_resource_definition_spec.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -53,7 +56,7 @@ class V1CustomResourceDefinitionSpec(object): def __init__(self, conversion=None, group=None, names=None, preserve_unknown_fields=None, scope=None, versions=None, local_vars_configuration=None): # noqa: E501 """V1CustomResourceDefinitionSpec - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._conversion = None @@ -89,7 +92,7 @@ def conversion(self, conversion): :param conversion: The conversion of this V1CustomResourceDefinitionSpec. # noqa: E501 - :type: V1CustomResourceConversion + :type conversion: V1CustomResourceConversion """ self._conversion = conversion @@ -112,7 +115,7 @@ def group(self, group): group is the API group of the defined custom resource. The custom resources are served under `/apis//...`. Must match the name of the CustomResourceDefinition (in the form `.`). # noqa: E501 :param group: The group of this V1CustomResourceDefinitionSpec. # noqa: E501 - :type: str + :type group: str """ if self.local_vars_configuration.client_side_validation and group is None: # noqa: E501 raise ValueError("Invalid value for `group`, must not be `None`") # noqa: E501 @@ -135,7 +138,7 @@ def names(self, names): :param names: The names of this V1CustomResourceDefinitionSpec. # noqa: E501 - :type: V1CustomResourceDefinitionNames + :type names: V1CustomResourceDefinitionNames """ if self.local_vars_configuration.client_side_validation and names is None: # noqa: E501 raise ValueError("Invalid value for `names`, must not be `None`") # noqa: E501 @@ -160,7 +163,7 @@ def preserve_unknown_fields(self, preserve_unknown_fields): preserveUnknownFields indicates that object fields which are not specified in the OpenAPI schema should be preserved when persisting to storage. apiVersion, kind, metadata and known fields inside metadata are always preserved. This field is deprecated in favor of setting `x-preserve-unknown-fields` to true in `spec.versions[*].schema.openAPIV3Schema`. See https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#field-pruning for details. # noqa: E501 :param preserve_unknown_fields: The preserve_unknown_fields of this V1CustomResourceDefinitionSpec. # noqa: E501 - :type: bool + :type preserve_unknown_fields: bool """ self._preserve_unknown_fields = preserve_unknown_fields @@ -183,7 +186,7 @@ def scope(self, scope): scope indicates whether the defined custom resource is cluster- or namespace-scoped. Allowed values are `Cluster` and `Namespaced`. # noqa: E501 :param scope: The scope of this V1CustomResourceDefinitionSpec. # noqa: E501 - :type: str + :type scope: str """ if self.local_vars_configuration.client_side_validation and scope is None: # noqa: E501 raise ValueError("Invalid value for `scope`, must not be `None`") # noqa: E501 @@ -208,34 +211,42 @@ def versions(self, versions): versions is the list of all API versions of the defined custom resource. Version names are used to compute the order in which served versions are listed in API discovery. If the version string is \"kube-like\", it will sort above non \"kube-like\" version strings, which are ordered lexicographically. \"Kube-like\" versions start with a \"v\", then are followed by a number (the major version), then optionally the string \"alpha\" or \"beta\" and another number (the minor version). These are sorted first by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing major version, then minor version. An example sorted list of versions: v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10. # noqa: E501 :param versions: The versions of this V1CustomResourceDefinitionSpec. # noqa: E501 - :type: list[V1CustomResourceDefinitionVersion] + :type versions: list[V1CustomResourceDefinitionVersion] """ if self.local_vars_configuration.client_side_validation and versions is None: # noqa: E501 raise ValueError("Invalid value for `versions`, must not be `None`") # noqa: E501 self._versions = versions - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_custom_resource_definition_status.py b/kubernetes/client/models/v1_custom_resource_definition_status.py index fbc929a8fa..5e55661529 100644 --- a/kubernetes/client/models/v1_custom_resource_definition_status.py +++ b/kubernetes/client/models/v1_custom_resource_definition_status.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -35,23 +38,26 @@ class V1CustomResourceDefinitionStatus(object): openapi_types = { 'accepted_names': 'V1CustomResourceDefinitionNames', 'conditions': 'list[V1CustomResourceDefinitionCondition]', + 'observed_generation': 'int', 'stored_versions': 'list[str]' } attribute_map = { 'accepted_names': 'acceptedNames', 'conditions': 'conditions', + 'observed_generation': 'observedGeneration', 'stored_versions': 'storedVersions' } - def __init__(self, accepted_names=None, conditions=None, stored_versions=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, accepted_names=None, conditions=None, observed_generation=None, stored_versions=None, local_vars_configuration=None): # noqa: E501 """V1CustomResourceDefinitionStatus - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._accepted_names = None self._conditions = None + self._observed_generation = None self._stored_versions = None self.discriminator = None @@ -59,6 +65,8 @@ def __init__(self, accepted_names=None, conditions=None, stored_versions=None, l self.accepted_names = accepted_names if conditions is not None: self.conditions = conditions + if observed_generation is not None: + self.observed_generation = observed_generation if stored_versions is not None: self.stored_versions = stored_versions @@ -78,7 +86,7 @@ def accepted_names(self, accepted_names): :param accepted_names: The accepted_names of this V1CustomResourceDefinitionStatus. # noqa: E501 - :type: V1CustomResourceDefinitionNames + :type accepted_names: V1CustomResourceDefinitionNames """ self._accepted_names = accepted_names @@ -101,11 +109,34 @@ def conditions(self, conditions): conditions indicate state for particular aspects of a CustomResourceDefinition # noqa: E501 :param conditions: The conditions of this V1CustomResourceDefinitionStatus. # noqa: E501 - :type: list[V1CustomResourceDefinitionCondition] + :type conditions: list[V1CustomResourceDefinitionCondition] """ self._conditions = conditions + @property + def observed_generation(self): + """Gets the observed_generation of this V1CustomResourceDefinitionStatus. # noqa: E501 + + The generation observed by the CRD controller. # noqa: E501 + + :return: The observed_generation of this V1CustomResourceDefinitionStatus. # noqa: E501 + :rtype: int + """ + return self._observed_generation + + @observed_generation.setter + def observed_generation(self, observed_generation): + """Sets the observed_generation of this V1CustomResourceDefinitionStatus. + + The generation observed by the CRD controller. # noqa: E501 + + :param observed_generation: The observed_generation of this V1CustomResourceDefinitionStatus. # noqa: E501 + :type observed_generation: int + """ + + self._observed_generation = observed_generation + @property def stored_versions(self): """Gets the stored_versions of this V1CustomResourceDefinitionStatus. # noqa: E501 @@ -124,32 +155,40 @@ def stored_versions(self, stored_versions): storedVersions lists all versions of CustomResources that were ever persisted. Tracking these versions allows a migration path for stored versions in etcd. The field is mutable so a migration controller can finish a migration to another version (ensuring no old objects are left in storage), and then remove the rest of the versions from this list. Versions may not be removed from `spec.versions` while they exist in this list. # noqa: E501 :param stored_versions: The stored_versions of this V1CustomResourceDefinitionStatus. # noqa: E501 - :type: list[str] + :type stored_versions: list[str] """ self._stored_versions = stored_versions - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_custom_resource_definition_version.py b/kubernetes/client/models/v1_custom_resource_definition_version.py index 9855eb4112..e642b34ead 100644 --- a/kubernetes/client/models/v1_custom_resource_definition_version.py +++ b/kubernetes/client/models/v1_custom_resource_definition_version.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -59,7 +62,7 @@ class V1CustomResourceDefinitionVersion(object): def __init__(self, additional_printer_columns=None, deprecated=None, deprecation_warning=None, name=None, schema=None, selectable_fields=None, served=None, storage=None, subresources=None, local_vars_configuration=None): # noqa: E501 """V1CustomResourceDefinitionVersion - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._additional_printer_columns = None @@ -107,7 +110,7 @@ def additional_printer_columns(self, additional_printer_columns): additionalPrinterColumns specifies additional columns returned in Table output. See https://kubernetes.io/docs/reference/using-api/api-concepts/#receiving-resources-as-tables for details. If no columns are specified, a single column displaying the age of the custom resource is used. # noqa: E501 :param additional_printer_columns: The additional_printer_columns of this V1CustomResourceDefinitionVersion. # noqa: E501 - :type: list[V1CustomResourceColumnDefinition] + :type additional_printer_columns: list[V1CustomResourceColumnDefinition] """ self._additional_printer_columns = additional_printer_columns @@ -130,7 +133,7 @@ def deprecated(self, deprecated): deprecated indicates this version of the custom resource API is deprecated. When set to true, API requests to this version receive a warning header in the server response. Defaults to false. # noqa: E501 :param deprecated: The deprecated of this V1CustomResourceDefinitionVersion. # noqa: E501 - :type: bool + :type deprecated: bool """ self._deprecated = deprecated @@ -153,7 +156,7 @@ def deprecation_warning(self, deprecation_warning): deprecationWarning overrides the default warning returned to API clients. May only be set when `deprecated` is true. The default warning indicates this version is deprecated and recommends use of the newest served version of equal or greater stability, if one exists. # noqa: E501 :param deprecation_warning: The deprecation_warning of this V1CustomResourceDefinitionVersion. # noqa: E501 - :type: str + :type deprecation_warning: str """ self._deprecation_warning = deprecation_warning @@ -176,7 +179,7 @@ def name(self, name): name is the version name, e.g. “v1”, “v2beta1”, etc. The custom resources are served under this version at `/apis///...` if `served` is true. # noqa: E501 :param name: The name of this V1CustomResourceDefinitionVersion. # noqa: E501 - :type: str + :type name: str """ if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 @@ -199,7 +202,7 @@ def schema(self, schema): :param schema: The schema of this V1CustomResourceDefinitionVersion. # noqa: E501 - :type: V1CustomResourceValidation + :type schema: V1CustomResourceValidation """ self._schema = schema @@ -222,7 +225,7 @@ def selectable_fields(self, selectable_fields): selectableFields specifies paths to fields that may be used as field selectors. A maximum of 8 selectable fields are allowed. See https://kubernetes.io/docs/concepts/overview/working-with-objects/field-selectors # noqa: E501 :param selectable_fields: The selectable_fields of this V1CustomResourceDefinitionVersion. # noqa: E501 - :type: list[V1SelectableField] + :type selectable_fields: list[V1SelectableField] """ self._selectable_fields = selectable_fields @@ -245,7 +248,7 @@ def served(self, served): served is a flag enabling/disabling this version from being served via REST APIs # noqa: E501 :param served: The served of this V1CustomResourceDefinitionVersion. # noqa: E501 - :type: bool + :type served: bool """ if self.local_vars_configuration.client_side_validation and served is None: # noqa: E501 raise ValueError("Invalid value for `served`, must not be `None`") # noqa: E501 @@ -270,7 +273,7 @@ def storage(self, storage): storage indicates this version should be used when persisting custom resources to storage. There must be exactly one version with storage=true. # noqa: E501 :param storage: The storage of this V1CustomResourceDefinitionVersion. # noqa: E501 - :type: bool + :type storage: bool """ if self.local_vars_configuration.client_side_validation and storage is None: # noqa: E501 raise ValueError("Invalid value for `storage`, must not be `None`") # noqa: E501 @@ -293,32 +296,40 @@ def subresources(self, subresources): :param subresources: The subresources of this V1CustomResourceDefinitionVersion. # noqa: E501 - :type: V1CustomResourceSubresources + :type subresources: V1CustomResourceSubresources """ self._subresources = subresources - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_custom_resource_subresource_scale.py b/kubernetes/client/models/v1_custom_resource_subresource_scale.py index f4052bce6f..8f191333e7 100644 --- a/kubernetes/client/models/v1_custom_resource_subresource_scale.py +++ b/kubernetes/client/models/v1_custom_resource_subresource_scale.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -47,7 +50,7 @@ class V1CustomResourceSubresourceScale(object): def __init__(self, label_selector_path=None, spec_replicas_path=None, status_replicas_path=None, local_vars_configuration=None): # noqa: E501 """V1CustomResourceSubresourceScale - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._label_selector_path = None @@ -78,7 +81,7 @@ def label_selector_path(self, label_selector_path): labelSelectorPath defines the JSON path inside of a custom resource that corresponds to Scale `status.selector`. Only JSON paths without the array notation are allowed. Must be a JSON Path under `.status` or `.spec`. Must be set to work with HorizontalPodAutoscaler. The field pointed by this JSON path must be a string field (not a complex selector struct) which contains a serialized label selector in string form. More info: https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions#scale-subresource If there is no value under the given path in the custom resource, the `status.selector` value in the `/scale` subresource will default to the empty string. # noqa: E501 :param label_selector_path: The label_selector_path of this V1CustomResourceSubresourceScale. # noqa: E501 - :type: str + :type label_selector_path: str """ self._label_selector_path = label_selector_path @@ -101,7 +104,7 @@ def spec_replicas_path(self, spec_replicas_path): specReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `spec.replicas`. Only JSON paths without the array notation are allowed. Must be a JSON Path under `.spec`. If there is no value under the given path in the custom resource, the `/scale` subresource will return an error on GET. # noqa: E501 :param spec_replicas_path: The spec_replicas_path of this V1CustomResourceSubresourceScale. # noqa: E501 - :type: str + :type spec_replicas_path: str """ if self.local_vars_configuration.client_side_validation and spec_replicas_path is None: # noqa: E501 raise ValueError("Invalid value for `spec_replicas_path`, must not be `None`") # noqa: E501 @@ -126,34 +129,42 @@ def status_replicas_path(self, status_replicas_path): statusReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `status.replicas`. Only JSON paths without the array notation are allowed. Must be a JSON Path under `.status`. If there is no value under the given path in the custom resource, the `status.replicas` value in the `/scale` subresource will default to 0. # noqa: E501 :param status_replicas_path: The status_replicas_path of this V1CustomResourceSubresourceScale. # noqa: E501 - :type: str + :type status_replicas_path: str """ if self.local_vars_configuration.client_side_validation and status_replicas_path is None: # noqa: E501 raise ValueError("Invalid value for `status_replicas_path`, must not be `None`") # noqa: E501 self._status_replicas_path = status_replicas_path - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_custom_resource_subresources.py b/kubernetes/client/models/v1_custom_resource_subresources.py index 12f7bb19ff..5aae737823 100644 --- a/kubernetes/client/models/v1_custom_resource_subresources.py +++ b/kubernetes/client/models/v1_custom_resource_subresources.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -45,7 +48,7 @@ class V1CustomResourceSubresources(object): def __init__(self, scale=None, status=None, local_vars_configuration=None): # noqa: E501 """V1CustomResourceSubresources - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._scale = None @@ -73,7 +76,7 @@ def scale(self, scale): :param scale: The scale of this V1CustomResourceSubresources. # noqa: E501 - :type: V1CustomResourceSubresourceScale + :type scale: V1CustomResourceSubresourceScale """ self._scale = scale @@ -96,32 +99,40 @@ def status(self, status): status indicates the custom resource should serve a `/status` subresource. When enabled: 1. requests to the custom resource primary endpoint ignore changes to the `status` stanza of the object. 2. requests to the custom resource `/status` subresource ignore changes to anything other than the `status` stanza of the object. # noqa: E501 :param status: The status of this V1CustomResourceSubresources. # noqa: E501 - :type: object + :type status: object """ self._status = status - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_custom_resource_validation.py b/kubernetes/client/models/v1_custom_resource_validation.py index 784b97ef34..f05be08c0c 100644 --- a/kubernetes/client/models/v1_custom_resource_validation.py +++ b/kubernetes/client/models/v1_custom_resource_validation.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -43,7 +46,7 @@ class V1CustomResourceValidation(object): def __init__(self, open_apiv3_schema=None, local_vars_configuration=None): # noqa: E501 """V1CustomResourceValidation - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._open_apiv3_schema = None @@ -68,32 +71,40 @@ def open_apiv3_schema(self, open_apiv3_schema): :param open_apiv3_schema: The open_apiv3_schema of this V1CustomResourceValidation. # noqa: E501 - :type: V1JSONSchemaProps + :type open_apiv3_schema: V1JSONSchemaProps """ self._open_apiv3_schema = open_apiv3_schema - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_daemon_endpoint.py b/kubernetes/client/models/v1_daemon_endpoint.py index c9f7c30e31..e37e0332bf 100644 --- a/kubernetes/client/models/v1_daemon_endpoint.py +++ b/kubernetes/client/models/v1_daemon_endpoint.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -43,7 +46,7 @@ class V1DaemonEndpoint(object): def __init__(self, port=None, local_vars_configuration=None): # noqa: E501 """V1DaemonEndpoint - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._port = None @@ -69,34 +72,42 @@ def port(self, port): Port number of the given endpoint. # noqa: E501 :param port: The port of this V1DaemonEndpoint. # noqa: E501 - :type: int + :type port: int """ if self.local_vars_configuration.client_side_validation and port is None: # noqa: E501 raise ValueError("Invalid value for `port`, must not be `None`") # noqa: E501 self._port = port - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_daemon_set.py b/kubernetes/client/models/v1_daemon_set.py index 13720e3820..df68571922 100644 --- a/kubernetes/client/models/v1_daemon_set.py +++ b/kubernetes/client/models/v1_daemon_set.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -51,7 +54,7 @@ class V1DaemonSet(object): def __init__(self, api_version=None, kind=None, metadata=None, spec=None, status=None, local_vars_configuration=None): # noqa: E501 """V1DaemonSet - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._api_version = None @@ -90,7 +93,7 @@ def api_version(self, api_version): APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501 :param api_version: The api_version of this V1DaemonSet. # noqa: E501 - :type: str + :type api_version: str """ self._api_version = api_version @@ -113,7 +116,7 @@ def kind(self, kind): Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501 :param kind: The kind of this V1DaemonSet. # noqa: E501 - :type: str + :type kind: str """ self._kind = kind @@ -134,7 +137,7 @@ def metadata(self, metadata): :param metadata: The metadata of this V1DaemonSet. # noqa: E501 - :type: V1ObjectMeta + :type metadata: V1ObjectMeta """ self._metadata = metadata @@ -155,7 +158,7 @@ def spec(self, spec): :param spec: The spec of this V1DaemonSet. # noqa: E501 - :type: V1DaemonSetSpec + :type spec: V1DaemonSetSpec """ self._spec = spec @@ -176,32 +179,40 @@ def status(self, status): :param status: The status of this V1DaemonSet. # noqa: E501 - :type: V1DaemonSetStatus + :type status: V1DaemonSetStatus """ self._status = status - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_daemon_set_condition.py b/kubernetes/client/models/v1_daemon_set_condition.py index 8a10cfec24..cfaaa72541 100644 --- a/kubernetes/client/models/v1_daemon_set_condition.py +++ b/kubernetes/client/models/v1_daemon_set_condition.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -51,7 +54,7 @@ class V1DaemonSetCondition(object): def __init__(self, last_transition_time=None, message=None, reason=None, status=None, type=None, local_vars_configuration=None): # noqa: E501 """V1DaemonSetCondition - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._last_transition_time = None @@ -88,7 +91,7 @@ def last_transition_time(self, last_transition_time): Last time the condition transitioned from one status to another. # noqa: E501 :param last_transition_time: The last_transition_time of this V1DaemonSetCondition. # noqa: E501 - :type: datetime + :type last_transition_time: datetime """ self._last_transition_time = last_transition_time @@ -111,7 +114,7 @@ def message(self, message): A human readable message indicating details about the transition. # noqa: E501 :param message: The message of this V1DaemonSetCondition. # noqa: E501 - :type: str + :type message: str """ self._message = message @@ -134,7 +137,7 @@ def reason(self, reason): The reason for the condition's last transition. # noqa: E501 :param reason: The reason of this V1DaemonSetCondition. # noqa: E501 - :type: str + :type reason: str """ self._reason = reason @@ -157,7 +160,7 @@ def status(self, status): Status of the condition, one of True, False, Unknown. # noqa: E501 :param status: The status of this V1DaemonSetCondition. # noqa: E501 - :type: str + :type status: str """ if self.local_vars_configuration.client_side_validation and status is None: # noqa: E501 raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 @@ -182,34 +185,42 @@ def type(self, type): Type of DaemonSet condition. # noqa: E501 :param type: The type of this V1DaemonSetCondition. # noqa: E501 - :type: str + :type type: str """ if self.local_vars_configuration.client_side_validation and type is None: # noqa: E501 raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 self._type = type - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_daemon_set_list.py b/kubernetes/client/models/v1_daemon_set_list.py index 492bad8486..83e3ca8485 100644 --- a/kubernetes/client/models/v1_daemon_set_list.py +++ b/kubernetes/client/models/v1_daemon_set_list.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -49,7 +52,7 @@ class V1DaemonSetList(object): def __init__(self, api_version=None, items=None, kind=None, metadata=None, local_vars_configuration=None): # noqa: E501 """V1DaemonSetList - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._api_version = None @@ -84,7 +87,7 @@ def api_version(self, api_version): APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501 :param api_version: The api_version of this V1DaemonSetList. # noqa: E501 - :type: str + :type api_version: str """ self._api_version = api_version @@ -107,7 +110,7 @@ def items(self, items): A list of daemon sets. # noqa: E501 :param items: The items of this V1DaemonSetList. # noqa: E501 - :type: list[V1DaemonSet] + :type items: list[V1DaemonSet] """ if self.local_vars_configuration.client_side_validation and items is None: # noqa: E501 raise ValueError("Invalid value for `items`, must not be `None`") # noqa: E501 @@ -132,7 +135,7 @@ def kind(self, kind): Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501 :param kind: The kind of this V1DaemonSetList. # noqa: E501 - :type: str + :type kind: str """ self._kind = kind @@ -153,32 +156,40 @@ def metadata(self, metadata): :param metadata: The metadata of this V1DaemonSetList. # noqa: E501 - :type: V1ListMeta + :type metadata: V1ListMeta """ self._metadata = metadata - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_daemon_set_spec.py b/kubernetes/client/models/v1_daemon_set_spec.py index 4f921b12cf..3a097c0a32 100644 --- a/kubernetes/client/models/v1_daemon_set_spec.py +++ b/kubernetes/client/models/v1_daemon_set_spec.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -51,7 +54,7 @@ class V1DaemonSetSpec(object): def __init__(self, min_ready_seconds=None, revision_history_limit=None, selector=None, template=None, update_strategy=None, local_vars_configuration=None): # noqa: E501 """V1DaemonSetSpec - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._min_ready_seconds = None @@ -88,7 +91,7 @@ def min_ready_seconds(self, min_ready_seconds): The minimum number of seconds for which a newly created DaemonSet pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready). # noqa: E501 :param min_ready_seconds: The min_ready_seconds of this V1DaemonSetSpec. # noqa: E501 - :type: int + :type min_ready_seconds: int """ self._min_ready_seconds = min_ready_seconds @@ -111,7 +114,7 @@ def revision_history_limit(self, revision_history_limit): The number of old history to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 10. # noqa: E501 :param revision_history_limit: The revision_history_limit of this V1DaemonSetSpec. # noqa: E501 - :type: int + :type revision_history_limit: int """ self._revision_history_limit = revision_history_limit @@ -132,7 +135,7 @@ def selector(self, selector): :param selector: The selector of this V1DaemonSetSpec. # noqa: E501 - :type: V1LabelSelector + :type selector: V1LabelSelector """ if self.local_vars_configuration.client_side_validation and selector is None: # noqa: E501 raise ValueError("Invalid value for `selector`, must not be `None`") # noqa: E501 @@ -155,7 +158,7 @@ def template(self, template): :param template: The template of this V1DaemonSetSpec. # noqa: E501 - :type: V1PodTemplateSpec + :type template: V1PodTemplateSpec """ if self.local_vars_configuration.client_side_validation and template is None: # noqa: E501 raise ValueError("Invalid value for `template`, must not be `None`") # noqa: E501 @@ -178,32 +181,40 @@ def update_strategy(self, update_strategy): :param update_strategy: The update_strategy of this V1DaemonSetSpec. # noqa: E501 - :type: V1DaemonSetUpdateStrategy + :type update_strategy: V1DaemonSetUpdateStrategy """ self._update_strategy = update_strategy - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_daemon_set_status.py b/kubernetes/client/models/v1_daemon_set_status.py index a206077a8e..b0a0a1f1fe 100644 --- a/kubernetes/client/models/v1_daemon_set_status.py +++ b/kubernetes/client/models/v1_daemon_set_status.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -61,7 +64,7 @@ class V1DaemonSetStatus(object): def __init__(self, collision_count=None, conditions=None, current_number_scheduled=None, desired_number_scheduled=None, number_available=None, number_misscheduled=None, number_ready=None, number_unavailable=None, observed_generation=None, updated_number_scheduled=None, local_vars_configuration=None): # noqa: E501 """V1DaemonSetStatus - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._collision_count = None @@ -111,7 +114,7 @@ def collision_count(self, collision_count): Count of hash collisions for the DaemonSet. The DaemonSet controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ControllerRevision. # noqa: E501 :param collision_count: The collision_count of this V1DaemonSetStatus. # noqa: E501 - :type: int + :type collision_count: int """ self._collision_count = collision_count @@ -134,7 +137,7 @@ def conditions(self, conditions): Represents the latest available observations of a DaemonSet's current state. # noqa: E501 :param conditions: The conditions of this V1DaemonSetStatus. # noqa: E501 - :type: list[V1DaemonSetCondition] + :type conditions: list[V1DaemonSetCondition] """ self._conditions = conditions @@ -157,7 +160,7 @@ def current_number_scheduled(self, current_number_scheduled): The number of nodes that are running at least 1 daemon pod and are supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/ # noqa: E501 :param current_number_scheduled: The current_number_scheduled of this V1DaemonSetStatus. # noqa: E501 - :type: int + :type current_number_scheduled: int """ if self.local_vars_configuration.client_side_validation and current_number_scheduled is None: # noqa: E501 raise ValueError("Invalid value for `current_number_scheduled`, must not be `None`") # noqa: E501 @@ -182,7 +185,7 @@ def desired_number_scheduled(self, desired_number_scheduled): The total number of nodes that should be running the daemon pod (including nodes correctly running the daemon pod). More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/ # noqa: E501 :param desired_number_scheduled: The desired_number_scheduled of this V1DaemonSetStatus. # noqa: E501 - :type: int + :type desired_number_scheduled: int """ if self.local_vars_configuration.client_side_validation and desired_number_scheduled is None: # noqa: E501 raise ValueError("Invalid value for `desired_number_scheduled`, must not be `None`") # noqa: E501 @@ -207,7 +210,7 @@ def number_available(self, number_available): The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and available (ready for at least spec.minReadySeconds) # noqa: E501 :param number_available: The number_available of this V1DaemonSetStatus. # noqa: E501 - :type: int + :type number_available: int """ self._number_available = number_available @@ -230,7 +233,7 @@ def number_misscheduled(self, number_misscheduled): The number of nodes that are running the daemon pod, but are not supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/ # noqa: E501 :param number_misscheduled: The number_misscheduled of this V1DaemonSetStatus. # noqa: E501 - :type: int + :type number_misscheduled: int """ if self.local_vars_configuration.client_side_validation and number_misscheduled is None: # noqa: E501 raise ValueError("Invalid value for `number_misscheduled`, must not be `None`") # noqa: E501 @@ -255,7 +258,7 @@ def number_ready(self, number_ready): numberReady is the number of nodes that should be running the daemon pod and have one or more of the daemon pod running with a Ready Condition. # noqa: E501 :param number_ready: The number_ready of this V1DaemonSetStatus. # noqa: E501 - :type: int + :type number_ready: int """ if self.local_vars_configuration.client_side_validation and number_ready is None: # noqa: E501 raise ValueError("Invalid value for `number_ready`, must not be `None`") # noqa: E501 @@ -280,7 +283,7 @@ def number_unavailable(self, number_unavailable): The number of nodes that should be running the daemon pod and have none of the daemon pod running and available (ready for at least spec.minReadySeconds) # noqa: E501 :param number_unavailable: The number_unavailable of this V1DaemonSetStatus. # noqa: E501 - :type: int + :type number_unavailable: int """ self._number_unavailable = number_unavailable @@ -303,7 +306,7 @@ def observed_generation(self, observed_generation): The most recent generation observed by the daemon set controller. # noqa: E501 :param observed_generation: The observed_generation of this V1DaemonSetStatus. # noqa: E501 - :type: int + :type observed_generation: int """ self._observed_generation = observed_generation @@ -326,32 +329,40 @@ def updated_number_scheduled(self, updated_number_scheduled): The total number of nodes that are running updated daemon pod # noqa: E501 :param updated_number_scheduled: The updated_number_scheduled of this V1DaemonSetStatus. # noqa: E501 - :type: int + :type updated_number_scheduled: int """ self._updated_number_scheduled = updated_number_scheduled - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_daemon_set_update_strategy.py b/kubernetes/client/models/v1_daemon_set_update_strategy.py index 65a68c2524..99861bd12b 100644 --- a/kubernetes/client/models/v1_daemon_set_update_strategy.py +++ b/kubernetes/client/models/v1_daemon_set_update_strategy.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -45,7 +48,7 @@ class V1DaemonSetUpdateStrategy(object): def __init__(self, rolling_update=None, type=None, local_vars_configuration=None): # noqa: E501 """V1DaemonSetUpdateStrategy - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._rolling_update = None @@ -73,7 +76,7 @@ def rolling_update(self, rolling_update): :param rolling_update: The rolling_update of this V1DaemonSetUpdateStrategy. # noqa: E501 - :type: V1RollingUpdateDaemonSet + :type rolling_update: V1RollingUpdateDaemonSet """ self._rolling_update = rolling_update @@ -96,32 +99,40 @@ def type(self, type): Type of daemon set update. Can be \"RollingUpdate\" or \"OnDelete\". Default is RollingUpdate. # noqa: E501 :param type: The type of this V1DaemonSetUpdateStrategy. # noqa: E501 - :type: str + :type type: str """ self._type = type - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_delete_options.py b/kubernetes/client/models/v1_delete_options.py index 23f72b219e..d5e7351a83 100644 --- a/kubernetes/client/models/v1_delete_options.py +++ b/kubernetes/client/models/v1_delete_options.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -36,6 +39,7 @@ class V1DeleteOptions(object): 'api_version': 'str', 'dry_run': 'list[str]', 'grace_period_seconds': 'int', + 'ignore_store_read_error_with_cluster_breaking_potential': 'bool', 'kind': 'str', 'orphan_dependents': 'bool', 'preconditions': 'V1Preconditions', @@ -46,21 +50,23 @@ class V1DeleteOptions(object): 'api_version': 'apiVersion', 'dry_run': 'dryRun', 'grace_period_seconds': 'gracePeriodSeconds', + 'ignore_store_read_error_with_cluster_breaking_potential': 'ignoreStoreReadErrorWithClusterBreakingPotential', 'kind': 'kind', 'orphan_dependents': 'orphanDependents', 'preconditions': 'preconditions', 'propagation_policy': 'propagationPolicy' } - def __init__(self, api_version=None, dry_run=None, grace_period_seconds=None, kind=None, orphan_dependents=None, preconditions=None, propagation_policy=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, api_version=None, dry_run=None, grace_period_seconds=None, ignore_store_read_error_with_cluster_breaking_potential=None, kind=None, orphan_dependents=None, preconditions=None, propagation_policy=None, local_vars_configuration=None): # noqa: E501 """V1DeleteOptions - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._api_version = None self._dry_run = None self._grace_period_seconds = None + self._ignore_store_read_error_with_cluster_breaking_potential = None self._kind = None self._orphan_dependents = None self._preconditions = None @@ -73,6 +79,8 @@ def __init__(self, api_version=None, dry_run=None, grace_period_seconds=None, ki self.dry_run = dry_run if grace_period_seconds is not None: self.grace_period_seconds = grace_period_seconds + if ignore_store_read_error_with_cluster_breaking_potential is not None: + self.ignore_store_read_error_with_cluster_breaking_potential = ignore_store_read_error_with_cluster_breaking_potential if kind is not None: self.kind = kind if orphan_dependents is not None: @@ -100,7 +108,7 @@ def api_version(self, api_version): APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501 :param api_version: The api_version of this V1DeleteOptions. # noqa: E501 - :type: str + :type api_version: str """ self._api_version = api_version @@ -123,7 +131,7 @@ def dry_run(self, dry_run): When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed # noqa: E501 :param dry_run: The dry_run of this V1DeleteOptions. # noqa: E501 - :type: list[str] + :type dry_run: list[str] """ self._dry_run = dry_run @@ -146,11 +154,34 @@ def grace_period_seconds(self, grace_period_seconds): The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. # noqa: E501 :param grace_period_seconds: The grace_period_seconds of this V1DeleteOptions. # noqa: E501 - :type: int + :type grace_period_seconds: int """ self._grace_period_seconds = grace_period_seconds + @property + def ignore_store_read_error_with_cluster_breaking_potential(self): + """Gets the ignore_store_read_error_with_cluster_breaking_potential of this V1DeleteOptions. # noqa: E501 + + if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it # noqa: E501 + + :return: The ignore_store_read_error_with_cluster_breaking_potential of this V1DeleteOptions. # noqa: E501 + :rtype: bool + """ + return self._ignore_store_read_error_with_cluster_breaking_potential + + @ignore_store_read_error_with_cluster_breaking_potential.setter + def ignore_store_read_error_with_cluster_breaking_potential(self, ignore_store_read_error_with_cluster_breaking_potential): + """Sets the ignore_store_read_error_with_cluster_breaking_potential of this V1DeleteOptions. + + if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it # noqa: E501 + + :param ignore_store_read_error_with_cluster_breaking_potential: The ignore_store_read_error_with_cluster_breaking_potential of this V1DeleteOptions. # noqa: E501 + :type ignore_store_read_error_with_cluster_breaking_potential: bool + """ + + self._ignore_store_read_error_with_cluster_breaking_potential = ignore_store_read_error_with_cluster_breaking_potential + @property def kind(self): """Gets the kind of this V1DeleteOptions. # noqa: E501 @@ -169,7 +200,7 @@ def kind(self, kind): Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501 :param kind: The kind of this V1DeleteOptions. # noqa: E501 - :type: str + :type kind: str """ self._kind = kind @@ -192,7 +223,7 @@ def orphan_dependents(self, orphan_dependents): Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. # noqa: E501 :param orphan_dependents: The orphan_dependents of this V1DeleteOptions. # noqa: E501 - :type: bool + :type orphan_dependents: bool """ self._orphan_dependents = orphan_dependents @@ -213,7 +244,7 @@ def preconditions(self, preconditions): :param preconditions: The preconditions of this V1DeleteOptions. # noqa: E501 - :type: V1Preconditions + :type preconditions: V1Preconditions """ self._preconditions = preconditions @@ -236,32 +267,40 @@ def propagation_policy(self, propagation_policy): Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. # noqa: E501 :param propagation_policy: The propagation_policy of this V1DeleteOptions. # noqa: E501 - :type: str + :type propagation_policy: str """ self._propagation_policy = propagation_policy - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_deployment.py b/kubernetes/client/models/v1_deployment.py index 4ad73897c5..1aa68c81ef 100644 --- a/kubernetes/client/models/v1_deployment.py +++ b/kubernetes/client/models/v1_deployment.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -51,7 +54,7 @@ class V1Deployment(object): def __init__(self, api_version=None, kind=None, metadata=None, spec=None, status=None, local_vars_configuration=None): # noqa: E501 """V1Deployment - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._api_version = None @@ -90,7 +93,7 @@ def api_version(self, api_version): APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501 :param api_version: The api_version of this V1Deployment. # noqa: E501 - :type: str + :type api_version: str """ self._api_version = api_version @@ -113,7 +116,7 @@ def kind(self, kind): Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501 :param kind: The kind of this V1Deployment. # noqa: E501 - :type: str + :type kind: str """ self._kind = kind @@ -134,7 +137,7 @@ def metadata(self, metadata): :param metadata: The metadata of this V1Deployment. # noqa: E501 - :type: V1ObjectMeta + :type metadata: V1ObjectMeta """ self._metadata = metadata @@ -155,7 +158,7 @@ def spec(self, spec): :param spec: The spec of this V1Deployment. # noqa: E501 - :type: V1DeploymentSpec + :type spec: V1DeploymentSpec """ self._spec = spec @@ -176,32 +179,40 @@ def status(self, status): :param status: The status of this V1Deployment. # noqa: E501 - :type: V1DeploymentStatus + :type status: V1DeploymentStatus """ self._status = status - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_deployment_condition.py b/kubernetes/client/models/v1_deployment_condition.py index af732022b6..6109a6825e 100644 --- a/kubernetes/client/models/v1_deployment_condition.py +++ b/kubernetes/client/models/v1_deployment_condition.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -53,7 +56,7 @@ class V1DeploymentCondition(object): def __init__(self, last_transition_time=None, last_update_time=None, message=None, reason=None, status=None, type=None, local_vars_configuration=None): # noqa: E501 """V1DeploymentCondition - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._last_transition_time = None @@ -93,7 +96,7 @@ def last_transition_time(self, last_transition_time): Last time the condition transitioned from one status to another. # noqa: E501 :param last_transition_time: The last_transition_time of this V1DeploymentCondition. # noqa: E501 - :type: datetime + :type last_transition_time: datetime """ self._last_transition_time = last_transition_time @@ -116,7 +119,7 @@ def last_update_time(self, last_update_time): The last time this condition was updated. # noqa: E501 :param last_update_time: The last_update_time of this V1DeploymentCondition. # noqa: E501 - :type: datetime + :type last_update_time: datetime """ self._last_update_time = last_update_time @@ -139,7 +142,7 @@ def message(self, message): A human readable message indicating details about the transition. # noqa: E501 :param message: The message of this V1DeploymentCondition. # noqa: E501 - :type: str + :type message: str """ self._message = message @@ -162,7 +165,7 @@ def reason(self, reason): The reason for the condition's last transition. # noqa: E501 :param reason: The reason of this V1DeploymentCondition. # noqa: E501 - :type: str + :type reason: str """ self._reason = reason @@ -185,7 +188,7 @@ def status(self, status): Status of the condition, one of True, False, Unknown. # noqa: E501 :param status: The status of this V1DeploymentCondition. # noqa: E501 - :type: str + :type status: str """ if self.local_vars_configuration.client_side_validation and status is None: # noqa: E501 raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 @@ -210,34 +213,42 @@ def type(self, type): Type of deployment condition. # noqa: E501 :param type: The type of this V1DeploymentCondition. # noqa: E501 - :type: str + :type type: str """ if self.local_vars_configuration.client_side_validation and type is None: # noqa: E501 raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 self._type = type - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_deployment_list.py b/kubernetes/client/models/v1_deployment_list.py index 84df854d2e..ea2a20fdd4 100644 --- a/kubernetes/client/models/v1_deployment_list.py +++ b/kubernetes/client/models/v1_deployment_list.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -49,7 +52,7 @@ class V1DeploymentList(object): def __init__(self, api_version=None, items=None, kind=None, metadata=None, local_vars_configuration=None): # noqa: E501 """V1DeploymentList - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._api_version = None @@ -84,7 +87,7 @@ def api_version(self, api_version): APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501 :param api_version: The api_version of this V1DeploymentList. # noqa: E501 - :type: str + :type api_version: str """ self._api_version = api_version @@ -107,7 +110,7 @@ def items(self, items): Items is the list of Deployments. # noqa: E501 :param items: The items of this V1DeploymentList. # noqa: E501 - :type: list[V1Deployment] + :type items: list[V1Deployment] """ if self.local_vars_configuration.client_side_validation and items is None: # noqa: E501 raise ValueError("Invalid value for `items`, must not be `None`") # noqa: E501 @@ -132,7 +135,7 @@ def kind(self, kind): Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501 :param kind: The kind of this V1DeploymentList. # noqa: E501 - :type: str + :type kind: str """ self._kind = kind @@ -153,32 +156,40 @@ def metadata(self, metadata): :param metadata: The metadata of this V1DeploymentList. # noqa: E501 - :type: V1ListMeta + :type metadata: V1ListMeta """ self._metadata = metadata - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_deployment_spec.py b/kubernetes/client/models/v1_deployment_spec.py index b509d1be98..829f54c79c 100644 --- a/kubernetes/client/models/v1_deployment_spec.py +++ b/kubernetes/client/models/v1_deployment_spec.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -57,7 +60,7 @@ class V1DeploymentSpec(object): def __init__(self, min_ready_seconds=None, paused=None, progress_deadline_seconds=None, replicas=None, revision_history_limit=None, selector=None, strategy=None, template=None, local_vars_configuration=None): # noqa: E501 """V1DeploymentSpec - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._min_ready_seconds = None @@ -103,7 +106,7 @@ def min_ready_seconds(self, min_ready_seconds): Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready) # noqa: E501 :param min_ready_seconds: The min_ready_seconds of this V1DeploymentSpec. # noqa: E501 - :type: int + :type min_ready_seconds: int """ self._min_ready_seconds = min_ready_seconds @@ -126,7 +129,7 @@ def paused(self, paused): Indicates that the deployment is paused. # noqa: E501 :param paused: The paused of this V1DeploymentSpec. # noqa: E501 - :type: bool + :type paused: bool """ self._paused = paused @@ -149,7 +152,7 @@ def progress_deadline_seconds(self, progress_deadline_seconds): The maximum time in seconds for a deployment to make progress before it is considered to be failed. The deployment controller will continue to process failed deployments and a condition with a ProgressDeadlineExceeded reason will be surfaced in the deployment status. Note that progress will not be estimated during the time a deployment is paused. Defaults to 600s. # noqa: E501 :param progress_deadline_seconds: The progress_deadline_seconds of this V1DeploymentSpec. # noqa: E501 - :type: int + :type progress_deadline_seconds: int """ self._progress_deadline_seconds = progress_deadline_seconds @@ -172,7 +175,7 @@ def replicas(self, replicas): Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1. # noqa: E501 :param replicas: The replicas of this V1DeploymentSpec. # noqa: E501 - :type: int + :type replicas: int """ self._replicas = replicas @@ -195,7 +198,7 @@ def revision_history_limit(self, revision_history_limit): The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 10. # noqa: E501 :param revision_history_limit: The revision_history_limit of this V1DeploymentSpec. # noqa: E501 - :type: int + :type revision_history_limit: int """ self._revision_history_limit = revision_history_limit @@ -216,7 +219,7 @@ def selector(self, selector): :param selector: The selector of this V1DeploymentSpec. # noqa: E501 - :type: V1LabelSelector + :type selector: V1LabelSelector """ if self.local_vars_configuration.client_side_validation and selector is None: # noqa: E501 raise ValueError("Invalid value for `selector`, must not be `None`") # noqa: E501 @@ -239,7 +242,7 @@ def strategy(self, strategy): :param strategy: The strategy of this V1DeploymentSpec. # noqa: E501 - :type: V1DeploymentStrategy + :type strategy: V1DeploymentStrategy """ self._strategy = strategy @@ -260,34 +263,42 @@ def template(self, template): :param template: The template of this V1DeploymentSpec. # noqa: E501 - :type: V1PodTemplateSpec + :type template: V1PodTemplateSpec """ if self.local_vars_configuration.client_side_validation and template is None: # noqa: E501 raise ValueError("Invalid value for `template`, must not be `None`") # noqa: E501 self._template = template - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_deployment_status.py b/kubernetes/client/models/v1_deployment_status.py index 46cb4ea4a0..312a8d406d 100644 --- a/kubernetes/client/models/v1_deployment_status.py +++ b/kubernetes/client/models/v1_deployment_status.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -39,6 +42,7 @@ class V1DeploymentStatus(object): 'observed_generation': 'int', 'ready_replicas': 'int', 'replicas': 'int', + 'terminating_replicas': 'int', 'unavailable_replicas': 'int', 'updated_replicas': 'int' } @@ -50,14 +54,15 @@ class V1DeploymentStatus(object): 'observed_generation': 'observedGeneration', 'ready_replicas': 'readyReplicas', 'replicas': 'replicas', + 'terminating_replicas': 'terminatingReplicas', 'unavailable_replicas': 'unavailableReplicas', 'updated_replicas': 'updatedReplicas' } - def __init__(self, available_replicas=None, collision_count=None, conditions=None, observed_generation=None, ready_replicas=None, replicas=None, unavailable_replicas=None, updated_replicas=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, available_replicas=None, collision_count=None, conditions=None, observed_generation=None, ready_replicas=None, replicas=None, terminating_replicas=None, unavailable_replicas=None, updated_replicas=None, local_vars_configuration=None): # noqa: E501 """V1DeploymentStatus - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._available_replicas = None @@ -66,6 +71,7 @@ def __init__(self, available_replicas=None, collision_count=None, conditions=Non self._observed_generation = None self._ready_replicas = None self._replicas = None + self._terminating_replicas = None self._unavailable_replicas = None self._updated_replicas = None self.discriminator = None @@ -82,6 +88,8 @@ def __init__(self, available_replicas=None, collision_count=None, conditions=Non self.ready_replicas = ready_replicas if replicas is not None: self.replicas = replicas + if terminating_replicas is not None: + self.terminating_replicas = terminating_replicas if unavailable_replicas is not None: self.unavailable_replicas = unavailable_replicas if updated_replicas is not None: @@ -91,7 +99,7 @@ def __init__(self, available_replicas=None, collision_count=None, conditions=Non def available_replicas(self): """Gets the available_replicas of this V1DeploymentStatus. # noqa: E501 - Total number of available pods (ready for at least minReadySeconds) targeted by this deployment. # noqa: E501 + Total number of available non-terminating pods (ready for at least minReadySeconds) targeted by this deployment. # noqa: E501 :return: The available_replicas of this V1DeploymentStatus. # noqa: E501 :rtype: int @@ -102,10 +110,10 @@ def available_replicas(self): def available_replicas(self, available_replicas): """Sets the available_replicas of this V1DeploymentStatus. - Total number of available pods (ready for at least minReadySeconds) targeted by this deployment. # noqa: E501 + Total number of available non-terminating pods (ready for at least minReadySeconds) targeted by this deployment. # noqa: E501 :param available_replicas: The available_replicas of this V1DeploymentStatus. # noqa: E501 - :type: int + :type available_replicas: int """ self._available_replicas = available_replicas @@ -128,7 +136,7 @@ def collision_count(self, collision_count): Count of hash collisions for the Deployment. The Deployment controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ReplicaSet. # noqa: E501 :param collision_count: The collision_count of this V1DeploymentStatus. # noqa: E501 - :type: int + :type collision_count: int """ self._collision_count = collision_count @@ -151,7 +159,7 @@ def conditions(self, conditions): Represents the latest available observations of a deployment's current state. # noqa: E501 :param conditions: The conditions of this V1DeploymentStatus. # noqa: E501 - :type: list[V1DeploymentCondition] + :type conditions: list[V1DeploymentCondition] """ self._conditions = conditions @@ -174,7 +182,7 @@ def observed_generation(self, observed_generation): The generation observed by the deployment controller. # noqa: E501 :param observed_generation: The observed_generation of this V1DeploymentStatus. # noqa: E501 - :type: int + :type observed_generation: int """ self._observed_generation = observed_generation @@ -183,7 +191,7 @@ def observed_generation(self, observed_generation): def ready_replicas(self): """Gets the ready_replicas of this V1DeploymentStatus. # noqa: E501 - readyReplicas is the number of pods targeted by this Deployment with a Ready Condition. # noqa: E501 + Total number of non-terminating pods targeted by this Deployment with a Ready Condition. # noqa: E501 :return: The ready_replicas of this V1DeploymentStatus. # noqa: E501 :rtype: int @@ -194,10 +202,10 @@ def ready_replicas(self): def ready_replicas(self, ready_replicas): """Sets the ready_replicas of this V1DeploymentStatus. - readyReplicas is the number of pods targeted by this Deployment with a Ready Condition. # noqa: E501 + Total number of non-terminating pods targeted by this Deployment with a Ready Condition. # noqa: E501 :param ready_replicas: The ready_replicas of this V1DeploymentStatus. # noqa: E501 - :type: int + :type ready_replicas: int """ self._ready_replicas = ready_replicas @@ -206,7 +214,7 @@ def ready_replicas(self, ready_replicas): def replicas(self): """Gets the replicas of this V1DeploymentStatus. # noqa: E501 - Total number of non-terminated pods targeted by this deployment (their labels match the selector). # noqa: E501 + Total number of non-terminating pods targeted by this deployment (their labels match the selector). # noqa: E501 :return: The replicas of this V1DeploymentStatus. # noqa: E501 :rtype: int @@ -217,14 +225,37 @@ def replicas(self): def replicas(self, replicas): """Sets the replicas of this V1DeploymentStatus. - Total number of non-terminated pods targeted by this deployment (their labels match the selector). # noqa: E501 + Total number of non-terminating pods targeted by this deployment (their labels match the selector). # noqa: E501 :param replicas: The replicas of this V1DeploymentStatus. # noqa: E501 - :type: int + :type replicas: int """ self._replicas = replicas + @property + def terminating_replicas(self): + """Gets the terminating_replicas of this V1DeploymentStatus. # noqa: E501 + + Total number of terminating pods targeted by this deployment. Terminating pods have a non-null .metadata.deletionTimestamp and have not yet reached the Failed or Succeeded .status.phase. This is a beta field and requires enabling DeploymentReplicaSetTerminatingReplicas feature (enabled by default). # noqa: E501 + + :return: The terminating_replicas of this V1DeploymentStatus. # noqa: E501 + :rtype: int + """ + return self._terminating_replicas + + @terminating_replicas.setter + def terminating_replicas(self, terminating_replicas): + """Sets the terminating_replicas of this V1DeploymentStatus. + + Total number of terminating pods targeted by this deployment. Terminating pods have a non-null .metadata.deletionTimestamp and have not yet reached the Failed or Succeeded .status.phase. This is a beta field and requires enabling DeploymentReplicaSetTerminatingReplicas feature (enabled by default). # noqa: E501 + + :param terminating_replicas: The terminating_replicas of this V1DeploymentStatus. # noqa: E501 + :type terminating_replicas: int + """ + + self._terminating_replicas = terminating_replicas + @property def unavailable_replicas(self): """Gets the unavailable_replicas of this V1DeploymentStatus. # noqa: E501 @@ -243,7 +274,7 @@ def unavailable_replicas(self, unavailable_replicas): Total number of unavailable pods targeted by this deployment. This is the total number of pods that are still required for the deployment to have 100% available capacity. They may either be pods that are running but not yet available or pods that still have not been created. # noqa: E501 :param unavailable_replicas: The unavailable_replicas of this V1DeploymentStatus. # noqa: E501 - :type: int + :type unavailable_replicas: int """ self._unavailable_replicas = unavailable_replicas @@ -252,7 +283,7 @@ def unavailable_replicas(self, unavailable_replicas): def updated_replicas(self): """Gets the updated_replicas of this V1DeploymentStatus. # noqa: E501 - Total number of non-terminated pods targeted by this deployment that have the desired template spec. # noqa: E501 + Total number of non-terminating pods targeted by this deployment that have the desired template spec. # noqa: E501 :return: The updated_replicas of this V1DeploymentStatus. # noqa: E501 :rtype: int @@ -263,35 +294,43 @@ def updated_replicas(self): def updated_replicas(self, updated_replicas): """Sets the updated_replicas of this V1DeploymentStatus. - Total number of non-terminated pods targeted by this deployment that have the desired template spec. # noqa: E501 + Total number of non-terminating pods targeted by this deployment that have the desired template spec. # noqa: E501 :param updated_replicas: The updated_replicas of this V1DeploymentStatus. # noqa: E501 - :type: int + :type updated_replicas: int """ self._updated_replicas = updated_replicas - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_deployment_strategy.py b/kubernetes/client/models/v1_deployment_strategy.py index d9b8b3d4ec..5fdc774c1c 100644 --- a/kubernetes/client/models/v1_deployment_strategy.py +++ b/kubernetes/client/models/v1_deployment_strategy.py @@ -5,14 +5,17 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - The version of the OpenAPI document: release-1.30 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec import pprint import re # noqa: F401 - import six from kubernetes.client.configuration import Configuration @@ -45,7 +48,7 @@ class V1DeploymentStrategy(object): def __init__(self, rolling_update=None, type=None, local_vars_configuration=None): # noqa: E501 """V1DeploymentStrategy - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: - local_vars_configuration = Configuration() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._rolling_update = None @@ -73,7 +76,7 @@ def rolling_update(self, rolling_update): :param rolling_update: The rolling_update of this V1DeploymentStrategy. # noqa: E501 - :type: V1RollingUpdateDeployment + :type rolling_update: V1RollingUpdateDeployment """ self._rolling_update = rolling_update @@ -96,32 +99,40 @@ def type(self, type): Type of deployment. Can be \"Recreate\" or \"RollingUpdate\". Default is RollingUpdate. # noqa: E501 :param type: The type of this V1DeploymentStrategy. # noqa: E501 - :type: str + :type type: str """ self._type = type - def to_dict(self): + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + lambda x: convert(x), value )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, + lambda item: (item[0], convert(item[1])), value.items() )) else: - result[attr] = value + result[attr] = convert(value) return result diff --git a/kubernetes/client/models/v1_device.py b/kubernetes/client/models/v1_device.py new file mode 100644 index 0000000000..abf8b19044 --- /dev/null +++ b/kubernetes/client/models/v1_device.py @@ -0,0 +1,440 @@ +# coding: utf-8 + +""" + Kubernetes + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: release-1.35 + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from kubernetes.client.configuration import Configuration + + +class V1Device(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'all_nodes': 'bool', + 'allow_multiple_allocations': 'bool', + 'attributes': 'dict[str, V1DeviceAttribute]', + 'binding_conditions': 'list[str]', + 'binding_failure_conditions': 'list[str]', + 'binds_to_node': 'bool', + 'capacity': 'dict[str, V1DeviceCapacity]', + 'consumes_counters': 'list[V1DeviceCounterConsumption]', + 'name': 'str', + 'node_name': 'str', + 'node_selector': 'V1NodeSelector', + 'taints': 'list[V1DeviceTaint]' + } + + attribute_map = { + 'all_nodes': 'allNodes', + 'allow_multiple_allocations': 'allowMultipleAllocations', + 'attributes': 'attributes', + 'binding_conditions': 'bindingConditions', + 'binding_failure_conditions': 'bindingFailureConditions', + 'binds_to_node': 'bindsToNode', + 'capacity': 'capacity', + 'consumes_counters': 'consumesCounters', + 'name': 'name', + 'node_name': 'nodeName', + 'node_selector': 'nodeSelector', + 'taints': 'taints' + } + + def __init__(self, all_nodes=None, allow_multiple_allocations=None, attributes=None, binding_conditions=None, binding_failure_conditions=None, binds_to_node=None, capacity=None, consumes_counters=None, name=None, node_name=None, node_selector=None, taints=None, local_vars_configuration=None): # noqa: E501 + """V1Device - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._all_nodes = None + self._allow_multiple_allocations = None + self._attributes = None + self._binding_conditions = None + self._binding_failure_conditions = None + self._binds_to_node = None + self._capacity = None + self._consumes_counters = None + self._name = None + self._node_name = None + self._node_selector = None + self._taints = None + self.discriminator = None + + if all_nodes is not None: + self.all_nodes = all_nodes + if allow_multiple_allocations is not None: + self.allow_multiple_allocations = allow_multiple_allocations + if attributes is not None: + self.attributes = attributes + if binding_conditions is not None: + self.binding_conditions = binding_conditions + if binding_failure_conditions is not None: + self.binding_failure_conditions = binding_failure_conditions + if binds_to_node is not None: + self.binds_to_node = binds_to_node + if capacity is not None: + self.capacity = capacity + if consumes_counters is not None: + self.consumes_counters = consumes_counters + self.name = name + if node_name is not None: + self.node_name = node_name + if node_selector is not None: + self.node_selector = node_selector + if taints is not None: + self.taints = taints + + @property + def all_nodes(self): + """Gets the all_nodes of this V1Device. # noqa: E501 + + AllNodes indicates that all nodes have access to the device. Must only be set if Spec.PerDeviceNodeSelection is set to true. At most one of NodeName, NodeSelector and AllNodes can be set. # noqa: E501 + + :return: The all_nodes of this V1Device. # noqa: E501 + :rtype: bool + """ + return self._all_nodes + + @all_nodes.setter + def all_nodes(self, all_nodes): + """Sets the all_nodes of this V1Device. + + AllNodes indicates that all nodes have access to the device. Must only be set if Spec.PerDeviceNodeSelection is set to true. At most one of NodeName, NodeSelector and AllNodes can be set. # noqa: E501 + + :param all_nodes: The all_nodes of this V1Device. # noqa: E501 + :type all_nodes: bool + """ + + self._all_nodes = all_nodes + + @property + def allow_multiple_allocations(self): + """Gets the allow_multiple_allocations of this V1Device. # noqa: E501 + + AllowMultipleAllocations marks whether the device is allowed to be allocated to multiple DeviceRequests. If AllowMultipleAllocations is set to true, the device can be allocated more than once, and all of its capacity is consumable, regardless of whether the requestPolicy is defined or not. # noqa: E501 + + :return: The allow_multiple_allocations of this V1Device. # noqa: E501 + :rtype: bool + """ + return self._allow_multiple_allocations + + @allow_multiple_allocations.setter + def allow_multiple_allocations(self, allow_multiple_allocations): + """Sets the allow_multiple_allocations of this V1Device. + + AllowMultipleAllocations marks whether the device is allowed to be allocated to multiple DeviceRequests. If AllowMultipleAllocations is set to true, the device can be allocated more than once, and all of its capacity is consumable, regardless of whether the requestPolicy is defined or not. # noqa: E501 + + :param allow_multiple_allocations: The allow_multiple_allocations of this V1Device. # noqa: E501 + :type allow_multiple_allocations: bool + """ + + self._allow_multiple_allocations = allow_multiple_allocations + + @property + def attributes(self): + """Gets the attributes of this V1Device. # noqa: E501 + + Attributes defines the set of attributes for this device. The name of each attribute must be unique in that set. The maximum number of attributes and capacities combined is 32. # noqa: E501 + + :return: The attributes of this V1Device. # noqa: E501 + :rtype: dict[str, V1DeviceAttribute] + """ + return self._attributes + + @attributes.setter + def attributes(self, attributes): + """Sets the attributes of this V1Device. + + Attributes defines the set of attributes for this device. The name of each attribute must be unique in that set. The maximum number of attributes and capacities combined is 32. # noqa: E501 + + :param attributes: The attributes of this V1Device. # noqa: E501 + :type attributes: dict[str, V1DeviceAttribute] + """ + + self._attributes = attributes + + @property + def binding_conditions(self): + """Gets the binding_conditions of this V1Device. # noqa: E501 + + BindingConditions defines the conditions for proceeding with binding. All of these conditions must be set in the per-device status conditions with a value of True to proceed with binding the pod to the node while scheduling the pod. The maximum number of binding conditions is 4. The conditions must be a valid condition type string. This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gates. # noqa: E501 + + :return: The binding_conditions of this V1Device. # noqa: E501 + :rtype: list[str] + """ + return self._binding_conditions + + @binding_conditions.setter + def binding_conditions(self, binding_conditions): + """Sets the binding_conditions of this V1Device. + + BindingConditions defines the conditions for proceeding with binding. All of these conditions must be set in the per-device status conditions with a value of True to proceed with binding the pod to the node while scheduling the pod. The maximum number of binding conditions is 4. The conditions must be a valid condition type string. This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gates. # noqa: E501 + + :param binding_conditions: The binding_conditions of this V1Device. # noqa: E501 + :type binding_conditions: list[str] + """ + + self._binding_conditions = binding_conditions + + @property + def binding_failure_conditions(self): + """Gets the binding_failure_conditions of this V1Device. # noqa: E501 + + BindingFailureConditions defines the conditions for binding failure. They may be set in the per-device status conditions. If any is set to \"True\", a binding failure occurred. The maximum number of binding failure conditions is 4. The conditions must be a valid condition type string. This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gates. # noqa: E501 + + :return: The binding_failure_conditions of this V1Device. # noqa: E501 + :rtype: list[str] + """ + return self._binding_failure_conditions + + @binding_failure_conditions.setter + def binding_failure_conditions(self, binding_failure_conditions): + """Sets the binding_failure_conditions of this V1Device. + + BindingFailureConditions defines the conditions for binding failure. They may be set in the per-device status conditions. If any is set to \"True\", a binding failure occurred. The maximum number of binding failure conditions is 4. The conditions must be a valid condition type string. This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gates. # noqa: E501 + + :param binding_failure_conditions: The binding_failure_conditions of this V1Device. # noqa: E501 + :type binding_failure_conditions: list[str] + """ + + self._binding_failure_conditions = binding_failure_conditions + + @property + def binds_to_node(self): + """Gets the binds_to_node of this V1Device. # noqa: E501 + + BindsToNode indicates if the usage of an allocation involving this device has to be limited to exactly the node that was chosen when allocating the claim. If set to true, the scheduler will set the ResourceClaim.Status.Allocation.NodeSelector to match the node where the allocation was made. This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gates. # noqa: E501 + + :return: The binds_to_node of this V1Device. # noqa: E501 + :rtype: bool + """ + return self._binds_to_node + + @binds_to_node.setter + def binds_to_node(self, binds_to_node): + """Sets the binds_to_node of this V1Device. + + BindsToNode indicates if the usage of an allocation involving this device has to be limited to exactly the node that was chosen when allocating the claim. If set to true, the scheduler will set the ResourceClaim.Status.Allocation.NodeSelector to match the node where the allocation was made. This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gates. # noqa: E501 + + :param binds_to_node: The binds_to_node of this V1Device. # noqa: E501 + :type binds_to_node: bool + """ + + self._binds_to_node = binds_to_node + + @property + def capacity(self): + """Gets the capacity of this V1Device. # noqa: E501 + + Capacity defines the set of capacities for this device. The name of each capacity must be unique in that set. The maximum number of attributes and capacities combined is 32. # noqa: E501 + + :return: The capacity of this V1Device. # noqa: E501 + :rtype: dict[str, V1DeviceCapacity] + """ + return self._capacity + + @capacity.setter + def capacity(self, capacity): + """Sets the capacity of this V1Device. + + Capacity defines the set of capacities for this device. The name of each capacity must be unique in that set. The maximum number of attributes and capacities combined is 32. # noqa: E501 + + :param capacity: The capacity of this V1Device. # noqa: E501 + :type capacity: dict[str, V1DeviceCapacity] + """ + + self._capacity = capacity + + @property + def consumes_counters(self): + """Gets the consumes_counters of this V1Device. # noqa: E501 + + ConsumesCounters defines a list of references to sharedCounters and the set of counters that the device will consume from those counter sets. There can only be a single entry per counterSet. The maximum number of device counter consumptions per device is 2. # noqa: E501 + + :return: The consumes_counters of this V1Device. # noqa: E501 + :rtype: list[V1DeviceCounterConsumption] + """ + return self._consumes_counters + + @consumes_counters.setter + def consumes_counters(self, consumes_counters): + """Sets the consumes_counters of this V1Device. + + ConsumesCounters defines a list of references to sharedCounters and the set of counters that the device will consume from those counter sets. There can only be a single entry per counterSet. The maximum number of device counter consumptions per device is 2. # noqa: E501 + + :param consumes_counters: The consumes_counters of this V1Device. # noqa: E501 + :type consumes_counters: list[V1DeviceCounterConsumption] + """ + + self._consumes_counters = consumes_counters + + @property + def name(self): + """Gets the name of this V1Device. # noqa: E501 + + Name is unique identifier among all devices managed by the driver in the pool. It must be a DNS label. # noqa: E501 + + :return: The name of this V1Device. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this V1Device. + + Name is unique identifier among all devices managed by the driver in the pool. It must be a DNS label. # noqa: E501 + + :param name: The name of this V1Device. # noqa: E501 + :type name: str + """ + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def node_name(self): + """Gets the node_name of this V1Device. # noqa: E501 + + NodeName identifies the node where the device is available. Must only be set if Spec.PerDeviceNodeSelection is set to true. At most one of NodeName, NodeSelector and AllNodes can be set. # noqa: E501 + + :return: The node_name of this V1Device. # noqa: E501 + :rtype: str + """ + return self._node_name + + @node_name.setter + def node_name(self, node_name): + """Sets the node_name of this V1Device. + + NodeName identifies the node where the device is available. Must only be set if Spec.PerDeviceNodeSelection is set to true. At most one of NodeName, NodeSelector and AllNodes can be set. # noqa: E501 + + :param node_name: The node_name of this V1Device. # noqa: E501 + :type node_name: str + """ + + self._node_name = node_name + + @property + def node_selector(self): + """Gets the node_selector of this V1Device. # noqa: E501 + + + :return: The node_selector of this V1Device. # noqa: E501 + :rtype: V1NodeSelector + """ + return self._node_selector + + @node_selector.setter + def node_selector(self, node_selector): + """Sets the node_selector of this V1Device. + + + :param node_selector: The node_selector of this V1Device. # noqa: E501 + :type node_selector: V1NodeSelector + """ + + self._node_selector = node_selector + + @property + def taints(self): + """Gets the taints of this V1Device. # noqa: E501 + + If specified, these are the driver-defined taints. The maximum number of taints is 16. If taints are set for any device in a ResourceSlice, then the maximum number of allowed devices per ResourceSlice is 64 instead of 128. This is an alpha field and requires enabling the DRADeviceTaints feature gate. # noqa: E501 + + :return: The taints of this V1Device. # noqa: E501 + :rtype: list[V1DeviceTaint] + """ + return self._taints + + @taints.setter + def taints(self, taints): + """Sets the taints of this V1Device. + + If specified, these are the driver-defined taints. The maximum number of taints is 16. If taints are set for any device in a ResourceSlice, then the maximum number of allowed devices per ResourceSlice is 64 instead of 128. This is an alpha field and requires enabling the DRADeviceTaints feature gate. # noqa: E501 + + :param taints: The taints of this V1Device. # noqa: E501 + :type taints: list[V1DeviceTaint] + """ + + self._taints = taints + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1Device): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1Device): + return True + + return self.to_dict() != other.to_dict() diff --git a/kubernetes/client/models/v1_device_allocation_configuration.py b/kubernetes/client/models/v1_device_allocation_configuration.py new file mode 100644 index 0000000000..5b1d630d3e --- /dev/null +++ b/kubernetes/client/models/v1_device_allocation_configuration.py @@ -0,0 +1,188 @@ +# coding: utf-8 + +""" + Kubernetes + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: release-1.35 + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from kubernetes.client.configuration import Configuration + + +class V1DeviceAllocationConfiguration(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'opaque': 'V1OpaqueDeviceConfiguration', + 'requests': 'list[str]', + 'source': 'str' + } + + attribute_map = { + 'opaque': 'opaque', + 'requests': 'requests', + 'source': 'source' + } + + def __init__(self, opaque=None, requests=None, source=None, local_vars_configuration=None): # noqa: E501 + """V1DeviceAllocationConfiguration - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._opaque = None + self._requests = None + self._source = None + self.discriminator = None + + if opaque is not None: + self.opaque = opaque + if requests is not None: + self.requests = requests + self.source = source + + @property + def opaque(self): + """Gets the opaque of this V1DeviceAllocationConfiguration. # noqa: E501 + + + :return: The opaque of this V1DeviceAllocationConfiguration. # noqa: E501 + :rtype: V1OpaqueDeviceConfiguration + """ + return self._opaque + + @opaque.setter + def opaque(self, opaque): + """Sets the opaque of this V1DeviceAllocationConfiguration. + + + :param opaque: The opaque of this V1DeviceAllocationConfiguration. # noqa: E501 + :type opaque: V1OpaqueDeviceConfiguration + """ + + self._opaque = opaque + + @property + def requests(self): + """Gets the requests of this V1DeviceAllocationConfiguration. # noqa: E501 + + Requests lists the names of requests where the configuration applies. If empty, its applies to all requests. References to subrequests must include the name of the main request and may include the subrequest using the format
[/]. If just the main request is given, the configuration applies to all subrequests. # noqa: E501 + + :return: The requests of this V1DeviceAllocationConfiguration. # noqa: E501 + :rtype: list[str] + """ + return self._requests + + @requests.setter + def requests(self, requests): + """Sets the requests of this V1DeviceAllocationConfiguration. + + Requests lists the names of requests where the configuration applies. If empty, its applies to all requests. References to subrequests must include the name of the main request and may include the subrequest using the format
[/]. If just the main request is given, the configuration applies to all subrequests. # noqa: E501 + + :param requests: The requests of this V1DeviceAllocationConfiguration. # noqa: E501 + :type requests: list[str] + """ + + self._requests = requests + + @property + def source(self): + """Gets the source of this V1DeviceAllocationConfiguration. # noqa: E501 + + Source records whether the configuration comes from a class and thus is not something that a normal user would have been able to set or from a claim. # noqa: E501 + + :return: The source of this V1DeviceAllocationConfiguration. # noqa: E501 + :rtype: str + """ + return self._source + + @source.setter + def source(self, source): + """Sets the source of this V1DeviceAllocationConfiguration. + + Source records whether the configuration comes from a class and thus is not something that a normal user would have been able to set or from a claim. # noqa: E501 + + :param source: The source of this V1DeviceAllocationConfiguration. # noqa: E501 + :type source: str + """ + if self.local_vars_configuration.client_side_validation and source is None: # noqa: E501 + raise ValueError("Invalid value for `source`, must not be `None`") # noqa: E501 + + self._source = source + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1DeviceAllocationConfiguration): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1DeviceAllocationConfiguration): + return True + + return self.to_dict() != other.to_dict() diff --git a/kubernetes/client/models/v1_device_allocation_result.py b/kubernetes/client/models/v1_device_allocation_result.py new file mode 100644 index 0000000000..76d6e195a1 --- /dev/null +++ b/kubernetes/client/models/v1_device_allocation_result.py @@ -0,0 +1,161 @@ +# coding: utf-8 + +""" + Kubernetes + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: release-1.35 + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from kubernetes.client.configuration import Configuration + + +class V1DeviceAllocationResult(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'config': 'list[V1DeviceAllocationConfiguration]', + 'results': 'list[V1DeviceRequestAllocationResult]' + } + + attribute_map = { + 'config': 'config', + 'results': 'results' + } + + def __init__(self, config=None, results=None, local_vars_configuration=None): # noqa: E501 + """V1DeviceAllocationResult - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._config = None + self._results = None + self.discriminator = None + + if config is not None: + self.config = config + if results is not None: + self.results = results + + @property + def config(self): + """Gets the config of this V1DeviceAllocationResult. # noqa: E501 + + This field is a combination of all the claim and class configuration parameters. Drivers can distinguish between those based on a flag. This includes configuration parameters for drivers which have no allocated devices in the result because it is up to the drivers which configuration parameters they support. They can silently ignore unknown configuration parameters. # noqa: E501 + + :return: The config of this V1DeviceAllocationResult. # noqa: E501 + :rtype: list[V1DeviceAllocationConfiguration] + """ + return self._config + + @config.setter + def config(self, config): + """Sets the config of this V1DeviceAllocationResult. + + This field is a combination of all the claim and class configuration parameters. Drivers can distinguish between those based on a flag. This includes configuration parameters for drivers which have no allocated devices in the result because it is up to the drivers which configuration parameters they support. They can silently ignore unknown configuration parameters. # noqa: E501 + + :param config: The config of this V1DeviceAllocationResult. # noqa: E501 + :type config: list[V1DeviceAllocationConfiguration] + """ + + self._config = config + + @property + def results(self): + """Gets the results of this V1DeviceAllocationResult. # noqa: E501 + + Results lists all allocated devices. # noqa: E501 + + :return: The results of this V1DeviceAllocationResult. # noqa: E501 + :rtype: list[V1DeviceRequestAllocationResult] + """ + return self._results + + @results.setter + def results(self, results): + """Sets the results of this V1DeviceAllocationResult. + + Results lists all allocated devices. # noqa: E501 + + :param results: The results of this V1DeviceAllocationResult. # noqa: E501 + :type results: list[V1DeviceRequestAllocationResult] + """ + + self._results = results + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1DeviceAllocationResult): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1DeviceAllocationResult): + return True + + return self.to_dict() != other.to_dict() diff --git a/kubernetes/client/models/v1_device_attribute.py b/kubernetes/client/models/v1_device_attribute.py new file mode 100644 index 0000000000..c681e6886c --- /dev/null +++ b/kubernetes/client/models/v1_device_attribute.py @@ -0,0 +1,217 @@ +# coding: utf-8 + +""" + Kubernetes + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: release-1.35 + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from kubernetes.client.configuration import Configuration + + +class V1DeviceAttribute(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'bool': 'bool', + 'int': 'int', + 'string': 'str', + 'version': 'str' + } + + attribute_map = { + 'bool': 'bool', + 'int': 'int', + 'string': 'string', + 'version': 'version' + } + + def __init__(self, bool=None, int=None, string=None, version=None, local_vars_configuration=None): # noqa: E501 + """V1DeviceAttribute - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._bool = None + self._int = None + self._string = None + self._version = None + self.discriminator = None + + if bool is not None: + self.bool = bool + if int is not None: + self.int = int + if string is not None: + self.string = string + if version is not None: + self.version = version + + @property + def bool(self): + """Gets the bool of this V1DeviceAttribute. # noqa: E501 + + BoolValue is a true/false value. # noqa: E501 + + :return: The bool of this V1DeviceAttribute. # noqa: E501 + :rtype: bool + """ + return self._bool + + @bool.setter + def bool(self, bool): + """Sets the bool of this V1DeviceAttribute. + + BoolValue is a true/false value. # noqa: E501 + + :param bool: The bool of this V1DeviceAttribute. # noqa: E501 + :type bool: bool + """ + + self._bool = bool + + @property + def int(self): + """Gets the int of this V1DeviceAttribute. # noqa: E501 + + IntValue is a number. # noqa: E501 + + :return: The int of this V1DeviceAttribute. # noqa: E501 + :rtype: int + """ + return self._int + + @int.setter + def int(self, int): + """Sets the int of this V1DeviceAttribute. + + IntValue is a number. # noqa: E501 + + :param int: The int of this V1DeviceAttribute. # noqa: E501 + :type int: int + """ + + self._int = int + + @property + def string(self): + """Gets the string of this V1DeviceAttribute. # noqa: E501 + + StringValue is a string. Must not be longer than 64 characters. # noqa: E501 + + :return: The string of this V1DeviceAttribute. # noqa: E501 + :rtype: str + """ + return self._string + + @string.setter + def string(self, string): + """Sets the string of this V1DeviceAttribute. + + StringValue is a string. Must not be longer than 64 characters. # noqa: E501 + + :param string: The string of this V1DeviceAttribute. # noqa: E501 + :type string: str + """ + + self._string = string + + @property + def version(self): + """Gets the version of this V1DeviceAttribute. # noqa: E501 + + VersionValue is a semantic version according to semver.org spec 2.0.0. Must not be longer than 64 characters. # noqa: E501 + + :return: The version of this V1DeviceAttribute. # noqa: E501 + :rtype: str + """ + return self._version + + @version.setter + def version(self, version): + """Sets the version of this V1DeviceAttribute. + + VersionValue is a semantic version according to semver.org spec 2.0.0. Must not be longer than 64 characters. # noqa: E501 + + :param version: The version of this V1DeviceAttribute. # noqa: E501 + :type version: str + """ + + self._version = version + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1DeviceAttribute): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1DeviceAttribute): + return True + + return self.to_dict() != other.to_dict() diff --git a/kubernetes/client/models/v1_device_capacity.py b/kubernetes/client/models/v1_device_capacity.py new file mode 100644 index 0000000000..1261180c9d --- /dev/null +++ b/kubernetes/client/models/v1_device_capacity.py @@ -0,0 +1,160 @@ +# coding: utf-8 + +""" + Kubernetes + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: release-1.35 + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from kubernetes.client.configuration import Configuration + + +class V1DeviceCapacity(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'request_policy': 'V1CapacityRequestPolicy', + 'value': 'str' + } + + attribute_map = { + 'request_policy': 'requestPolicy', + 'value': 'value' + } + + def __init__(self, request_policy=None, value=None, local_vars_configuration=None): # noqa: E501 + """V1DeviceCapacity - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._request_policy = None + self._value = None + self.discriminator = None + + if request_policy is not None: + self.request_policy = request_policy + self.value = value + + @property + def request_policy(self): + """Gets the request_policy of this V1DeviceCapacity. # noqa: E501 + + + :return: The request_policy of this V1DeviceCapacity. # noqa: E501 + :rtype: V1CapacityRequestPolicy + """ + return self._request_policy + + @request_policy.setter + def request_policy(self, request_policy): + """Sets the request_policy of this V1DeviceCapacity. + + + :param request_policy: The request_policy of this V1DeviceCapacity. # noqa: E501 + :type request_policy: V1CapacityRequestPolicy + """ + + self._request_policy = request_policy + + @property + def value(self): + """Gets the value of this V1DeviceCapacity. # noqa: E501 + + Value defines how much of a certain capacity that device has. This field reflects the fixed total capacity and does not change. The consumed amount is tracked separately by scheduler and does not affect this value. # noqa: E501 + + :return: The value of this V1DeviceCapacity. # noqa: E501 + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """Sets the value of this V1DeviceCapacity. + + Value defines how much of a certain capacity that device has. This field reflects the fixed total capacity and does not change. The consumed amount is tracked separately by scheduler and does not affect this value. # noqa: E501 + + :param value: The value of this V1DeviceCapacity. # noqa: E501 + :type value: str + """ + if self.local_vars_configuration.client_side_validation and value is None: # noqa: E501 + raise ValueError("Invalid value for `value`, must not be `None`") # noqa: E501 + + self._value = value + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1DeviceCapacity): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1DeviceCapacity): + return True + + return self.to_dict() != other.to_dict() diff --git a/kubernetes/client/models/v1_device_claim.py b/kubernetes/client/models/v1_device_claim.py new file mode 100644 index 0000000000..4e14f7424d --- /dev/null +++ b/kubernetes/client/models/v1_device_claim.py @@ -0,0 +1,189 @@ +# coding: utf-8 + +""" + Kubernetes + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: release-1.35 + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from kubernetes.client.configuration import Configuration + + +class V1DeviceClaim(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'config': 'list[V1DeviceClaimConfiguration]', + 'constraints': 'list[V1DeviceConstraint]', + 'requests': 'list[V1DeviceRequest]' + } + + attribute_map = { + 'config': 'config', + 'constraints': 'constraints', + 'requests': 'requests' + } + + def __init__(self, config=None, constraints=None, requests=None, local_vars_configuration=None): # noqa: E501 + """V1DeviceClaim - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._config = None + self._constraints = None + self._requests = None + self.discriminator = None + + if config is not None: + self.config = config + if constraints is not None: + self.constraints = constraints + if requests is not None: + self.requests = requests + + @property + def config(self): + """Gets the config of this V1DeviceClaim. # noqa: E501 + + This field holds configuration for multiple potential drivers which could satisfy requests in this claim. It is ignored while allocating the claim. # noqa: E501 + + :return: The config of this V1DeviceClaim. # noqa: E501 + :rtype: list[V1DeviceClaimConfiguration] + """ + return self._config + + @config.setter + def config(self, config): + """Sets the config of this V1DeviceClaim. + + This field holds configuration for multiple potential drivers which could satisfy requests in this claim. It is ignored while allocating the claim. # noqa: E501 + + :param config: The config of this V1DeviceClaim. # noqa: E501 + :type config: list[V1DeviceClaimConfiguration] + """ + + self._config = config + + @property + def constraints(self): + """Gets the constraints of this V1DeviceClaim. # noqa: E501 + + These constraints must be satisfied by the set of devices that get allocated for the claim. # noqa: E501 + + :return: The constraints of this V1DeviceClaim. # noqa: E501 + :rtype: list[V1DeviceConstraint] + """ + return self._constraints + + @constraints.setter + def constraints(self, constraints): + """Sets the constraints of this V1DeviceClaim. + + These constraints must be satisfied by the set of devices that get allocated for the claim. # noqa: E501 + + :param constraints: The constraints of this V1DeviceClaim. # noqa: E501 + :type constraints: list[V1DeviceConstraint] + """ + + self._constraints = constraints + + @property + def requests(self): + """Gets the requests of this V1DeviceClaim. # noqa: E501 + + Requests represent individual requests for distinct devices which must all be satisfied. If empty, nothing needs to be allocated. # noqa: E501 + + :return: The requests of this V1DeviceClaim. # noqa: E501 + :rtype: list[V1DeviceRequest] + """ + return self._requests + + @requests.setter + def requests(self, requests): + """Sets the requests of this V1DeviceClaim. + + Requests represent individual requests for distinct devices which must all be satisfied. If empty, nothing needs to be allocated. # noqa: E501 + + :param requests: The requests of this V1DeviceClaim. # noqa: E501 + :type requests: list[V1DeviceRequest] + """ + + self._requests = requests + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1DeviceClaim): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1DeviceClaim): + return True + + return self.to_dict() != other.to_dict() diff --git a/kubernetes/client/models/v1_device_claim_configuration.py b/kubernetes/client/models/v1_device_claim_configuration.py new file mode 100644 index 0000000000..92ad79687a --- /dev/null +++ b/kubernetes/client/models/v1_device_claim_configuration.py @@ -0,0 +1,159 @@ +# coding: utf-8 + +""" + Kubernetes + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: release-1.35 + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from kubernetes.client.configuration import Configuration + + +class V1DeviceClaimConfiguration(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'opaque': 'V1OpaqueDeviceConfiguration', + 'requests': 'list[str]' + } + + attribute_map = { + 'opaque': 'opaque', + 'requests': 'requests' + } + + def __init__(self, opaque=None, requests=None, local_vars_configuration=None): # noqa: E501 + """V1DeviceClaimConfiguration - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._opaque = None + self._requests = None + self.discriminator = None + + if opaque is not None: + self.opaque = opaque + if requests is not None: + self.requests = requests + + @property + def opaque(self): + """Gets the opaque of this V1DeviceClaimConfiguration. # noqa: E501 + + + :return: The opaque of this V1DeviceClaimConfiguration. # noqa: E501 + :rtype: V1OpaqueDeviceConfiguration + """ + return self._opaque + + @opaque.setter + def opaque(self, opaque): + """Sets the opaque of this V1DeviceClaimConfiguration. + + + :param opaque: The opaque of this V1DeviceClaimConfiguration. # noqa: E501 + :type opaque: V1OpaqueDeviceConfiguration + """ + + self._opaque = opaque + + @property + def requests(self): + """Gets the requests of this V1DeviceClaimConfiguration. # noqa: E501 + + Requests lists the names of requests where the configuration applies. If empty, it applies to all requests. References to subrequests must include the name of the main request and may include the subrequest using the format
[/]. If just the main request is given, the configuration applies to all subrequests. # noqa: E501 + + :return: The requests of this V1DeviceClaimConfiguration. # noqa: E501 + :rtype: list[str] + """ + return self._requests + + @requests.setter + def requests(self, requests): + """Sets the requests of this V1DeviceClaimConfiguration. + + Requests lists the names of requests where the configuration applies. If empty, it applies to all requests. References to subrequests must include the name of the main request and may include the subrequest using the format
[/]. If just the main request is given, the configuration applies to all subrequests. # noqa: E501 + + :param requests: The requests of this V1DeviceClaimConfiguration. # noqa: E501 + :type requests: list[str] + """ + + self._requests = requests + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1DeviceClaimConfiguration): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1DeviceClaimConfiguration): + return True + + return self.to_dict() != other.to_dict() diff --git a/kubernetes/client/models/v1_device_class.py b/kubernetes/client/models/v1_device_class.py new file mode 100644 index 0000000000..6dc2b08a6a --- /dev/null +++ b/kubernetes/client/models/v1_device_class.py @@ -0,0 +1,214 @@ +# coding: utf-8 + +""" + Kubernetes + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: release-1.35 + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from kubernetes.client.configuration import Configuration + + +class V1DeviceClass(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'api_version': 'str', + 'kind': 'str', + 'metadata': 'V1ObjectMeta', + 'spec': 'V1DeviceClassSpec' + } + + attribute_map = { + 'api_version': 'apiVersion', + 'kind': 'kind', + 'metadata': 'metadata', + 'spec': 'spec' + } + + def __init__(self, api_version=None, kind=None, metadata=None, spec=None, local_vars_configuration=None): # noqa: E501 + """V1DeviceClass - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._api_version = None + self._kind = None + self._metadata = None + self._spec = None + self.discriminator = None + + if api_version is not None: + self.api_version = api_version + if kind is not None: + self.kind = kind + if metadata is not None: + self.metadata = metadata + self.spec = spec + + @property + def api_version(self): + """Gets the api_version of this V1DeviceClass. # noqa: E501 + + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501 + + :return: The api_version of this V1DeviceClass. # noqa: E501 + :rtype: str + """ + return self._api_version + + @api_version.setter + def api_version(self, api_version): + """Sets the api_version of this V1DeviceClass. + + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501 + + :param api_version: The api_version of this V1DeviceClass. # noqa: E501 + :type api_version: str + """ + + self._api_version = api_version + + @property + def kind(self): + """Gets the kind of this V1DeviceClass. # noqa: E501 + + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501 + + :return: The kind of this V1DeviceClass. # noqa: E501 + :rtype: str + """ + return self._kind + + @kind.setter + def kind(self, kind): + """Sets the kind of this V1DeviceClass. + + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501 + + :param kind: The kind of this V1DeviceClass. # noqa: E501 + :type kind: str + """ + + self._kind = kind + + @property + def metadata(self): + """Gets the metadata of this V1DeviceClass. # noqa: E501 + + + :return: The metadata of this V1DeviceClass. # noqa: E501 + :rtype: V1ObjectMeta + """ + return self._metadata + + @metadata.setter + def metadata(self, metadata): + """Sets the metadata of this V1DeviceClass. + + + :param metadata: The metadata of this V1DeviceClass. # noqa: E501 + :type metadata: V1ObjectMeta + """ + + self._metadata = metadata + + @property + def spec(self): + """Gets the spec of this V1DeviceClass. # noqa: E501 + + + :return: The spec of this V1DeviceClass. # noqa: E501 + :rtype: V1DeviceClassSpec + """ + return self._spec + + @spec.setter + def spec(self, spec): + """Sets the spec of this V1DeviceClass. + + + :param spec: The spec of this V1DeviceClass. # noqa: E501 + :type spec: V1DeviceClassSpec + """ + if self.local_vars_configuration.client_side_validation and spec is None: # noqa: E501 + raise ValueError("Invalid value for `spec`, must not be `None`") # noqa: E501 + + self._spec = spec + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1DeviceClass): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1DeviceClass): + return True + + return self.to_dict() != other.to_dict() diff --git a/kubernetes/client/models/v1_device_class_configuration.py b/kubernetes/client/models/v1_device_class_configuration.py new file mode 100644 index 0000000000..af2d0a52d9 --- /dev/null +++ b/kubernetes/client/models/v1_device_class_configuration.py @@ -0,0 +1,131 @@ +# coding: utf-8 + +""" + Kubernetes + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: release-1.35 + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from kubernetes.client.configuration import Configuration + + +class V1DeviceClassConfiguration(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'opaque': 'V1OpaqueDeviceConfiguration' + } + + attribute_map = { + 'opaque': 'opaque' + } + + def __init__(self, opaque=None, local_vars_configuration=None): # noqa: E501 + """V1DeviceClassConfiguration - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._opaque = None + self.discriminator = None + + if opaque is not None: + self.opaque = opaque + + @property + def opaque(self): + """Gets the opaque of this V1DeviceClassConfiguration. # noqa: E501 + + + :return: The opaque of this V1DeviceClassConfiguration. # noqa: E501 + :rtype: V1OpaqueDeviceConfiguration + """ + return self._opaque + + @opaque.setter + def opaque(self, opaque): + """Sets the opaque of this V1DeviceClassConfiguration. + + + :param opaque: The opaque of this V1DeviceClassConfiguration. # noqa: E501 + :type opaque: V1OpaqueDeviceConfiguration + """ + + self._opaque = opaque + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1DeviceClassConfiguration): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1DeviceClassConfiguration): + return True + + return self.to_dict() != other.to_dict() diff --git a/kubernetes/client/models/v1_device_class_list.py b/kubernetes/client/models/v1_device_class_list.py new file mode 100644 index 0000000000..83d2a9072f --- /dev/null +++ b/kubernetes/client/models/v1_device_class_list.py @@ -0,0 +1,216 @@ +# coding: utf-8 + +""" + Kubernetes + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: release-1.35 + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from kubernetes.client.configuration import Configuration + + +class V1DeviceClassList(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'api_version': 'str', + 'items': 'list[V1DeviceClass]', + 'kind': 'str', + 'metadata': 'V1ListMeta' + } + + attribute_map = { + 'api_version': 'apiVersion', + 'items': 'items', + 'kind': 'kind', + 'metadata': 'metadata' + } + + def __init__(self, api_version=None, items=None, kind=None, metadata=None, local_vars_configuration=None): # noqa: E501 + """V1DeviceClassList - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._api_version = None + self._items = None + self._kind = None + self._metadata = None + self.discriminator = None + + if api_version is not None: + self.api_version = api_version + self.items = items + if kind is not None: + self.kind = kind + if metadata is not None: + self.metadata = metadata + + @property + def api_version(self): + """Gets the api_version of this V1DeviceClassList. # noqa: E501 + + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501 + + :return: The api_version of this V1DeviceClassList. # noqa: E501 + :rtype: str + """ + return self._api_version + + @api_version.setter + def api_version(self, api_version): + """Sets the api_version of this V1DeviceClassList. + + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501 + + :param api_version: The api_version of this V1DeviceClassList. # noqa: E501 + :type api_version: str + """ + + self._api_version = api_version + + @property + def items(self): + """Gets the items of this V1DeviceClassList. # noqa: E501 + + Items is the list of resource classes. # noqa: E501 + + :return: The items of this V1DeviceClassList. # noqa: E501 + :rtype: list[V1DeviceClass] + """ + return self._items + + @items.setter + def items(self, items): + """Sets the items of this V1DeviceClassList. + + Items is the list of resource classes. # noqa: E501 + + :param items: The items of this V1DeviceClassList. # noqa: E501 + :type items: list[V1DeviceClass] + """ + if self.local_vars_configuration.client_side_validation and items is None: # noqa: E501 + raise ValueError("Invalid value for `items`, must not be `None`") # noqa: E501 + + self._items = items + + @property + def kind(self): + """Gets the kind of this V1DeviceClassList. # noqa: E501 + + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501 + + :return: The kind of this V1DeviceClassList. # noqa: E501 + :rtype: str + """ + return self._kind + + @kind.setter + def kind(self, kind): + """Sets the kind of this V1DeviceClassList. + + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501 + + :param kind: The kind of this V1DeviceClassList. # noqa: E501 + :type kind: str + """ + + self._kind = kind + + @property + def metadata(self): + """Gets the metadata of this V1DeviceClassList. # noqa: E501 + + + :return: The metadata of this V1DeviceClassList. # noqa: E501 + :rtype: V1ListMeta + """ + return self._metadata + + @metadata.setter + def metadata(self, metadata): + """Sets the metadata of this V1DeviceClassList. + + + :param metadata: The metadata of this V1DeviceClassList. # noqa: E501 + :type metadata: V1ListMeta + """ + + self._metadata = metadata + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1DeviceClassList): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1DeviceClassList): + return True + + return self.to_dict() != other.to_dict() diff --git a/kubernetes/client/models/v1_device_class_spec.py b/kubernetes/client/models/v1_device_class_spec.py new file mode 100644 index 0000000000..67080d3b07 --- /dev/null +++ b/kubernetes/client/models/v1_device_class_spec.py @@ -0,0 +1,189 @@ +# coding: utf-8 + +""" + Kubernetes + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: release-1.35 + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from kubernetes.client.configuration import Configuration + + +class V1DeviceClassSpec(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'config': 'list[V1DeviceClassConfiguration]', + 'extended_resource_name': 'str', + 'selectors': 'list[V1DeviceSelector]' + } + + attribute_map = { + 'config': 'config', + 'extended_resource_name': 'extendedResourceName', + 'selectors': 'selectors' + } + + def __init__(self, config=None, extended_resource_name=None, selectors=None, local_vars_configuration=None): # noqa: E501 + """V1DeviceClassSpec - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._config = None + self._extended_resource_name = None + self._selectors = None + self.discriminator = None + + if config is not None: + self.config = config + if extended_resource_name is not None: + self.extended_resource_name = extended_resource_name + if selectors is not None: + self.selectors = selectors + + @property + def config(self): + """Gets the config of this V1DeviceClassSpec. # noqa: E501 + + Config defines configuration parameters that apply to each device that is claimed via this class. Some classses may potentially be satisfied by multiple drivers, so each instance of a vendor configuration applies to exactly one driver. They are passed to the driver, but are not considered while allocating the claim. # noqa: E501 + + :return: The config of this V1DeviceClassSpec. # noqa: E501 + :rtype: list[V1DeviceClassConfiguration] + """ + return self._config + + @config.setter + def config(self, config): + """Sets the config of this V1DeviceClassSpec. + + Config defines configuration parameters that apply to each device that is claimed via this class. Some classses may potentially be satisfied by multiple drivers, so each instance of a vendor configuration applies to exactly one driver. They are passed to the driver, but are not considered while allocating the claim. # noqa: E501 + + :param config: The config of this V1DeviceClassSpec. # noqa: E501 + :type config: list[V1DeviceClassConfiguration] + """ + + self._config = config + + @property + def extended_resource_name(self): + """Gets the extended_resource_name of this V1DeviceClassSpec. # noqa: E501 + + ExtendedResourceName is the extended resource name for the devices of this class. The devices of this class can be used to satisfy a pod's extended resource requests. It has the same format as the name of a pod's extended resource. It should be unique among all the device classes in a cluster. If two device classes have the same name, then the class created later is picked to satisfy a pod's extended resource requests. If two classes are created at the same time, then the name of the class lexicographically sorted first is picked. This is an alpha field. # noqa: E501 + + :return: The extended_resource_name of this V1DeviceClassSpec. # noqa: E501 + :rtype: str + """ + return self._extended_resource_name + + @extended_resource_name.setter + def extended_resource_name(self, extended_resource_name): + """Sets the extended_resource_name of this V1DeviceClassSpec. + + ExtendedResourceName is the extended resource name for the devices of this class. The devices of this class can be used to satisfy a pod's extended resource requests. It has the same format as the name of a pod's extended resource. It should be unique among all the device classes in a cluster. If two device classes have the same name, then the class created later is picked to satisfy a pod's extended resource requests. If two classes are created at the same time, then the name of the class lexicographically sorted first is picked. This is an alpha field. # noqa: E501 + + :param extended_resource_name: The extended_resource_name of this V1DeviceClassSpec. # noqa: E501 + :type extended_resource_name: str + """ + + self._extended_resource_name = extended_resource_name + + @property + def selectors(self): + """Gets the selectors of this V1DeviceClassSpec. # noqa: E501 + + Each selector must be satisfied by a device which is claimed via this class. # noqa: E501 + + :return: The selectors of this V1DeviceClassSpec. # noqa: E501 + :rtype: list[V1DeviceSelector] + """ + return self._selectors + + @selectors.setter + def selectors(self, selectors): + """Sets the selectors of this V1DeviceClassSpec. + + Each selector must be satisfied by a device which is claimed via this class. # noqa: E501 + + :param selectors: The selectors of this V1DeviceClassSpec. # noqa: E501 + :type selectors: list[V1DeviceSelector] + """ + + self._selectors = selectors + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1DeviceClassSpec): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1DeviceClassSpec): + return True + + return self.to_dict() != other.to_dict() diff --git a/kubernetes/client/models/v1_device_constraint.py b/kubernetes/client/models/v1_device_constraint.py new file mode 100644 index 0000000000..52e5720de4 --- /dev/null +++ b/kubernetes/client/models/v1_device_constraint.py @@ -0,0 +1,189 @@ +# coding: utf-8 + +""" + Kubernetes + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: release-1.35 + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from kubernetes.client.configuration import Configuration + + +class V1DeviceConstraint(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'distinct_attribute': 'str', + 'match_attribute': 'str', + 'requests': 'list[str]' + } + + attribute_map = { + 'distinct_attribute': 'distinctAttribute', + 'match_attribute': 'matchAttribute', + 'requests': 'requests' + } + + def __init__(self, distinct_attribute=None, match_attribute=None, requests=None, local_vars_configuration=None): # noqa: E501 + """V1DeviceConstraint - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._distinct_attribute = None + self._match_attribute = None + self._requests = None + self.discriminator = None + + if distinct_attribute is not None: + self.distinct_attribute = distinct_attribute + if match_attribute is not None: + self.match_attribute = match_attribute + if requests is not None: + self.requests = requests + + @property + def distinct_attribute(self): + """Gets the distinct_attribute of this V1DeviceConstraint. # noqa: E501 + + DistinctAttribute requires that all devices in question have this attribute and that its type and value are unique across those devices. This acts as the inverse of MatchAttribute. This constraint is used to avoid allocating multiple requests to the same device by ensuring attribute-level differentiation. This is useful for scenarios where resource requests must be fulfilled by separate physical devices. For example, a container requests two network interfaces that must be allocated from two different physical NICs. # noqa: E501 + + :return: The distinct_attribute of this V1DeviceConstraint. # noqa: E501 + :rtype: str + """ + return self._distinct_attribute + + @distinct_attribute.setter + def distinct_attribute(self, distinct_attribute): + """Sets the distinct_attribute of this V1DeviceConstraint. + + DistinctAttribute requires that all devices in question have this attribute and that its type and value are unique across those devices. This acts as the inverse of MatchAttribute. This constraint is used to avoid allocating multiple requests to the same device by ensuring attribute-level differentiation. This is useful for scenarios where resource requests must be fulfilled by separate physical devices. For example, a container requests two network interfaces that must be allocated from two different physical NICs. # noqa: E501 + + :param distinct_attribute: The distinct_attribute of this V1DeviceConstraint. # noqa: E501 + :type distinct_attribute: str + """ + + self._distinct_attribute = distinct_attribute + + @property + def match_attribute(self): + """Gets the match_attribute of this V1DeviceConstraint. # noqa: E501 + + MatchAttribute requires that all devices in question have this attribute and that its type and value are the same across those devices. For example, if you specified \"dra.example.com/numa\" (a hypothetical example!), then only devices in the same NUMA node will be chosen. A device which does not have that attribute will not be chosen. All devices should use a value of the same type for this attribute because that is part of its specification, but if one device doesn't, then it also will not be chosen. Must include the domain qualifier. # noqa: E501 + + :return: The match_attribute of this V1DeviceConstraint. # noqa: E501 + :rtype: str + """ + return self._match_attribute + + @match_attribute.setter + def match_attribute(self, match_attribute): + """Sets the match_attribute of this V1DeviceConstraint. + + MatchAttribute requires that all devices in question have this attribute and that its type and value are the same across those devices. For example, if you specified \"dra.example.com/numa\" (a hypothetical example!), then only devices in the same NUMA node will be chosen. A device which does not have that attribute will not be chosen. All devices should use a value of the same type for this attribute because that is part of its specification, but if one device doesn't, then it also will not be chosen. Must include the domain qualifier. # noqa: E501 + + :param match_attribute: The match_attribute of this V1DeviceConstraint. # noqa: E501 + :type match_attribute: str + """ + + self._match_attribute = match_attribute + + @property + def requests(self): + """Gets the requests of this V1DeviceConstraint. # noqa: E501 + + Requests is a list of the one or more requests in this claim which must co-satisfy this constraint. If a request is fulfilled by multiple devices, then all of the devices must satisfy the constraint. If this is not specified, this constraint applies to all requests in this claim. References to subrequests must include the name of the main request and may include the subrequest using the format
[/]. If just the main request is given, the constraint applies to all subrequests. # noqa: E501 + + :return: The requests of this V1DeviceConstraint. # noqa: E501 + :rtype: list[str] + """ + return self._requests + + @requests.setter + def requests(self, requests): + """Sets the requests of this V1DeviceConstraint. + + Requests is a list of the one or more requests in this claim which must co-satisfy this constraint. If a request is fulfilled by multiple devices, then all of the devices must satisfy the constraint. If this is not specified, this constraint applies to all requests in this claim. References to subrequests must include the name of the main request and may include the subrequest using the format
[/]. If just the main request is given, the constraint applies to all subrequests. # noqa: E501 + + :param requests: The requests of this V1DeviceConstraint. # noqa: E501 + :type requests: list[str] + """ + + self._requests = requests + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1DeviceConstraint): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1DeviceConstraint): + return True + + return self.to_dict() != other.to_dict() diff --git a/kubernetes/client/models/v1_device_counter_consumption.py b/kubernetes/client/models/v1_device_counter_consumption.py new file mode 100644 index 0000000000..0b483e585c --- /dev/null +++ b/kubernetes/client/models/v1_device_counter_consumption.py @@ -0,0 +1,163 @@ +# coding: utf-8 + +""" + Kubernetes + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: release-1.35 + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from kubernetes.client.configuration import Configuration + + +class V1DeviceCounterConsumption(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'counter_set': 'str', + 'counters': 'dict[str, V1Counter]' + } + + attribute_map = { + 'counter_set': 'counterSet', + 'counters': 'counters' + } + + def __init__(self, counter_set=None, counters=None, local_vars_configuration=None): # noqa: E501 + """V1DeviceCounterConsumption - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._counter_set = None + self._counters = None + self.discriminator = None + + self.counter_set = counter_set + self.counters = counters + + @property + def counter_set(self): + """Gets the counter_set of this V1DeviceCounterConsumption. # noqa: E501 + + CounterSet is the name of the set from which the counters defined will be consumed. # noqa: E501 + + :return: The counter_set of this V1DeviceCounterConsumption. # noqa: E501 + :rtype: str + """ + return self._counter_set + + @counter_set.setter + def counter_set(self, counter_set): + """Sets the counter_set of this V1DeviceCounterConsumption. + + CounterSet is the name of the set from which the counters defined will be consumed. # noqa: E501 + + :param counter_set: The counter_set of this V1DeviceCounterConsumption. # noqa: E501 + :type counter_set: str + """ + if self.local_vars_configuration.client_side_validation and counter_set is None: # noqa: E501 + raise ValueError("Invalid value for `counter_set`, must not be `None`") # noqa: E501 + + self._counter_set = counter_set + + @property + def counters(self): + """Gets the counters of this V1DeviceCounterConsumption. # noqa: E501 + + Counters defines the counters that will be consumed by the device. The maximum number of counters is 32. # noqa: E501 + + :return: The counters of this V1DeviceCounterConsumption. # noqa: E501 + :rtype: dict[str, V1Counter] + """ + return self._counters + + @counters.setter + def counters(self, counters): + """Sets the counters of this V1DeviceCounterConsumption. + + Counters defines the counters that will be consumed by the device. The maximum number of counters is 32. # noqa: E501 + + :param counters: The counters of this V1DeviceCounterConsumption. # noqa: E501 + :type counters: dict[str, V1Counter] + """ + if self.local_vars_configuration.client_side_validation and counters is None: # noqa: E501 + raise ValueError("Invalid value for `counters`, must not be `None`") # noqa: E501 + + self._counters = counters + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1DeviceCounterConsumption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1DeviceCounterConsumption): + return True + + return self.to_dict() != other.to_dict() diff --git a/kubernetes/client/models/v1_device_request.py b/kubernetes/client/models/v1_device_request.py new file mode 100644 index 0000000000..316b6941c3 --- /dev/null +++ b/kubernetes/client/models/v1_device_request.py @@ -0,0 +1,188 @@ +# coding: utf-8 + +""" + Kubernetes + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: release-1.35 + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from kubernetes.client.configuration import Configuration + + +class V1DeviceRequest(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'exactly': 'V1ExactDeviceRequest', + 'first_available': 'list[V1DeviceSubRequest]', + 'name': 'str' + } + + attribute_map = { + 'exactly': 'exactly', + 'first_available': 'firstAvailable', + 'name': 'name' + } + + def __init__(self, exactly=None, first_available=None, name=None, local_vars_configuration=None): # noqa: E501 + """V1DeviceRequest - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._exactly = None + self._first_available = None + self._name = None + self.discriminator = None + + if exactly is not None: + self.exactly = exactly + if first_available is not None: + self.first_available = first_available + self.name = name + + @property + def exactly(self): + """Gets the exactly of this V1DeviceRequest. # noqa: E501 + + + :return: The exactly of this V1DeviceRequest. # noqa: E501 + :rtype: V1ExactDeviceRequest + """ + return self._exactly + + @exactly.setter + def exactly(self, exactly): + """Sets the exactly of this V1DeviceRequest. + + + :param exactly: The exactly of this V1DeviceRequest. # noqa: E501 + :type exactly: V1ExactDeviceRequest + """ + + self._exactly = exactly + + @property + def first_available(self): + """Gets the first_available of this V1DeviceRequest. # noqa: E501 + + FirstAvailable contains subrequests, of which exactly one will be selected by the scheduler. It tries to satisfy them in the order in which they are listed here. So if there are two entries in the list, the scheduler will only check the second one if it determines that the first one can not be used. DRA does not yet implement scoring, so the scheduler will select the first set of devices that satisfies all the requests in the claim. And if the requirements can be satisfied on more than one node, other scheduling features will determine which node is chosen. This means that the set of devices allocated to a claim might not be the optimal set available to the cluster. Scoring will be implemented later. # noqa: E501 + + :return: The first_available of this V1DeviceRequest. # noqa: E501 + :rtype: list[V1DeviceSubRequest] + """ + return self._first_available + + @first_available.setter + def first_available(self, first_available): + """Sets the first_available of this V1DeviceRequest. + + FirstAvailable contains subrequests, of which exactly one will be selected by the scheduler. It tries to satisfy them in the order in which they are listed here. So if there are two entries in the list, the scheduler will only check the second one if it determines that the first one can not be used. DRA does not yet implement scoring, so the scheduler will select the first set of devices that satisfies all the requests in the claim. And if the requirements can be satisfied on more than one node, other scheduling features will determine which node is chosen. This means that the set of devices allocated to a claim might not be the optimal set available to the cluster. Scoring will be implemented later. # noqa: E501 + + :param first_available: The first_available of this V1DeviceRequest. # noqa: E501 + :type first_available: list[V1DeviceSubRequest] + """ + + self._first_available = first_available + + @property + def name(self): + """Gets the name of this V1DeviceRequest. # noqa: E501 + + Name can be used to reference this request in a pod.spec.containers[].resources.claims entry and in a constraint of the claim. References using the name in the DeviceRequest will uniquely identify a request when the Exactly field is set. When the FirstAvailable field is set, a reference to the name of the DeviceRequest will match whatever subrequest is chosen by the scheduler. Must be a DNS label. # noqa: E501 + + :return: The name of this V1DeviceRequest. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this V1DeviceRequest. + + Name can be used to reference this request in a pod.spec.containers[].resources.claims entry and in a constraint of the claim. References using the name in the DeviceRequest will uniquely identify a request when the Exactly field is set. When the FirstAvailable field is set, a reference to the name of the DeviceRequest will match whatever subrequest is chosen by the scheduler. Must be a DNS label. # noqa: E501 + + :param name: The name of this V1DeviceRequest. # noqa: E501 + :type name: str + """ + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1DeviceRequest): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1DeviceRequest): + return True + + return self.to_dict() != other.to_dict() diff --git a/kubernetes/client/models/v1_device_request_allocation_result.py b/kubernetes/client/models/v1_device_request_allocation_result.py new file mode 100644 index 0000000000..a0fc56a981 --- /dev/null +++ b/kubernetes/client/models/v1_device_request_allocation_result.py @@ -0,0 +1,389 @@ +# coding: utf-8 + +""" + Kubernetes + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: release-1.35 + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from kubernetes.client.configuration import Configuration + + +class V1DeviceRequestAllocationResult(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'admin_access': 'bool', + 'binding_conditions': 'list[str]', + 'binding_failure_conditions': 'list[str]', + 'consumed_capacity': 'dict[str, str]', + 'device': 'str', + 'driver': 'str', + 'pool': 'str', + 'request': 'str', + 'share_id': 'str', + 'tolerations': 'list[V1DeviceToleration]' + } + + attribute_map = { + 'admin_access': 'adminAccess', + 'binding_conditions': 'bindingConditions', + 'binding_failure_conditions': 'bindingFailureConditions', + 'consumed_capacity': 'consumedCapacity', + 'device': 'device', + 'driver': 'driver', + 'pool': 'pool', + 'request': 'request', + 'share_id': 'shareID', + 'tolerations': 'tolerations' + } + + def __init__(self, admin_access=None, binding_conditions=None, binding_failure_conditions=None, consumed_capacity=None, device=None, driver=None, pool=None, request=None, share_id=None, tolerations=None, local_vars_configuration=None): # noqa: E501 + """V1DeviceRequestAllocationResult - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._admin_access = None + self._binding_conditions = None + self._binding_failure_conditions = None + self._consumed_capacity = None + self._device = None + self._driver = None + self._pool = None + self._request = None + self._share_id = None + self._tolerations = None + self.discriminator = None + + if admin_access is not None: + self.admin_access = admin_access + if binding_conditions is not None: + self.binding_conditions = binding_conditions + if binding_failure_conditions is not None: + self.binding_failure_conditions = binding_failure_conditions + if consumed_capacity is not None: + self.consumed_capacity = consumed_capacity + self.device = device + self.driver = driver + self.pool = pool + self.request = request + if share_id is not None: + self.share_id = share_id + if tolerations is not None: + self.tolerations = tolerations + + @property + def admin_access(self): + """Gets the admin_access of this V1DeviceRequestAllocationResult. # noqa: E501 + + AdminAccess indicates that this device was allocated for administrative access. See the corresponding request field for a definition of mode. This is an alpha field and requires enabling the DRAAdminAccess feature gate. Admin access is disabled if this field is unset or set to false, otherwise it is enabled. # noqa: E501 + + :return: The admin_access of this V1DeviceRequestAllocationResult. # noqa: E501 + :rtype: bool + """ + return self._admin_access + + @admin_access.setter + def admin_access(self, admin_access): + """Sets the admin_access of this V1DeviceRequestAllocationResult. + + AdminAccess indicates that this device was allocated for administrative access. See the corresponding request field for a definition of mode. This is an alpha field and requires enabling the DRAAdminAccess feature gate. Admin access is disabled if this field is unset or set to false, otherwise it is enabled. # noqa: E501 + + :param admin_access: The admin_access of this V1DeviceRequestAllocationResult. # noqa: E501 + :type admin_access: bool + """ + + self._admin_access = admin_access + + @property + def binding_conditions(self): + """Gets the binding_conditions of this V1DeviceRequestAllocationResult. # noqa: E501 + + BindingConditions contains a copy of the BindingConditions from the corresponding ResourceSlice at the time of allocation. This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gates. # noqa: E501 + + :return: The binding_conditions of this V1DeviceRequestAllocationResult. # noqa: E501 + :rtype: list[str] + """ + return self._binding_conditions + + @binding_conditions.setter + def binding_conditions(self, binding_conditions): + """Sets the binding_conditions of this V1DeviceRequestAllocationResult. + + BindingConditions contains a copy of the BindingConditions from the corresponding ResourceSlice at the time of allocation. This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gates. # noqa: E501 + + :param binding_conditions: The binding_conditions of this V1DeviceRequestAllocationResult. # noqa: E501 + :type binding_conditions: list[str] + """ + + self._binding_conditions = binding_conditions + + @property + def binding_failure_conditions(self): + """Gets the binding_failure_conditions of this V1DeviceRequestAllocationResult. # noqa: E501 + + BindingFailureConditions contains a copy of the BindingFailureConditions from the corresponding ResourceSlice at the time of allocation. This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gates. # noqa: E501 + + :return: The binding_failure_conditions of this V1DeviceRequestAllocationResult. # noqa: E501 + :rtype: list[str] + """ + return self._binding_failure_conditions + + @binding_failure_conditions.setter + def binding_failure_conditions(self, binding_failure_conditions): + """Sets the binding_failure_conditions of this V1DeviceRequestAllocationResult. + + BindingFailureConditions contains a copy of the BindingFailureConditions from the corresponding ResourceSlice at the time of allocation. This is an alpha field and requires enabling the DRADeviceBindingConditions and DRAResourceClaimDeviceStatus feature gates. # noqa: E501 + + :param binding_failure_conditions: The binding_failure_conditions of this V1DeviceRequestAllocationResult. # noqa: E501 + :type binding_failure_conditions: list[str] + """ + + self._binding_failure_conditions = binding_failure_conditions + + @property + def consumed_capacity(self): + """Gets the consumed_capacity of this V1DeviceRequestAllocationResult. # noqa: E501 + + ConsumedCapacity tracks the amount of capacity consumed per device as part of the claim request. The consumed amount may differ from the requested amount: it is rounded up to the nearest valid value based on the device’s requestPolicy if applicable (i.e., may not be less than the requested amount). The total consumed capacity for each device must not exceed the DeviceCapacity's Value. This field is populated only for devices that allow multiple allocations. All capacity entries are included, even if the consumed amount is zero. # noqa: E501 + + :return: The consumed_capacity of this V1DeviceRequestAllocationResult. # noqa: E501 + :rtype: dict[str, str] + """ + return self._consumed_capacity + + @consumed_capacity.setter + def consumed_capacity(self, consumed_capacity): + """Sets the consumed_capacity of this V1DeviceRequestAllocationResult. + + ConsumedCapacity tracks the amount of capacity consumed per device as part of the claim request. The consumed amount may differ from the requested amount: it is rounded up to the nearest valid value based on the device’s requestPolicy if applicable (i.e., may not be less than the requested amount). The total consumed capacity for each device must not exceed the DeviceCapacity's Value. This field is populated only for devices that allow multiple allocations. All capacity entries are included, even if the consumed amount is zero. # noqa: E501 + + :param consumed_capacity: The consumed_capacity of this V1DeviceRequestAllocationResult. # noqa: E501 + :type consumed_capacity: dict[str, str] + """ + + self._consumed_capacity = consumed_capacity + + @property + def device(self): + """Gets the device of this V1DeviceRequestAllocationResult. # noqa: E501 + + Device references one device instance via its name in the driver's resource pool. It must be a DNS label. # noqa: E501 + + :return: The device of this V1DeviceRequestAllocationResult. # noqa: E501 + :rtype: str + """ + return self._device + + @device.setter + def device(self, device): + """Sets the device of this V1DeviceRequestAllocationResult. + + Device references one device instance via its name in the driver's resource pool. It must be a DNS label. # noqa: E501 + + :param device: The device of this V1DeviceRequestAllocationResult. # noqa: E501 + :type device: str + """ + if self.local_vars_configuration.client_side_validation and device is None: # noqa: E501 + raise ValueError("Invalid value for `device`, must not be `None`") # noqa: E501 + + self._device = device + + @property + def driver(self): + """Gets the driver of this V1DeviceRequestAllocationResult. # noqa: E501 + + Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node. Must be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. It should use only lower case characters. # noqa: E501 + + :return: The driver of this V1DeviceRequestAllocationResult. # noqa: E501 + :rtype: str + """ + return self._driver + + @driver.setter + def driver(self, driver): + """Sets the driver of this V1DeviceRequestAllocationResult. + + Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node. Must be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. It should use only lower case characters. # noqa: E501 + + :param driver: The driver of this V1DeviceRequestAllocationResult. # noqa: E501 + :type driver: str + """ + if self.local_vars_configuration.client_side_validation and driver is None: # noqa: E501 + raise ValueError("Invalid value for `driver`, must not be `None`") # noqa: E501 + + self._driver = driver + + @property + def pool(self): + """Gets the pool of this V1DeviceRequestAllocationResult. # noqa: E501 + + This name together with the driver name and the device name field identify which device was allocated (`//`). Must not be longer than 253 characters and may contain one or more DNS sub-domains separated by slashes. # noqa: E501 + + :return: The pool of this V1DeviceRequestAllocationResult. # noqa: E501 + :rtype: str + """ + return self._pool + + @pool.setter + def pool(self, pool): + """Sets the pool of this V1DeviceRequestAllocationResult. + + This name together with the driver name and the device name field identify which device was allocated (`//`). Must not be longer than 253 characters and may contain one or more DNS sub-domains separated by slashes. # noqa: E501 + + :param pool: The pool of this V1DeviceRequestAllocationResult. # noqa: E501 + :type pool: str + """ + if self.local_vars_configuration.client_side_validation and pool is None: # noqa: E501 + raise ValueError("Invalid value for `pool`, must not be `None`") # noqa: E501 + + self._pool = pool + + @property + def request(self): + """Gets the request of this V1DeviceRequestAllocationResult. # noqa: E501 + + Request is the name of the request in the claim which caused this device to be allocated. If it references a subrequest in the firstAvailable list on a DeviceRequest, this field must include both the name of the main request and the subrequest using the format
/. Multiple devices may have been allocated per request. # noqa: E501 + + :return: The request of this V1DeviceRequestAllocationResult. # noqa: E501 + :rtype: str + """ + return self._request + + @request.setter + def request(self, request): + """Sets the request of this V1DeviceRequestAllocationResult. + + Request is the name of the request in the claim which caused this device to be allocated. If it references a subrequest in the firstAvailable list on a DeviceRequest, this field must include both the name of the main request and the subrequest using the format
/. Multiple devices may have been allocated per request. # noqa: E501 + + :param request: The request of this V1DeviceRequestAllocationResult. # noqa: E501 + :type request: str + """ + if self.local_vars_configuration.client_side_validation and request is None: # noqa: E501 + raise ValueError("Invalid value for `request`, must not be `None`") # noqa: E501 + + self._request = request + + @property + def share_id(self): + """Gets the share_id of this V1DeviceRequestAllocationResult. # noqa: E501 + + ShareID uniquely identifies an individual allocation share of the device, used when the device supports multiple simultaneous allocations. It serves as an additional map key to differentiate concurrent shares of the same device. # noqa: E501 + + :return: The share_id of this V1DeviceRequestAllocationResult. # noqa: E501 + :rtype: str + """ + return self._share_id + + @share_id.setter + def share_id(self, share_id): + """Sets the share_id of this V1DeviceRequestAllocationResult. + + ShareID uniquely identifies an individual allocation share of the device, used when the device supports multiple simultaneous allocations. It serves as an additional map key to differentiate concurrent shares of the same device. # noqa: E501 + + :param share_id: The share_id of this V1DeviceRequestAllocationResult. # noqa: E501 + :type share_id: str + """ + + self._share_id = share_id + + @property + def tolerations(self): + """Gets the tolerations of this V1DeviceRequestAllocationResult. # noqa: E501 + + A copy of all tolerations specified in the request at the time when the device got allocated. The maximum number of tolerations is 16. This is an alpha field and requires enabling the DRADeviceTaints feature gate. # noqa: E501 + + :return: The tolerations of this V1DeviceRequestAllocationResult. # noqa: E501 + :rtype: list[V1DeviceToleration] + """ + return self._tolerations + + @tolerations.setter + def tolerations(self, tolerations): + """Sets the tolerations of this V1DeviceRequestAllocationResult. + + A copy of all tolerations specified in the request at the time when the device got allocated. The maximum number of tolerations is 16. This is an alpha field and requires enabling the DRADeviceTaints feature gate. # noqa: E501 + + :param tolerations: The tolerations of this V1DeviceRequestAllocationResult. # noqa: E501 + :type tolerations: list[V1DeviceToleration] + """ + + self._tolerations = tolerations + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1DeviceRequestAllocationResult): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1DeviceRequestAllocationResult): + return True + + return self.to_dict() != other.to_dict() diff --git a/kubernetes/client/models/v1_device_selector.py b/kubernetes/client/models/v1_device_selector.py new file mode 100644 index 0000000000..eb3248a310 --- /dev/null +++ b/kubernetes/client/models/v1_device_selector.py @@ -0,0 +1,131 @@ +# coding: utf-8 + +""" + Kubernetes + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: release-1.35 + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from kubernetes.client.configuration import Configuration + + +class V1DeviceSelector(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'cel': 'V1CELDeviceSelector' + } + + attribute_map = { + 'cel': 'cel' + } + + def __init__(self, cel=None, local_vars_configuration=None): # noqa: E501 + """V1DeviceSelector - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._cel = None + self.discriminator = None + + if cel is not None: + self.cel = cel + + @property + def cel(self): + """Gets the cel of this V1DeviceSelector. # noqa: E501 + + + :return: The cel of this V1DeviceSelector. # noqa: E501 + :rtype: V1CELDeviceSelector + """ + return self._cel + + @cel.setter + def cel(self, cel): + """Sets the cel of this V1DeviceSelector. + + + :param cel: The cel of this V1DeviceSelector. # noqa: E501 + :type cel: V1CELDeviceSelector + """ + + self._cel = cel + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1DeviceSelector): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1DeviceSelector): + return True + + return self.to_dict() != other.to_dict() diff --git a/kubernetes/client/models/v1_device_sub_request.py b/kubernetes/client/models/v1_device_sub_request.py new file mode 100644 index 0000000000..c3cc74f37c --- /dev/null +++ b/kubernetes/client/models/v1_device_sub_request.py @@ -0,0 +1,301 @@ +# coding: utf-8 + +""" + Kubernetes + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: release-1.35 + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from kubernetes.client.configuration import Configuration + + +class V1DeviceSubRequest(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'allocation_mode': 'str', + 'capacity': 'V1CapacityRequirements', + 'count': 'int', + 'device_class_name': 'str', + 'name': 'str', + 'selectors': 'list[V1DeviceSelector]', + 'tolerations': 'list[V1DeviceToleration]' + } + + attribute_map = { + 'allocation_mode': 'allocationMode', + 'capacity': 'capacity', + 'count': 'count', + 'device_class_name': 'deviceClassName', + 'name': 'name', + 'selectors': 'selectors', + 'tolerations': 'tolerations' + } + + def __init__(self, allocation_mode=None, capacity=None, count=None, device_class_name=None, name=None, selectors=None, tolerations=None, local_vars_configuration=None): # noqa: E501 + """V1DeviceSubRequest - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._allocation_mode = None + self._capacity = None + self._count = None + self._device_class_name = None + self._name = None + self._selectors = None + self._tolerations = None + self.discriminator = None + + if allocation_mode is not None: + self.allocation_mode = allocation_mode + if capacity is not None: + self.capacity = capacity + if count is not None: + self.count = count + self.device_class_name = device_class_name + self.name = name + if selectors is not None: + self.selectors = selectors + if tolerations is not None: + self.tolerations = tolerations + + @property + def allocation_mode(self): + """Gets the allocation_mode of this V1DeviceSubRequest. # noqa: E501 + + AllocationMode and its related fields define how devices are allocated to satisfy this subrequest. Supported values are: - ExactCount: This request is for a specific number of devices. This is the default. The exact number is provided in the count field. - All: This subrequest is for all of the matching devices in a pool. Allocation will fail if some devices are already allocated, unless adminAccess is requested. If AllocationMode is not specified, the default mode is ExactCount. If the mode is ExactCount and count is not specified, the default count is one. Any other subrequests must specify this field. More modes may get added in the future. Clients must refuse to handle requests with unknown modes. # noqa: E501 + + :return: The allocation_mode of this V1DeviceSubRequest. # noqa: E501 + :rtype: str + """ + return self._allocation_mode + + @allocation_mode.setter + def allocation_mode(self, allocation_mode): + """Sets the allocation_mode of this V1DeviceSubRequest. + + AllocationMode and its related fields define how devices are allocated to satisfy this subrequest. Supported values are: - ExactCount: This request is for a specific number of devices. This is the default. The exact number is provided in the count field. - All: This subrequest is for all of the matching devices in a pool. Allocation will fail if some devices are already allocated, unless adminAccess is requested. If AllocationMode is not specified, the default mode is ExactCount. If the mode is ExactCount and count is not specified, the default count is one. Any other subrequests must specify this field. More modes may get added in the future. Clients must refuse to handle requests with unknown modes. # noqa: E501 + + :param allocation_mode: The allocation_mode of this V1DeviceSubRequest. # noqa: E501 + :type allocation_mode: str + """ + + self._allocation_mode = allocation_mode + + @property + def capacity(self): + """Gets the capacity of this V1DeviceSubRequest. # noqa: E501 + + + :return: The capacity of this V1DeviceSubRequest. # noqa: E501 + :rtype: V1CapacityRequirements + """ + return self._capacity + + @capacity.setter + def capacity(self, capacity): + """Sets the capacity of this V1DeviceSubRequest. + + + :param capacity: The capacity of this V1DeviceSubRequest. # noqa: E501 + :type capacity: V1CapacityRequirements + """ + + self._capacity = capacity + + @property + def count(self): + """Gets the count of this V1DeviceSubRequest. # noqa: E501 + + Count is used only when the count mode is \"ExactCount\". Must be greater than zero. If AllocationMode is ExactCount and this field is not specified, the default is one. # noqa: E501 + + :return: The count of this V1DeviceSubRequest. # noqa: E501 + :rtype: int + """ + return self._count + + @count.setter + def count(self, count): + """Sets the count of this V1DeviceSubRequest. + + Count is used only when the count mode is \"ExactCount\". Must be greater than zero. If AllocationMode is ExactCount and this field is not specified, the default is one. # noqa: E501 + + :param count: The count of this V1DeviceSubRequest. # noqa: E501 + :type count: int + """ + + self._count = count + + @property + def device_class_name(self): + """Gets the device_class_name of this V1DeviceSubRequest. # noqa: E501 + + DeviceClassName references a specific DeviceClass, which can define additional configuration and selectors to be inherited by this subrequest. A class is required. Which classes are available depends on the cluster. Administrators may use this to restrict which devices may get requested by only installing classes with selectors for permitted devices. If users are free to request anything without restrictions, then administrators can create an empty DeviceClass for users to reference. # noqa: E501 + + :return: The device_class_name of this V1DeviceSubRequest. # noqa: E501 + :rtype: str + """ + return self._device_class_name + + @device_class_name.setter + def device_class_name(self, device_class_name): + """Sets the device_class_name of this V1DeviceSubRequest. + + DeviceClassName references a specific DeviceClass, which can define additional configuration and selectors to be inherited by this subrequest. A class is required. Which classes are available depends on the cluster. Administrators may use this to restrict which devices may get requested by only installing classes with selectors for permitted devices. If users are free to request anything without restrictions, then administrators can create an empty DeviceClass for users to reference. # noqa: E501 + + :param device_class_name: The device_class_name of this V1DeviceSubRequest. # noqa: E501 + :type device_class_name: str + """ + if self.local_vars_configuration.client_side_validation and device_class_name is None: # noqa: E501 + raise ValueError("Invalid value for `device_class_name`, must not be `None`") # noqa: E501 + + self._device_class_name = device_class_name + + @property + def name(self): + """Gets the name of this V1DeviceSubRequest. # noqa: E501 + + Name can be used to reference this subrequest in the list of constraints or the list of configurations for the claim. References must use the format
/. Must be a DNS label. # noqa: E501 + + :return: The name of this V1DeviceSubRequest. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this V1DeviceSubRequest. + + Name can be used to reference this subrequest in the list of constraints or the list of configurations for the claim. References must use the format
/. Must be a DNS label. # noqa: E501 + + :param name: The name of this V1DeviceSubRequest. # noqa: E501 + :type name: str + """ + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def selectors(self): + """Gets the selectors of this V1DeviceSubRequest. # noqa: E501 + + Selectors define criteria which must be satisfied by a specific device in order for that device to be considered for this subrequest. All selectors must be satisfied for a device to be considered. # noqa: E501 + + :return: The selectors of this V1DeviceSubRequest. # noqa: E501 + :rtype: list[V1DeviceSelector] + """ + return self._selectors + + @selectors.setter + def selectors(self, selectors): + """Sets the selectors of this V1DeviceSubRequest. + + Selectors define criteria which must be satisfied by a specific device in order for that device to be considered for this subrequest. All selectors must be satisfied for a device to be considered. # noqa: E501 + + :param selectors: The selectors of this V1DeviceSubRequest. # noqa: E501 + :type selectors: list[V1DeviceSelector] + """ + + self._selectors = selectors + + @property + def tolerations(self): + """Gets the tolerations of this V1DeviceSubRequest. # noqa: E501 + + If specified, the request's tolerations. Tolerations for NoSchedule are required to allocate a device which has a taint with that effect. The same applies to NoExecute. In addition, should any of the allocated devices get tainted with NoExecute after allocation and that effect is not tolerated, then all pods consuming the ResourceClaim get deleted to evict them. The scheduler will not let new pods reserve the claim while it has these tainted devices. Once all pods are evicted, the claim will get deallocated. The maximum number of tolerations is 16. This is an alpha field and requires enabling the DRADeviceTaints feature gate. # noqa: E501 + + :return: The tolerations of this V1DeviceSubRequest. # noqa: E501 + :rtype: list[V1DeviceToleration] + """ + return self._tolerations + + @tolerations.setter + def tolerations(self, tolerations): + """Sets the tolerations of this V1DeviceSubRequest. + + If specified, the request's tolerations. Tolerations for NoSchedule are required to allocate a device which has a taint with that effect. The same applies to NoExecute. In addition, should any of the allocated devices get tainted with NoExecute after allocation and that effect is not tolerated, then all pods consuming the ResourceClaim get deleted to evict them. The scheduler will not let new pods reserve the claim while it has these tainted devices. Once all pods are evicted, the claim will get deallocated. The maximum number of tolerations is 16. This is an alpha field and requires enabling the DRADeviceTaints feature gate. # noqa: E501 + + :param tolerations: The tolerations of this V1DeviceSubRequest. # noqa: E501 + :type tolerations: list[V1DeviceToleration] + """ + + self._tolerations = tolerations + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1DeviceSubRequest): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1DeviceSubRequest): + return True + + return self.to_dict() != other.to_dict() diff --git a/kubernetes/client/models/v1_device_taint.py b/kubernetes/client/models/v1_device_taint.py new file mode 100644 index 0000000000..2848065a20 --- /dev/null +++ b/kubernetes/client/models/v1_device_taint.py @@ -0,0 +1,219 @@ +# coding: utf-8 + +""" + Kubernetes + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: release-1.35 + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from kubernetes.client.configuration import Configuration + + +class V1DeviceTaint(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'effect': 'str', + 'key': 'str', + 'time_added': 'datetime', + 'value': 'str' + } + + attribute_map = { + 'effect': 'effect', + 'key': 'key', + 'time_added': 'timeAdded', + 'value': 'value' + } + + def __init__(self, effect=None, key=None, time_added=None, value=None, local_vars_configuration=None): # noqa: E501 + """V1DeviceTaint - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._effect = None + self._key = None + self._time_added = None + self._value = None + self.discriminator = None + + self.effect = effect + self.key = key + if time_added is not None: + self.time_added = time_added + if value is not None: + self.value = value + + @property + def effect(self): + """Gets the effect of this V1DeviceTaint. # noqa: E501 + + The effect of the taint on claims that do not tolerate the taint and through such claims on the pods using them. Valid effects are None, NoSchedule and NoExecute. PreferNoSchedule as used for nodes is not valid here. More effects may get added in the future. Consumers must treat unknown effects like None. # noqa: E501 + + :return: The effect of this V1DeviceTaint. # noqa: E501 + :rtype: str + """ + return self._effect + + @effect.setter + def effect(self, effect): + """Sets the effect of this V1DeviceTaint. + + The effect of the taint on claims that do not tolerate the taint and through such claims on the pods using them. Valid effects are None, NoSchedule and NoExecute. PreferNoSchedule as used for nodes is not valid here. More effects may get added in the future. Consumers must treat unknown effects like None. # noqa: E501 + + :param effect: The effect of this V1DeviceTaint. # noqa: E501 + :type effect: str + """ + if self.local_vars_configuration.client_side_validation and effect is None: # noqa: E501 + raise ValueError("Invalid value for `effect`, must not be `None`") # noqa: E501 + + self._effect = effect + + @property + def key(self): + """Gets the key of this V1DeviceTaint. # noqa: E501 + + The taint key to be applied to a device. Must be a label name. # noqa: E501 + + :return: The key of this V1DeviceTaint. # noqa: E501 + :rtype: str + """ + return self._key + + @key.setter + def key(self, key): + """Sets the key of this V1DeviceTaint. + + The taint key to be applied to a device. Must be a label name. # noqa: E501 + + :param key: The key of this V1DeviceTaint. # noqa: E501 + :type key: str + """ + if self.local_vars_configuration.client_side_validation and key is None: # noqa: E501 + raise ValueError("Invalid value for `key`, must not be `None`") # noqa: E501 + + self._key = key + + @property + def time_added(self): + """Gets the time_added of this V1DeviceTaint. # noqa: E501 + + TimeAdded represents the time at which the taint was added. Added automatically during create or update if not set. # noqa: E501 + + :return: The time_added of this V1DeviceTaint. # noqa: E501 + :rtype: datetime + """ + return self._time_added + + @time_added.setter + def time_added(self, time_added): + """Sets the time_added of this V1DeviceTaint. + + TimeAdded represents the time at which the taint was added. Added automatically during create or update if not set. # noqa: E501 + + :param time_added: The time_added of this V1DeviceTaint. # noqa: E501 + :type time_added: datetime + """ + + self._time_added = time_added + + @property + def value(self): + """Gets the value of this V1DeviceTaint. # noqa: E501 + + The taint value corresponding to the taint key. Must be a label value. # noqa: E501 + + :return: The value of this V1DeviceTaint. # noqa: E501 + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """Sets the value of this V1DeviceTaint. + + The taint value corresponding to the taint key. Must be a label value. # noqa: E501 + + :param value: The value of this V1DeviceTaint. # noqa: E501 + :type value: str + """ + + self._value = value + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1DeviceTaint): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1DeviceTaint): + return True + + return self.to_dict() != other.to_dict() diff --git a/kubernetes/client/models/v1_device_toleration.py b/kubernetes/client/models/v1_device_toleration.py new file mode 100644 index 0000000000..ff0ba430a0 --- /dev/null +++ b/kubernetes/client/models/v1_device_toleration.py @@ -0,0 +1,245 @@ +# coding: utf-8 + +""" + Kubernetes + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: release-1.35 + Generated by: https://openapi-generator.tech +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from kubernetes.client.configuration import Configuration + + +class V1DeviceToleration(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'effect': 'str', + 'key': 'str', + 'operator': 'str', + 'toleration_seconds': 'int', + 'value': 'str' + } + + attribute_map = { + 'effect': 'effect', + 'key': 'key', + 'operator': 'operator', + 'toleration_seconds': 'tolerationSeconds', + 'value': 'value' + } + + def __init__(self, effect=None, key=None, operator=None, toleration_seconds=None, value=None, local_vars_configuration=None): # noqa: E501 + """V1DeviceToleration - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._effect = None + self._key = None + self._operator = None + self._toleration_seconds = None + self._value = None + self.discriminator = None + + if effect is not None: + self.effect = effect + if key is not None: + self.key = key + if operator is not None: + self.operator = operator + if toleration_seconds is not None: + self.toleration_seconds = toleration_seconds + if value is not None: + self.value = value + + @property + def effect(self): + """Gets the effect of this V1DeviceToleration. # noqa: E501 + + Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule and NoExecute. # noqa: E501 + + :return: The effect of this V1DeviceToleration. # noqa: E501 + :rtype: str + """ + return self._effect + + @effect.setter + def effect(self, effect): + """Sets the effect of this V1DeviceToleration. + + Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule and NoExecute. # noqa: E501 + + :param effect: The effect of this V1DeviceToleration. # noqa: E501 + :type effect: str + """ + + self._effect = effect + + @property + def key(self): + """Gets the key of this V1DeviceToleration. # noqa: E501 + + Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys. Must be a label name. # noqa: E501 + + :return: The key of this V1DeviceToleration. # noqa: E501 + :rtype: str + """ + return self._key + + @key.setter + def key(self, key): + """Sets the key of this V1DeviceToleration. + + Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys. Must be a label name. # noqa: E501 + + :param key: The key of this V1DeviceToleration. # noqa: E501 + :type key: str + """ + + self._key = key + + @property + def operator(self): + """Gets the operator of this V1DeviceToleration. # noqa: E501 + + Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a ResourceClaim can tolerate all taints of a particular category. # noqa: E501 + + :return: The operator of this V1DeviceToleration. # noqa: E501 + :rtype: str + """ + return self._operator + + @operator.setter + def operator(self, operator): + """Sets the operator of this V1DeviceToleration. + + Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a ResourceClaim can tolerate all taints of a particular category. # noqa: E501 + + :param operator: The operator of this V1DeviceToleration. # noqa: E501 + :type operator: str + """ + + self._operator = operator + + @property + def toleration_seconds(self): + """Gets the toleration_seconds of this V1DeviceToleration. # noqa: E501 + + TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system. If larger than zero, the time when the pod needs to be evicted is calculated as